Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to setup my iMac running 10.6 to be a wireless bridge. I have it working, but I need to disable DHCP and let my network's DHCP server provide an IP for the connected device(s). I can't seem to find a way to disable DHCP in Internet Connection Sharing. Does anyone know if this is possible? I'm guessing there's a key one could set in /Library/Preferences/SystemConfiguration/com.apple.nat.plist, but I can't find it. I checked the man page for InternetSharing and it doesn't mention anything useful, except changing the subnet that the DHCP server uses.

share|improve this question
    
AFAIK, OS X Internet Sharing only does NAT, not true bridging. So the devices using your iMac for connectivity are on their own private network, and your iMac acts as a router. Because of this, the connected devices need to get an IP from your iMac. They wouldn't be able to contact your existing DHCP server. I'm not familiar enough with the guts of Internet Sharing to be certain, but that's my best quasi-informed guess. –  robmathers Sep 11 '12 at 18:40
add comment

1 Answer 1

InternetSharing is performing 2 tasks:

  • dynamically providing an IP address to devices connected on the secondary network interface (bootpd)
  • managing the IP addresses translation (NAT) for these dynamically attributed addresses (natd on Snow Leopard & natpmpd on Lion)

InternetSharing doesn't let you configure a MacOS X as an IP bridge. See man InternetSharing (available on Snow Leopard but not on Lion).

This would be a bad idea: most notably because of the risks involved with a plain bold transparent bridge: Internally InternetSharing is performing a:

sysctl -w 'net.inet.ip.forwarding=1'

which permits any IP traffic to go through. To alleviate this problem, only IP addresses attributed on the secondary interface through bootpd and translated through natd or natpmpd are correctly translated to the outside.

share|improve this answer
    
Thanks for your response, Daniel. Two questions: (1) What's your level of confidence that InternetSharing doesn't allow one to disable DHCP (and can you provide any evidence/resources)? (2) Can you please elaborate on why you feel this would be a bad idea? What are the risks of which you speak? Again, evidence and references would be appreciated. Thanks –  Matthew Boynes Sep 12 '12 at 2:01
    
I tried to improve my explanations thanks to your questions. –  daniel Azuelos Sep 12 '12 at 8:40
    
The man page specifically says, "Details of the com.apple.nat.plist ... are not completely documented here," so it's entirely possible that there's a setting that would disable DHCP. Unfortunately, we're still left without hard evidence on whether or not this can be done. Thanks for adding detail all the same –  Matthew Boynes Sep 12 '12 at 12:52
    
In fact I went further than just reading the disclaimer within the man page ;). I'm pretty sure there is no backdoor to debug without forking bootpd. But, at least, you may try the -d option within the plist. –  daniel Azuelos Sep 12 '12 at 18:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.