Can't connect to Internet except via a VPN [duplicate]

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


Solution 1:

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.

Solution 2:

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.

Solution 3:

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

Solution 4:

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