Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as off-topic by Zoredache, MadHatter, Jenny D, mdpc, Ward Oct 18 '13 at 16:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – MadHatter, Jenny D, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 10 down vote accepted

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. enter image description here

Then hit Tab until you reach Forward to skip the list of standard ports. enter image description here

Then hit Tab until you reach Add, then press Enter. enter image description here

Then enter the port (e.g. 5900) and protocol (e.g. tcp) and press Enter. enter image description here

When done adding ports, hit Tab until you reach Close. enter image description here

Finally, hit Tab until you reach OK. Your firewall is now saved. enter image description here

share|improve this answer
    
Ohhhhhh, must use the "forward" option..... I thought that was like the "forward" section of the iptables output.... I see it now! –  samsmith Nov 12 '12 at 4:50
1  
In this case "Forward" means "Next". They really should change that... –  Michael Hampton Nov 12 '12 at 5:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.