Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed stock Red Hat Linux 6 and I've installed lighttpd, it seems that my website loads only when i stop iptables (service iptables stop), I'm not sure what's going on, because I haven't done anything to it. Is this intended?

share|improve this question
up vote 4 down vote accepted

This is expected. The default firewall settings for RHEL/CentOS are very restrictive. You'll need to open port 80 for your httpd service to be able to get connections

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

should open the port. If this works then save the working state of the firewall with

service iptables save

This will update the /etc/sysconfig/iptables file so that when the service is restarted the port will remain open.

share|improve this answer
WORKS like charm! – ProDraz Oct 1 '12 at 21:24

The first thing I would do would be to verify what iptables rules you actually have loaded. Do an iptables -nvL to list them all out; then look for any rules relating to tcp:80. You could do that with a grep as well ... iptables -nvL | grep "dpt:80" If you see any that are set to REJECT or DROP, then you need to see if they are actually needed, and if not, drop them from your ruleset. If things work after you've cleaned them up, make sure you do an /etc/init.d/iptables save to save them out for the next reboot.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.