Mac cannot browse, ping works fine

27,971

Solution 1

OK, this helped:

  • Removing ALL wi-fi networks from "System preferences - Networking - Advanced"
  • Restarting the router again (weird since all other devices, smartphones and my windows laptop were working fine)

Solution 2

While an old question, it still appears at the top on Google, so it makes sense to add a new answer.

I found a helpful hint at this Apple discussion. In short, a rogue process could be holding a crazy number of TCP connections. In my case it was Kaspersky that was failing to connect to the update server but seemingly never releasing connections.

To check for this, run:

sudo lsof -n -i TCP

If there's a huge number of open connections (in the hundreds) this might be your issue. Try killing the process that is holding them and see if it helps. After killing Kaspersky (and, probably needlessly, restating WiFi) it all went back to normal for me.

How this affects some sites but not others is beyond me.

Solution 3

Lifting this answer verbatim from another SE site: https://apple.stackexchange.com/a/208796/163653

  • Go to System Preferences,choose network
  • Click "advanced", go to the "Hardware" tab, and click on "configure", choose "manually"
  • Click on mtu, change it to "custom" and set the mtu number to 1453 (I dont why but the number is something like a networking secret from ancient times)
Share:
27,971

Related videos on Youtube

jitbit
Author by

jitbit

I'm the founder and lead dev at Jitbit Software , my self-funded software startup, that builds a helpdesk ticketing system (customer support software) among other handy apps. I'm a C# (mostly) developer with a LOT of customer support background (answering support requests was my side-job for years at a company I worked for), which eventually made me build my own customer support system. I actually believe that developers and even founders and CEOs still need to do support from time time. If support is good enough for Jeff Bezos, it's good enough for you :)

Updated on September 18, 2022

Comments

  • jitbit
    jitbit over 1 year

    I cannot browse websites in Chrome/Safari. Internet works, ping works, traceroute works.

    Even "telnet google.com 80" works!! (shows me html-code).

    But not in browsers. Tried Safari, Chrome - timeout.

    Tried this, didn't help:

    • killing "mDNSResponder"

    • rebooting

    • restarting router

    • resetting pram

    Nothing helps.

    MacBook Air, no antiviruses, firewall disabled.

  • ThinkCode
    ThinkCode about 7 years
    Wow, is this some secret code or what?! Little Snitch and Radio Silence trials messed up my internet connectivity. Can ping but not browse. This trick works, so far.
  • Joe
    Joe over 4 years
    Thanks, my anti-virus, Sophos, had a few hundred TCP connections in CLOSE_WAIT state . I ran sudo kill -9 on the Sophos PID and connectivity was restored. I didn’t reset my router.
  • enthus1ast
    enthus1ast over 4 years
    Same here, Sophos consumed all filedescriptors,for me it worked again when i disable the "web protection"