0

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
HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
Bobalandi
  • 3
  • 2

2 Answers2

1

In runtime:

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

startup in /etc/sysconfig/iptables

osdyng
  • 1,872
  • 1
  • 13
  • 10
  • 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
0

Check SE Linux policies.

semanage port -l | grep http

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

Phil P
  • 3,040
  • 1
  • 15
  • 19