Monday, February 09, 2009

I dropped into a Starbucks this afternoon, all prepared to get some emails written and to get some work done between my Sunday afternoon and evening commitments. Everything was fresh in my mind and ready to go via the keyboard and onto the screen. I fetched my grande two-pump sugar-free vanilla skinny latte and sat down in the chair, opened the laptop and watched it wake up and connect to the AT&T wireless access point.

But much to my dismay nothing would load over the network. The AirPort icon in the status bar showed the name of the network and indicated that I was connected to the access point, but I had no connection to the Internet.

After a brief bit of trying over and over to load a web page, I checked the network preferences in the apple system preferences panel and found that I was not getting an IP address. The Mac was self-assigning a 169.* address, which is a non-routable local-only address. I tried restarting the AirPort card in the Mac, but that didn't help. I then found I was able to connect normally with my iPhone to the AT&T WiFi network and get a "real" IP address (192.x), so I quickly deduced that something was wrong with my Mac.

I had to give up on troubleshooting and head back out into the world, but I spent the rest of the day wondering if maybe there was something about the MAC address for my wireless card that AT&T had chosen to hate. After finishing my day of activities, I drove home this evening and fired my laptop back up. It connected to my home wireless network. But again, no IP address assigned. Hmm, definitely the laptop.

I started thinking now. What could be happening? Powering the AirPort on and off, shutting down the Mac and powering it back up, manually telling the network stack to renew it's DHCP lease - all these things did no good.

I finally decided to take a look at the Mac firewall logs. You'd think that would be the first place I'd look, being a security guy. They're kind of hidden in plain sight, a few layers deep in the Mac's preferences dialogs. You go to the System Preferences panel, in the Security section, then the Firewall tab, then click the Advanced button, and finally click the Open Log button. If logging isn't already turned on, you can enable it there, as well.

Sure enough, I looked in the log and found several examples of this (emphasis mine):

Feb 8 23:02:04 greg-hughess-macbook-air Firewall[39]: Deny configd data in from 192.168.0.1:67 uid = 0 proto=17
Feb 8 23:02:26: --- last message repeated 2 times ---

Ah hah... Apparently the firewall was refusing inbound connections initiated by the router as it tried to set up the DHCP address being requested by the laptop. The configd daemon is a service that handles configuration changes for various pieces of the system, mostly all network-related. Great, I had something to fix!

I first confirmed configd was in fact running, then deleted the firewall configuration file (located at /Library/Preferences/com.apple.alf.plist) and configured the firewall to temporarily allow all connections, and then back to allowing essential services. Sure enough, as soon as I made the changes the Mac was able to get a DHCP address from the router, and the network was back up and working.

I have no real idea how the firewall got messed up. At one point I had it set to configure access for specific services and apps, so that might have had something to do with it. But it's strange that this problem only started today. It's possible the configd process was denied by a rule, I suppose. Perhaps I hit a key on a pop-up dialog to deny firewall access to the daemon without even realizing it while typing?

At any rate, it seems to be working now (as evidenced by the fact that I am able to post this blog entry, of course) and hopefully it will continue to work as expected. Maybe this will help someone else troubleshoot a similar issue.



Add/Read: Comments [12]
Apple | IT Security | Tech
Monday, February 09, 2009 12:04:44 AM (Pacific Standard Time, UTC-08:00)
#  Trackback

Referred by:
snow leopard+dhcp+169 (www.google.co.in) [Referral]
+macbook +pro +ethernet +"self-assigned ip address" (www.google.com) [Referral]
mac firewall dhcp (www.google.co.uk) [Referral]
snow leopard airport timeout (www.google.com) [Referral]
mac self-assigned dhcp (www.google.com) [Referral]
how to fix self assigned ip address wifi snow leopard (www.google.com) [Referral]
Ethernet has a self-assigned IP address and will not be able to connect to the Internet. (www.google.com) [Referral]
snow leopard dhcp wireless (www.google.com) [Referral]
failure to renew dhcp mac (www.google.com) [Referral]
http://jtsblog.com/my-airport-connection-timed-out [Referral]
mac internet sharing dhcp 169 (www.google.com) [Referral]
snow leopard dhcp wireless problem (www.google.com) [Referral]
mac wireless connection timeout (search.yahoo.com) [Referral]
mac os x wireless settings "connection timeout" (www.google.com) [Referral]
snow leopard wireless dhcp (www.google.ca) [Referral]
self-assigned IP address wireless example (www.google.com) [Referral]
self assigned ip address snow leopard (uk.search.yahoo.com) [Referral]
remove self address ip mac (www.google.com) [Referral]
selfassigned IP address (us.m2.yahoo.com) [Referral]
airport self assigned IP address 169 will not be able to connect to internet (www.google.co.uk) [Referral]
"pro wireless connection problems" (www.google.com) [Referral]

