I couldn't log in to facebook, so I ping the domain and got this:

ping www.facebook.com

Pinging www.facebook.com [] with 32 bytes of data:

Request timed out.

Reply from Destination net unreachable.

But when I ping this IP, it is reachable.

Pinging with 32 bytes of data:

Reply from bytes=32 time=190ms TTL=51

I realize it is something wrong with my computer, as I have tried using different networks (on the same network other devices can connect to facebook), resetting router's routing table, clear my computer arp cache...but none of it works.

Does anyone have any idea?

  • 1
    I managed to found out that is some trojans which has edited windows host file, which points the facebook.com to another IP.
    – Choon Lim
    Dec 19 '13 at 5:15
  • It is not surprising that you can ping - this was the router that answered your ping to (fake) facebook that the destination net is unreachable, so this one is still reachable. You could thank that router for cutting the connection to the fake facebook, probably it prevented you from identity theft. Dec 19 '13 at 8:56

What your commands show is the following:

  1. Your computer has resolved www.facebook.com address to be
  2. It is trying to send ping packets to it
  3. On the packet's way a router (possibly your's, at address cannot find route to
  4. So that you know about this the router is informing you about this with the ICMP reply message Destination net unreachable.

In your second command you are pinging the router who gave you net unreachable reply, not facebook host, therefore unsurprisingly you get a reply from it.

As you have helpfully pointed out - this was result from a messed-up hosts file. You also could have seen the problem if you had used nslookup to query a DNS server directly:


This would have shown you the actual address of the facebook host and you would have noticed that it is different from the one given to you ( ), so you would have known to look in the hosts file as a computer resolves IP addresses through hosts file or DNS queries.

Having said that it is not good that a virus has been able to update the hosts file, since that should only be writable by a superuser/system (Administrator, SYSTEM or root on Linux). Therefore the implication is that the virus/trojan had high level access to the system.

  • Very nicely explained! +1
    – xstnc
    Dec 19 '13 at 8:28
  • 1
    thanks for your great explanation! Knowledge enhanced :)
    – Choon Lim
    Dec 20 '13 at 7:11

Destination Net Unreachable is a common ICMP error code displayed on the command prompt when the ping packets from your device fail to find a route to the network address of the IP address/domain name.

I have read your comment about you resolved this issue by clearing the Hosts file on your computer. Yes, wrong entries on a Windows Hosts file can be one of the many reasons for this issue.

Your computer might be compromised, and some malicious programs gained control enough to write host file entries. It is important to keep an AntiVirus on your computer to prevent it.

The most common reason to get a destination net unreachable error is a faulty routing table either on your computer or on the router itself. If it is a home network, the best solution is to power off the router, modem, hub, and PC on your network and restarts them after 2 minutes. It is called a Power cycle and it works most times.

Source: https://www.corenetworkz.com/2009/05/destination-net-unreachable-icmp-error.html


Go to C:\Windows\System32\drivers\etc\ and open hosts in Notepad.

Delete all entries like this: facebook.com www.facebook.com login.facebook.com upload.facebook.com graph.facebook.com pixel.facebook.com apps.facebook.com

Save the file.


You could try to flush your DNS. Open CMD and:

ipconfig /flushdns

Check your IPV4 and IPV6 (if available) DNS servers. I had this same issue in the past and I made a mistake with my IPV6. But at the end a good flush did the job!


In my case I had to disable IPv6 to make this problem go away. For some reason all the ping requests were defaulting to IPv6.

If I did a "ping google.com -4" I would get a reply. That forces it to use IPv4 If I did a ping without the -4, it wouldn't work and neither would anything else (browsers, email, etc).

While there is probably a better fix, for the time being I just disabled IPv6 in the NIC properties and that solved the problem right away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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