Change Subnet with Internet Sharing on OS X

The default subnet that is used with Mac OS X when you’re using Internet Sharing (aka natd) is 192.168.2.  However, you can override this value by editing the /Library/Preferences/SystemConfiguration/com.apple.nat.plist.  If there is no SharingNetworkNumberStart key defined in the file then you can add one to the NAT dictionary of the property list.  This can be done using the defaults command as follows (assuming a new subnet of 10.10.10):

defaults write /Library/Preferences/SystemConfiguration/com.apple.nat SharingNetworkNumberStart 10.10.10.1

3 Comments

  • Pingback: Using my PowerMac as a server? - MacNN Forums

  • April 13, 2012 - 5:46 pm | Permalink

    It seems this does not properly nest the SharingNetworkNumberStart key within the NAT dictionary. If you use this format, it does:

    defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 192.168.58.1

    HOWEVER, for me to get this to stick/work, not only did Internet Sharing have to be off, System Preferences had to be quit as well, as it seemed to be caching the plist somehow.

  • Pingback: » OS X: How to Setup NAT on Lion and Mountain Lion

  • Comments are closed.