Internet sharing without DHCP

internet-sharingNetworksnow leopard

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.

Best Answer

From the bootpd man page:

For each of the properties dhcp_enabled, bootp_enabled, old_netboot_enabled, netboot_enabled, and relay_enabled, the corresponding service can be enabled or disabled for all interfaces, or enabled for just a specific set of interfaces. To enable or disable globally, use a boolean value true or false respectively. To enable just for a specific set of interfaces, use either a string, for a single interface, or an array of strings, one element for each interface.

 For example, to enable DHCP on interfaces en0 and en1, disable BOOTP on all
 interfaces, enable NetBoot on en1, and enable relay agent on interface en1,
 /etc/bootpd.plist could contain:
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
         <key>bootp_enabled</key>
         <false/>
         <key>dhcp_enabled</key>
         <array>
                 <string>en0</string>
                 <string>en1</string>
         </array>
         <key>netboot_enabled</key>
         <string>en1</string>
         <key>relay_enabled</key>
         <array>
                 <string>en1</string>
         </array>
 </dict>
 </plist>

To disable dhcp globally, use:

    <key>dhcp_enabled</key>
    <false/>

Don't forget to send a SIGHUP (kill -1) to bootpd after making changes to the configuration file.