Menu Open

Cent OS adding port into iptables - command line SSH

4 August 2013, 10:06 AM
The following can be used to allow connections to a port from any IP. Use the simple line below to accept a port in iptables.

To allow HTTP port 80
iptables -I INPUT -p tcp --dport 80 -j ACCEPT

To allow DNS port 53
iptables -I INPUT -p tcp --dport 53 -j ACCEPT

To add any port just change the number to the required port