2

I have problems accessing my website www.egytex.com, ping to the site works and has no lost data but direct access gives me a no route to the server available !?? how could ping works if there is no route to the server !?

anyone has a solution for this?

Thank you!

4 Answers4

7

Ping usually uses ICMP whereas web access uses HTTP over TCP. So it is possible that some firewall or filter is blocking one but not the other.

Are you sure the webserver is running, is listening on the port you expect (80?) and does not have any allow/deny rules that are blocking access?

Are you using a hosting provider? Do they have a help desk? Are they still in business?

2

To expand on RGB's answer, this is almost certainly a firewall issue, because I can reach the ssh port on the server, too:

[madhatta@risby ~]$ ping www.egytex.com
PING www.egytex.com (209.250.246.227) 56(84) bytes of data.
64 bytes from www1.texmarkcorp.com (209.250.246.227): icmp_seq=1 ttl=54 time=112 ms
[...]

[madhatta@risby ~]$ telnet www.egytex.com 22
Trying 209.250.246.227...
Connected to www.egytex.com.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.3

[madhatta@risby ~]$ telnet www.egytex.com 80
Trying 209.250.246.227...
telnet: connect to address 209.250.246.227: No route to host

and in the last case, that answer is immediate, so it's not an ARP timeout (wasn't likely anyway). It's not DNS, because the same address is displayed each time. Check your local firewall with iptables -L -n -v and ensure that incoming TCP traffic to port 80 is allowed. If it is, take it up with your ISP.

MadHatter
  • 80,590
1

Unfortunately, your browser and your OS can use different DNS resolvers in certain cases. What OS are you using? Can you try a different browser? Does 'nslookup www.egytex.com' agree with the IP address that ping is showing? How about traceroute? Your browser or machine may have cached DNS.

Luke
  • 682
0

If your firewall is not configured correctly, you would most certainly experince this issue. I too was able to ping one server but could not get a web page to open even though everything else seemed right. The firewall fixed it.

This is a complex topic, and I'd suggest doing "man iptables" on a terminal to check the documentation and also look up further resources and tutorials. If you just want a quick check that this is indeed the issue, you could do the following on a terminal.

First, back up your existing iptables, e.g.:

mv /etc/sysconfig/iptables /etc/sysconfig/iptables.bkp

Then using your favourite text editor, create a new /etc/sysconfig/iptables file with the following text:

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

This will allow you to ssh into the machine (port 22) as well get http (80) and https (443) working. For these changes to take effect restart the firewall:

service iptables restart

If you still can ping but cannot access any web page, you may have to troubleshoot your http server.