MacOS – No internet access on MacBook Air, though I can connect to networks


(Edited after rebooting everything again.)

I'm unable to get my MacBook Air (mid-2011 model, running OS X Lion 10.7.4) connected to the internet. I've tried to get online through tethering both an iPhone 4 (through USB, wifi and bluetooth) and a Samsung Galaxy S2. I can use the internet connection created by both of these phones on other computers. I'm mainly testing on wifi as that is my primary network connection source, but bluetooth and USB are also failing. The same applies to Ethernet.

I can connect to any network in range, and when I plugged in an Ethernet cable for testing, I could connect to the corporate network. All status indicators in Network Preferences are green; I get assigned an IP address, but I still can't browse the web, and instead get a "You are not connected to the Internet" message.

The issue is not specific to any user account (confirmed by creating brand-new user accounts and testing from there).

I can't ping anywhere (all requests timeout), but I can lookup any site (including internal ones) from Lookup in Network Utility, and receive a response.

I've exhausted every avenue I could find online. I've tried removing/renaming the SystemConfiguration plists, removing and re-adding every network and network interface, flushing the cache, checking the hosts file and making sure it's only the default values, turning everything off and on again in various sequences and multiple times, swapping out cables, etc.

Running ifconfig from Terminal gives me:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet netmask 0xff000000 
    inet6 ::1 prefixlen 128 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
    ether b8:8d:12:54:64:40 
    inet6 fe80::ba8d:12ff:fe54:6440%en1 prefixlen 64 scopeid 0x4 
    inet netmask 0xffff0000 broadcast
    media: autoselect (100baseTX <full-duplex>)
    status: active
    ether 10:40:f3:8a:97:a4 
    inet6 fe80::1240:f3ff:fe8a:97a4%en0 prefixlen 64 scopeid 0x5 
    inet netmask 0xfffffff0 broadcast
    media: autoselect
    status: active
    ether 02:40:f3:8a:97:a4 
    media: autoselect
    status: inactive

It was working fine when I left work a few days ago, then when I arrived for work the next day all my network settings had been cleared and this issue occurred.

I'd be very grateful for some ideas as I've spent way too long trying to figure this out. Thanks 🙂

Best Answer

Days later, I've finally figured it out. The file located in /System/Library/LaunchDaemons/ was corrupted, and for some reason attempts to reset it were not being saved.

I copied this file from a macbook that was able to connect, and, since I'm using Lion, added in the option to allow appending search domains by inserting the line


in the following position:


I then restarted the machine. This appeared to do the trick.