Opening Custom Ports in SuSE Firewall
Most of the servers I work with are already behind an enterprise firewall, so I rarely get to configure a software firewall. In the following example, I installed Webmin and Usermin on a SLES 11 server that had SuSE firewall enabled. Webmin and Usermin by default use ports 10000 and 20000, respectively. These ports are not in the list of common services you would find in the SuSE firewall configuration GUI. There are a couple of ways of adding custom ports to the list of the allowed services. The simplest way is to directly edit the SuSE firewall configuration file:
You will need to add the following two values:
FW_SERVICES_EXT_TCP="10000 20000" FW_SERVICES_EXT_UDP="10000 20000"
Here’s what the relevant section of the SuSEfirewall2 file looks like:
After you updated the SuSEfirewall2 file, you will need to restart the firewall with the following command:
Another way of making this change is to go through YaST. At the command prompt type “yast” and follow the screenshots below:
Once you click “Finish”, the firewall will be automatically restarted.