20

I'm really hoping someone here can help me, as I'm getting pretty frustrated with my macbook now.
I have a late 2011 model 15" macbook pro running OSX 10.9.5 that refuses to connect to Internet on my home network. I have the same problem whether it's WiFi or through ethernet cable, I have full signal but not getting online. Every other device connects fine; android phones and tablets,xbox one, iPhone and other macbooks, all online and browsing the net.
I have had no problems connecting to other networks with my macbook pro before and I just tried at a friend's house to check, with no problems.
A little something, that may be a clue to someone: when I open network diagnostic tool, my macbook pro connects for something that seems like a microsecond and it tells me I'm connected to Internet and everything seems fine.
My IP is 192.168.0.5 subnet mask 255.255.255.0 and IPv6 is set to automatic. None of the options are checked under the proxies tab.
Now I've tried the following, in different order and a number of times, to no avail:

  1. Renewing/turning off&on/inputting manually DHCP.
  2. Restarting/resetting the router and the macbook.
  3. Turning WiFi on/off.
  4. Remove & add services (WiFi & ethernet).
  5. Checked and copied all network settings from another macbook pro that's connected and online on my network.
  6. Ran network diagnostic and assistant tools
  7. Duplicated/removed/added location
  8. Removed the /Library/Preferences/SystemConfiguration folder.
  9. Removed network password from keychain.

I've tried other things too, but can't remember what else right now.

Response from ifconfig en1:

en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     
        ether 28:cf:da:e6:95:0a     
        inet6 fe80::2acf:daff:fee6:950a%en1 prefixlen 64 scopeid 0x5      
        inet 192.168.0.5 netmask 0xffffff00 broadcast 192.168.0.255     
        nd6 options=1<PERFORMNUD>     
        media: autoselect      
        status: active 

I'm praying that someone out there has the magic words or the 2-click solution for me, but I would be grateful for a long thorough guidelines to solve it too! <3

Regards Trond

klanomath
  • 66,391
  • 9
  • 130
  • 201
Trond
  • 203
  • I've also reset the SMC and pram! :-) – Trond Mar 23 '15 at 02:01
  • I just noticed I could browse the net while in recovery mode, meaning there must be some kind of program, app or setting that is interfering/blocking in some way. – Trond Mar 23 '15 at 02:13
  • Welcome to Ask Different! +1 for a nicely structured question. – Tetsujin Mar 23 '15 at 07:45
  • There is a way for us/me to do a bit more debugging, but this requires some additional information. If you are willing to try this, a system diagnostics file needs to be made and uploaded. This file can be created on the problematic Mac using this key combination while logged in: Command-Option(alt)-Control-Shift-. (yes, the period needs to be held too). Screen will flash, and after a few minutes a window will pop up containing a sysdiagnose file. It's 99% system information, but there might be some personal information leaking in there as well. But it contains every important hardware log! – John Keates Mar 23 '15 at 13:33
  • Hit the keys while logged in. For example when you have a Finder window open. – John Keates Mar 23 '15 at 14:15
  • @JohnKeates Ok, so I got the sysdiagnose.tar.gz file but before I upload it, what sort of personal info could leak into this file? Could someone exploit it? Thanks! – Trond Mar 23 '15 at 14:26
  • I would definitely upload it somewhere or mail it somewhere so that it's not publicly accessible, and in case of an upload, can be deleted. It's not needed for the answer on this question because the bits extracted form the sysdiag will be enough (and I'll post them as needed). The kind of information that might be leaked: open files and directories (their names), installed apps, anything that was put in one of the system logs, that sort of thing. Not the contents of private files. – John Keates Mar 23 '15 at 14:28
  • @JohnKeates ok, can I mail it to you? Or where do I upload/send it to? – Trond Mar 23 '15 at 14:37
  • I created a 10-minute email address; send me your private email address and I'll mail you mine from my private address. This way, neither of our addresses appear here ;-) g138900@trbvm.com – John Keates Mar 23 '15 at 15:31
  • @JohnKeates I have sent a mail to the address you provided. Thank you so much for going through all this effort for me! <3 – Trond Mar 23 '15 at 15:37
  • Got it! Replied. If I can figure out why it might not work, I'll post it as an answer. Probably some old extension or plugin that's blocking all network access. We'll know in a bit! – John Keates Mar 23 '15 at 15:40
  • @JohnKeates Feel free to share both the file and my email address to klanomath :) – Trond Mar 23 '15 at 16:12
  • @klanomath sorry, the 10 minute mailbox already expired :( Here is a new one: g154714@trbvm.com – John Keates Mar 23 '15 at 17:00
  • You should have the forwarded message. – John Keates Mar 23 '15 at 17:11
  • First spotted: the handsoff driver is still active. Without the control software it might block everything. I'm not sure where it's located, could be /Library/Extensions or /System/Library/Extensions. – John Keates Mar 23 '15 at 17:22
  • Second hit: resolv.conf contains the loop address (127.0.0.1) which pretty much disables DNS on your Mac. – John Keates Mar 23 '15 at 17:30
  • Ok, I removed it from system/Library/extensions: handsoff.kext but it didn't help. What do I do to resolve resolve.conf? – Trond Mar 23 '15 at 17:33
  • I created a complete answer thingy :) There are a bunch of strange DNS things happening on your mac, probably why it's not working correctly. – John Keates Mar 23 '15 at 17:44

