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'm trying to access http://domain.com/test.html from internet, but getting error

Server is running CentOS

I'm using DSN hosting (yandex.ru) for domain.com

Ping server by ip = OK

Ping server by domain = OK === nslookup = OK

wget http://domain.com/test.html locally = OK (apache is configured OK)

Server have following iptables:

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,ESTAB                 LISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:s                sh
REJECT     all  --  anywhere             anywhere            reject-with icmp-ho                  st-prohibited

UPD: iptables -nL

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

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

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Please recommend what else should I check?

share|improve this question
    
result of running "iptables -nL" would be more helpful; –  pQd Aug 20 '12 at 16:25
    
Off hand, your iptables doesn't seem to permit HTTP. –  cjc Aug 20 '12 at 16:26
    
@pQd, thank you! I've updated question. –  Kirzilla Aug 20 '12 at 16:30

1 Answer 1

up vote 4 down vote accepted

It looks like your firewall is blocking port 80. Try opening it with

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

If that works then save the current config

service iptables save

which will update the /etc/sysconfig/iptables file so that next time the service starts port 80 will remain open.

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.