I’ve been finding myself using the internet connection sharing feature in OSX a lot lately due to some of the micro-computing projects I’m working on and ran into an annoyance. The default subnet used by this service is 192.168.2.0/24 which just so happens to be the exact same subnet as some of my internal home equipment. Since I’m not really interested in readdressing my lab domain directory servers for the somewhat infrequent work on my Raspberry Pi, I hunted for a way to change it.
Make sure Internet Connection Sharing is turned off and the System Prefences app is closed. Then open up your favorite terminal and enter this one simple command:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 192.168.255.1
Substitute the 192.168.255.1 starting address for whatever you’d like. If you feel the need to change the network size larger or smaller, I’m sure you could poke around in that plist a little more to figure it out.