11 Answers11

13

Here is a step-by-step guide for you:

  1. Temporarily disable any Firewall/Internet Security solution/packet filter on your Mac (like LittleSnitch/Hands Off!/Kaspersky Internet Security etc.)
  2. Connect to the administrative interface of your router with a working Mac.
  3. Make a note of the internal interface (probably 192.168.0.1 in your case)
  4. If your router uses MAC-filters to control access, check that the Mac in question isn't blacklisted or is whitelisted if you use whitelists. To get the MAC-address of a Wi-fi interface, open System Preferences -> Network -> Choose "Wi-fi" -> Advanced -> Hardware -> MAC Address on the Mac without internet access.
  5. On the Mac without internet access disable all interfaces in the network preferences pane except the Wi-fi interface by choosing the interface and clicking on the little gear -> "Make Service Inactive". You might have to unlock the lock in the left bottom corner first.
  6. Choose the Wi-fi interface and click 'Advanced'
  7. Choose the TCP/IP settings, choose to configure IPv4 manually and enter the proper IP-address, netmask and gateway address (enter the IP-address found in step 2 as gateway address). In your example this should be any address not already in use in the range of 192.168.0.2-192.168.0.254 as IP-address, 255.255.255.0 as netmask and 192.168.0.1 as gareway.
  8. Choose the DNS tab next to the TCP-IP settings.
  9. Enter 8.8.8.8 as DNS server. This DNS server is a public one from Google.
  10. Save/apply the settings
  11. Open Terminal.app
  12. Flush any existing routes by entering route -n flush several times.
  13. Flush DNS cache with dscacheutil -flushcache;sudo killall -HUP mDNSResponder. You have to enter your admin password to complete the task. This works with Mac OS X 10.9 (Mavericks) only. If another OS X is installed use the appropriate command.
  14. Now ping the gateway address and the DNS server with ping -c 5 192.168.0.1 and ping -c 5 8.8.8.8. The command sends 5 pings to the specified address. To stop pinging - if you didn't include the -c option - just enter ctrlC.
  15. If you get a successful answer, quit Terminal. If you didn't get an answer, enter ifconfig en1 and re-check the proper settings of your Wi-fi interface. en1 should be your Wi-fi interface.
  16. Return to the network preferences and reenable all other interfaces. Check that the Wi-fi interface is on top of the list. To reorder the list click on the little gear -> "Set Service Order..." and rearrange the interfaces.
  17. Now open a browser of your choice and try to connect to an arbitrary site.
  18. If you have internet access now, you may replace the Google DNS server with DNS-servers of your ISP or simply add them.

This guide didn't solve the problem.

After some very deep investigations (kudos also to John Keates) we found out that a misconfigured dnscrypt/dnscrypt-proxy was the culprit.

