I'm trying to open port 80 in iptables but am running into a couple issues. I am running CentOS 5.7.
First I tried to run this command:
iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 80 -j ACCEPT
But I received an error saying:
iptables: command not found
So I then ran the same command but with sbin added:
/sbin/iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 80 -j ACCEPT
Now I receive this error:
iptables: No chain/target/match by that name
Thanks in advance for any help that can be provided.
/etc/sysconfig/iptablesfile look like ? – Zypher♦ Feb 16 '12 at 18:11iptables -n --list? – Zoredache Feb 16 '12 at 18:12/sbinis not in your path - and this can often happen if you are notrootor if yousudo rootwithout changing thePATHvariable to include/sbin(and/usr/sbin). – David Feb 16 '12 at 18:13iptables -Llook like? – larsks Feb 16 '12 at 18:16