iptables

how do i add a firewall exception for port 80

i tried

iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

and it didnt work for me

thanks
LVL 5
Kylo RenSystem EngineerAsked:
Who is Participating?
 
amitnepalCommented:
iptables -A INPUT -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT


Please note that iptables is first match, so you must place this rule before any block statements.

Thanks
0
 
JelcinCommented:
Hi, is the firewall a router? Do you want an exception for the firewall box or for the computers behind?
0
 
Kylo RenSystem EngineerAuthor Commented:
nope its not a router, just for the box
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
JelcinCommented:
iptables -A INPUT -p tcp  --dport 80 -j ACCEPT

than this should work fine...
0
 
PapertripCommented:
Try this:
iptables -A INPUT -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT

Open in new window

0
 
PapertripCommented:
Hi, is this still an issue?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.