Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ipchains firewall question

Status
Not open for further replies.

coper

Technical User
Jan 4, 2002
36
US
Hi,

I am trying to learn how to open port for incoming and outgoing traffic using TCP/IP Connection to port 705/tcp.
So I need to add a line to /etc/sysconfig/ipchains. Also do I need two lines since I want to allow incoming and outgoing traffic or does one line do both?

Would this be correct?
-A input -p tcp -d 0/0 705 -j ACCEPT

Thanks
 
I'm not an ipchains expert, but before you do anything, look at your current chains via --list. The defaults on RH linux usually let out all outgoing traffic if the box is not a router, so you only need the inbound port. Also, note that the order of the ipchains matters, so when you insert your rule, stick in the top somewhere. Here is the one I used to open POP3:

ipchains -I input 4 -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 110:110 -p 6 -j ACCEPT -y

The 4 refers to the rule #. Also I suggest using ipchains-save and ipchains-restore.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top