I have an issue with one of my computer on my network. It is an iMac running OS X 10.5.8.

The issue is accessing certain websites. For instance, one of these websites is that the computer is unable to connect to is farmville.com.

When I ping farmville.com it returns "no route to host":

$ ping farmville.com
PING farmville.com ( 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host

When I traceroute farmville:

$ traceroute farmville.com
traceroute: Warning: farmville.com has multiple addresses; using
traceroute to farmville.com (, 64 hops max, 40 byte packets
traceroute: sendto: No route to host
  1 traceroute: wrote farmville.com 40 chars, ret=-1

tracerouting the farmville ip address:

$ traceroute
traceroute to farmville.com (, 64 hops max, 40 byte packets
traceroute: sendto: No route to host
  1 traceroute: wrote farmville.com 40 chars, ret=-1

Now the interesting part is that I on another computer (running Ubuntu 10.10) I have no issues at all accessing this website. Which tells me that it's not the internet connection. I've also disabled the firewall on the router to no avail.

The /etc/hosts file in the mac is the following. The /private/etc/hosts file is empty:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##   localhost
#    broadcasthost
::1             localhost 
fe80::1%lo0 localhost

Any help is appreciated.

Many thanks

  • Can the iMac and the Ubuntu computer ping and traceroute each other or is the iMac just completely refusing it all?
    – Asmus
    Mar 2 '11 at 5:56
  • 4
    Is there something weird in the Mac's routing table? netstat -rn -finet and route -n get may be informative... Mar 2 '11 at 20:51

I'm guessing it's not related to ICMP being blocked. If that was the case, the response would simply timeout, not result in a "no route to host" message. "No route to host" means exactly that: when the destination of the ICMP message is not on the local subnet, it will be forwarded to the machine's default gateway for it to handle. If there is no default gateway, or the gateway has no information in its routing table to forward the packets, you'll see "no route to host."

Both your ping and traceroute commands are resolving the domain name to an IP address (albeit different addresses), so it appears that the DNS resolution is probably working okay. So I'd double check that your default gateways are the same/properly configured on the iMac first.

Also, from what I've seen, OS X seems to favor WiFi to a wired connection when both are connected. Check that you only have one connected (if you happen to be using both) and see if it works.


ICMP may be blocked somewhere (not your firewall though since you disabled that), which some ISPs still do for a variety of reasons (e.g., they're running an OS that has a security vulnerability that utilizes ICMP, a misplaced belief that ICMP is a security risk, etc.).

Try running traceroute and ping operations from other sites to see if it works. I tried to ping the first IP address from the Shaw.CA network, and I got reasonably quick replies.

  • I'm not familiar with ICMP, but seems doubtful since I am able to connect through other computers on the same network.
    – jairo
    Mar 2 '11 at 4:47
  • @jairo The ping utility uses the ICMP protocol to get an echo response from a host or gateway. See man ping and man icmp.
    – creidhne
    Jul 15 '16 at 3:41

There’s something funny here? The ping is to Where as your Traceroute is to

Now, I’ve run both IP’s through here, and it’s working fine. But quite simply, in a similar case, verify the DNS and Gateway’s of both computers.

Make sure that their DNS servers are the same, and make sure the default Gateway is the same for both computers.

Both Asmus & Gordon’s suggestion are important, and would be quite helpful in debugging this further.

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.