Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a centos apache2 webserver which is running and I can view the localhost website from localhost or by http://192.168.0.167 (its IP) through a browser on the machine itself, but if I try to view it by its IP on another machine through a browser on the network I can't load the website. Also pinging the machine from another machine works fine. I'm able to connect to the machine via SSH as well with no trouble.

"iptables -L" output:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     esp  --  anywhere             anywhere
ACCEPT     ah   --  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
share|improve this question

2 Answers 2

up vote 1 down vote accepted

In runtime:

iptables -I RH-Firewall-1-INPUT 7 -p tcp --dport 80 -j ACCEPT

startup in /etc/sysconfig/iptables

share|improve this answer
    
that did the trick! thanks, now I wonder why that was set up in the first place. this was an out of the box install. –  Bobalandi Jan 23 '11 at 21:50

Check SE Linux policies.

semanage port -l | grep http

You can look through /etc/selinux/config for more details.

share|improve this answer

Your Answer

 
discard

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.