PDA

View Full Version : DHCP/Firewall issues


houltmac
09-03-2008, 02:05 AM
Since there is no OS area I will post here I guess. It's definitely not hardware so this will have to do. Since I am lazy I will just copy and paste from the blog, I hope no one minds. It's long, but explains what I have done and where I am in resolving the issue, but in short:

Since using my OS install with another machine my OS firewall is blocking all DHCP offers and so will not get a DHCP address unless it's turned off. Very annoying. I have tried a bunch of stuff to no avail. Any ideas would be appreciated.

From the blog:

Today I took my MacBook Pro to work as usual. I get in a couple of hours early to tidy up, do paperwork and generally prep for the day and while I do so I listen to podcasts, occasionally finish a movie and check my email. Itís useful during the rest of the day to have it on to catch spam before it gets to my iPhone as well as to listen to music. Today it turned out to be a bad idea.

Having repaired a Mac I needed to test it and didnít have anything it could boot to. This is fairly unusual but since it was only one revision away from my MacBook Pro I decided to use my machine in target disk mode to allow the testing of customers machine. All went well until I rebooted. I just could not get a DHCP address. Instead the machine was self-assigning IPs and so I couldnít access the network or the internet.

Having realised that it was only my Mac that was having issue I also noted that it was happening both with Airport and ethernet connections. I started looking into it by creating new locations, checking other/new user accounts, different network ports, restarting the DHCP server, repairing permissions, resetting the PRAM and PMU, cleaned caches and ran CRON jobsÖ nothing would work. If I manually assigned an IP address then all was well, so the hardware was working. The connections were active, so it wasnít that either. Checking the DHCP server log it was frantically shoving DHCP offers my way but my Mac just wasnít accepting them.

I did a bit more poking around, assuming it must be the OS and have something to do with booting a different machine to it. I got a hint that there might be something up with the firewall so I turned it off and within seconds I got an IP address DHCP. I turned the firewall back on and it was still good. Having restarted however the issue returned. I started testing with the settings such as Stealth mode and removing the only preference file I could find that had anything to do with the firewall (/Library/Preferences/com.apple.alf/plist). No joy. every time I restarted with the firewall on it failed to get a DHCP address until the firewall was turned off (accept all incoming connectionsĒ).

It seemed very strange and then I found a similar issue buried on the Apple Discussions website which pointed at a bunch of files in /usr/sbin which could be set in the allowed list. Having tested with different configurations it appeared as if just having configd explicitly allowed incoming connections would allow me to retain my DHCP negotiation after a restart. I thought I had fixed the issue and saved a standard Archive & Install. Happy in my temporary fix I walked home thinking I would blog about this later.

Well itís now later and having got home the same issue is reoccurring no thanks to configd. If anyone has some ninja moves for this outside of an Archive & Install (I donít have my disks here or at work) then please, please email me. Itís driving me nuts now.

njstaticuser
09-05-2008, 03:23 AM
Try removing the /usr/libexec/ApplicationFirewall/com.apple.alf.plist
also try moving the /Library/Preferences/com.apple.nat.plist and the
and as a last resort, move the /Library/Preferences/SystemConfiguration

I would also do a "sudo ipfw show" in the Terminal to see if the BSD level firewall isnt't blocking anything.