I need IPTables, like everyone else, but I don’t use it enough to really keep my knowledge complete and fresh.
The setup utility in CentOS is too basic. It doesn’t seem to allow me to open up custom ports, just standard ones.
I need a text-based way to open up custom ports in my firewall. What should I do?
system-config-firewall-tui is the “stock” text-based firewall configuration tool for RHEL/CentOS. It is perfectly capable of opening custom ports.
Press Tab until you reach Customize on the first screen.
Then hit Tab until you reach Forward to skip the list of standard ports.
Then hit Tab until you reach Add, then press Enter.
Then enter the port (e.g.
5900) and protocol (e.g.
tcp) and press Enter.
When done adding ports, hit Tab until you reach Close.
Finally, hit Tab until you reach OK. Your firewall is now saved.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.