klanomath
  • 66,391
  • 9
  • 130
  • 201
  • Hello klanomath. Thanks for a nice guide, but I still cannot get online.. i get response when pinging, but it still won't let me browse the net or update apps. Any other thoughts on this issue? – Trond Mar 23 '15 at 10:52
  • I have tried both LittleSnitch and Hands Off!, but they have been uninstalled. I did ifconfig -a and got a long answer, anything particular you want me to look for? I'm writing this on a tablet, so it would take me the whole day to copy the response from ifconfig -a – Trond Mar 23 '15 at 12:40
  • I have edited the original post with the output of ifconfig -a. :-) – Trond Mar 23 '15 at 13:11
  • Unfortunately the other macbook belongs to a friend who is not here at the moment :s Thank you so much for trying to help me. Should I maybe do a search on my computer for any remains of LS and HO? If so, how do I do it? :P – Trond Mar 23 '15 at 13:25
  • It takes approximately a minute to get a response, then I get this: HTTP/1.0 400 Bad Request Content-Length: 54 Content-Type: text/html; charges=UTF-8 Dat: Mon, 23 Mars 2015 14:06:20 GMT Server: GFE/2.0 – Trond Mar 23 '15 at 14:09
  • @Trond Did you install a PF-GUI like Murus, IceFloor or PFLists previously? PF is a stateful packet filter software (~firewall) in Mac OS X since 10.7. – klanomath Mar 23 '15 at 14:22
  • I have never heard of any of the programs you mention, but I did have Sophos antivirus which I believe had a firewall component. It has been uninstalled. – Trond Mar 23 '15 at 14:33
  • 8.8.8.8 DNS gets me every time – zgc7009 Feb 14 '16 at 17:56
  • DNS 127.0.0.1 is not necessarily a problem. I have it because I run a local caching server. HUGE speed-up in converting names. But handoff and dnscrypt--could they be to blame for similar symptoms when they only happen with a minority of LANs? (see http://apple.stackexchange.com/questions/231801/troubleshooting-unusual-connection-situations-in-some-not-all-lans) – WGroleau Mar 21 '16 at 20:22
  • @WGroleau It gets a problem when the asking person doesn't mention it in the question... – klanomath Mar 21 '16 at 20:28
  • I had the same problem klanomath answer led me to just try clearing the DNS servers and replacing with 8.8.8.8 and that solved my problem the computer reset to the appropriate dns which was my home router. – Lindsey Jul 31 '17 at 02:04
  • I solved my problem just by following Step 1, In my case Sophos "piece of shiz-lalala" anti-virus software was the reason. – jason Sep 15 '19 at 01:08
10

After inspecting your configuration, it seems two factors might be in play here:

  • DNS
  • Firewall

A quick way to confirm a working internet connection but bad DNS is going to a website by using it's IP address rather than it's domain name. For example: http://91.198.174.192 which is a WikiMedia Foundation address. It should say something like "unconfigured domain name".

First, let's fix DNS. Go to System Preferences, Network and click the lock in case the panel is still locked. Next, go to your active network interface (probably Wi-Fi or AirPort), click Advanced and then the DNS tab. Clear out everything in there. The light-grey items are not mutable and you can just leave them in there, they are supplied via DHCP. Press OK and then Apply.

Internet could work at this point. If so: yay! If not, continue.

First, we need to know if DNS is now set correctly. The easiest way to do this is by opening a Terminal window (yep, the spooky app with letters only), and typing: cat /etc/resolv.conf

This should produce an output similar to this:

#
# Mac OS X Notice
#
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
#
# This file is automatically generated.
#
domain something
nameserver 192.168.123.1

The numbers after name server and the name after domain may vary. It is, however, important that nameserver does not get the number '127.0.0.1', because that won't work. If the number there is not 127.0.0.1, it's fine, and DNS is now set correctly.

Next, delete any extensions that no longer have their apps installed, such as the Handsoff extension that controls network traffic. I'm not sure what the exact name is, but it's located in either /System/Library/Extensions or /Library/Extensions. The first dash " / " means the root, or beginning of your hard drive. In most cases that's "Macintosh HD". If you are not sure how to get to the begin "/", use Finder -> Go -> Go To Folder form the top menu in Finder. Clear out the box, type a single slash (" / "), and press Go.

The extension might be called something like "com.metakine.handsoff.driver". Deleting that extension and then rebooting will clear out that problem. Internet should work after that.

John Keates
  • 2,700
  • 11
  • 15
  • IMO it's the dns-crypt-proxy/dns-crypt which probably redirects every dns request. That's the reason why resolve.conf contains the 127.0.0.1 though the network prefs contain the google DNS-server (8.8.8.8) (in SystemConfiguration/preferences.list->NetworkServices->8516C....->DNS – klanomath Mar 23 '15 at 17:58
  • Yeah, you are right. But still, it shouldn't kill DNS. For now, to diagnose the problem, getting dnscrypt out of the way would be a wise step. – John Keates Mar 23 '15 at 17:59
  • Hey and thanks for another well-explained answer. So here we go; I opened network preferences and removed everything in the dns pane. Funny thing is though that 127.0.0.1 automatically pops up in grey..? Then I opened terminal and typed cat /etc/resolve.conference and got the reply as you said. My two last lines reads: search home and nameserver (guess what) 127.0.0.1.. I searched through both of the folders, but could only find "handsoff.kext" in the System/Library/Extensions folder which I deleted. Now I will uninstall/delete dnscrypt, be right back with results! :-) – Trond Mar 23 '15 at 18:11
  • @Trond You don't have to uninstall dnscrypt, just configure it properly – klanomath Mar 23 '15 at 18:18
  • WOOOOHOOO!!!! :D I am finally online! Deleted DNSCrypt (I wasn't using it anyway) and now I am browsing the Web. THANK YOU SO MUCH @klanomath & John Keates, I would have gone mad without your super help! – Trond Mar 23 '15 at 18:26
  • @Trond Good to hear & happy surfin' ;-) – klanomath Mar 23 '15 at 18:28
  • Just a final question; How come dnscrypt didn't interfere on any other networks? – Trond Mar 23 '15 at 18:47
  • I guess we will never know :) could be an issue with the local subnet. Or maybe bad configuration for a specific ssid. – John Keates Mar 25 '15 at 23:40
  • @Trond how did you delete dnscrypt? i'm having a similar problem here http://apple.stackexchange.com/questions/268985/trying-to-turn-on-localhost-on-sierra-made-my-mac-unable-to-connect-to-internet?noredirect=1#comment337863_268985 – abbood Jan 16 '17 at 06:35
  • hey @Trond i tried everything you suggested.. no luck.. can you help me out here > http://apple.stackexchange.com/questions/268985/trying-to-turn-on-localhost-on-sierra-made-my-mac-unable-to-connect-to-internet?noredirect=1#comment337863_268985 – abbood Jan 16 '17 at 06:41
  • Thanks for this @JohnKeates, I was stepping through your instructions and only needed to get to the DNS tab under System Preferences > Network > Advanced > DNS and managed to see the DNS servers were set to Open VPN, I cleared, applied, and am up and running again. – Morgan Feeney Jul 12 '19 at 07:38
2

I fixed a similar problem (connect to router but no internet) by changing the DNS address in network preferences: It was 192.168.0.1 (which is the router ip for changing router settings) I changed it to 192.168.0.5 and my internet connection was fixed in seconds. Hope it works for you

Iman
  • 21
1

hey ive found out to fix mine. someone put a parental control on my router, if you unblock your device it should fix it!

kyle
  • 11
0

Check if the date in your computer is correct. This worked for me. Somehow it changed, and after i fixed it, the problem was solved. Cheers!

JKA
  • 11
0

My customer's MacBook Pro 6,1 got this symptom when it was updated to Sierra 10.12.4. After trying almost all steps above, and failing to fix after a 3-1/2 hour reinstall ('remaining' timer counted down from 5 minutes!) there was still connectivity with pings but no traffic getting through to Firefox, Safari, Mail or system connections (no App Store or updates).

The discussion of Extensions led me to the System>Library>Extensions folder where I found a 2010 copy of the AppleAirPort2.kext file. All I had to do to regain full connectivity was delete this file (backed it up of course) and reboot the machine! NOTHING ELSE WORKED. This fix worked first time. HOPE THIS HELPS SOMEONE...

0

I had the same lost internet problem when upgrading to Sierra. Could connect to my router but not the internet after upgrading to Sierra.

I checked cat /etc/resolv.conf in the terminal and the reply said there was no such file. Checked the etc folder and sure enough, no file. I checked another laptop of mine and it was there. (Actually it is an alias that leads to private/var/run/resolv.conf

I simply copied the resolve.conf file from my working laptop, placed it the /run folder and created an alias. I copied the alias to /etc/ and rebooted the computer. Then added a DNS server in the Network Prefs and did a terminal check with cat /etc/resolv.conf and Bingo! everything checked out.

Booted Safari and was online for the first time in days. I have upgraded a plethora of macs from El Capitan to Sierra with no problem until this little Macbook Air.

Monomeeth
  • 64,558
Dennis
  • 1
0

Reset network settings -> Delete and add WiFi back https://discussions.apple.com/thread/3446001

k4dima
  • 343
-1

Try turning off any anti-virus software you have on your computer. That worked for me.

-1

Problem solved TCP/IP DCHP was in manual mode (why? I don't know) Changed to automatic Voilà!

  • Welcome to Ask Different. We like answers to be more than just a single line. Ideally, you want to explain why your answer is *right." It also helps to provide links, citations, and/or screen shots. Please review our help section How to Answer on writing good answers to questions – Allan Sep 23 '16 at 20:50
-1

I had the same problem and somehow I fixed it by turning a VPN service on and off. It might sound weird but nothing else worked for me.