?
Solved

iptables

Posted on 2011-10-15
6
Medium Priority
?
191 Views
Last Modified: 2012-08-27
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
0
Comment
Question by:Kylo Ren
6 Comments
 
LVL 6

Expert Comment

by:Jelcin
ID: 36973551
Hi, is the firewall a router? Do you want an exception for the firewall box or for the computers behind?
0
 
LVL 5

Author Comment

by:Kylo Ren
ID: 36973607
nope its not a router, just for the box
0
 
LVL 6

Expert Comment

by:Jelcin
ID: 36973640
iptables -A INPUT -p tcp  --dport 80 -j ACCEPT

than this should work fine...
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 21

Expert Comment

by:Papertrip
ID: 36973646
Try this:
iptables -A INPUT -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT

Open in new window

0
 
LVL 7

Accepted Solution

by:
amitnepal earned 2000 total points
ID: 36974300
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
 
LVL 21

Expert Comment

by:Papertrip
ID: 37211835
Hi, is this still an issue?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question