More...
Sunday, May 17, 2009 8:19:46 PM (Pacific Standard Time, UTC-08:00)
Awesome find this just solved a problem one of my clients was having and they had talked to apple support for hours and no one thought of the firewall causing this issue!! thanks so much for posting this info!
Gina
Monday, May 18, 2009 5:54:06 PM (Pacific Standard Time, UTC-08:00)
This saved my sanity and my hair.
Rachel
Tuesday, May 19, 2009 10:05:41 AM (Pacific Standard Time, UTC-08:00)
Many thanks, this worked a treat.

Gareth
Tuesday, May 19, 2009 2:53:42 PM (Pacific Standard Time, UTC-08:00)
I'm having the same problem - but I never had the firewall enabled. I left home for about a week - and when I came back, my macbook (running 10.5.6) won't get an ip address. I'm having the same problem with both airport and ethernet connections to my cable modem or router. My friend's macbook, purchased at the same time and with the same updates installed, works fine (hence my ability to post). I've tried deleting all the relevant preferences files. I've tried rebooting. I've tried manually assigning an ip address. I've hit renew ip more times than I can count. Nothing seems to work. I've always been suspicious that there was something wrong with my airport card, as it takes my computer a long time (sometimes almost a minute) to recognize familiar networks - and even then won't connect automatically - but it didn't seem like that big a deal until it flat out stopped working. Any solutions I might not have thought of? Is it possible that I have a hardware problem?
Zach
Monday, June 01, 2009 9:25:42 AM (Pacific Standard Time, UTC-08:00)
Yep, I didn't go to the extent of this article but it worked!
Mike
Sunday, July 12, 2009 2:54:18 PM (Pacific Standard Time, UTC-08:00)
Many thanks, it helped!!
dg
Sunday, August 02, 2009 2:34:10 PM (Pacific Standard Time, UTC-08:00)
Great find! I turned stealth mode on because I could not find a way to disable it from local connections. I have been rebooting my router in order to make it go away, but it only worked for about a day or two. Hopefully, this will be the end of it.
Joseph
Sunday, August 02, 2009 2:37:06 PM (Pacific Standard Time, UTC-08:00)
I meant stealth mode off in my previous post.
Joseph
Tuesday, August 04, 2009 1:24:55 PM (Pacific Standard Time, UTC-08:00)
I found your website off google, after my computer was having the same problem as you discussed above. You are literally my hero. My school's tech department wasted five hours of my time and had no clue what was up. Thanks again, my computer is up and running!
Michelle
Monday, August 17, 2009 8:53:00 PM (Pacific Standard Time, UTC-08:00)
Thank you!! You saved me totally, I have tried everything, everything? EVERYTHING, but never thought about the firewall.
Johan
Thursday, August 27, 2009 6:16:22 PM (Pacific Standard Time, UTC-08:00)
To the other Gareth - hi !!

My brand new MaBook Pro 'decided' to start suffering from the Airport Self Assigned IP problem three days ago - refusing to cooperate with the wireless router.

I can't wait to get home and try this fix. Scary thing for me is the hundreds of sufferers out there but the lack of a definitive fix (or anything really) from the big Apple?

Wish me luck!!! Will let you know how I went.
Gareth
Sunday, August 30, 2009 5:48:05 PM (Pacific Standard Time, UTC-08:00)
:((

Apparently I am like ONE other person who suffered from this self assigned IP problem who does NOT have an ALF.PLIST (in /Library/Preferences/com.apple.alf.plist) to delete.

So the blissful three week honeymoon (with my first ever MAC) is over and divorce looms large. Worse still, I may have to go crawling back to the ex (Microsoft and Vista) all because of this.........

Very, very, very sad now.

Anyone from Apple can chime in anytime they like.
Gareth
Name
E-mail
Home page

Comment (Some html is allowed: b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview