Howto: Open port using IPtables

Howto open ports using iptables, see the following examples:

Open port 25 (SMTP) for the SOURCE_IP address:

iptables -A INPUT -p tcp -s SOURCE_IP  –dport 25  -j ACCEPT

Open port 22 (SSH) for the SOURCE_IP address to a specific DESTINATION_IP address

iptables -A INPUT -p tcp -s SOURCE_IP –dport 22 -d DESTINATION_IP -j ACCEPT

More to come…

This entry was posted on Saturday, October 3rd, 2009 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.