Changing the range of addresses served to clients connected via Internet Sharing
This is specifically for Ethernet > Ethernet Sharing connections, rather than WiFi (it might work for WiFi but I haven't tested) - I thought the answer would best belong here, for Google.
Tested as working up to El Capitan 10.11.5
Apparently since Yosemite, adding just the SharingNetworkNumberStart
key is no longer sufficient.
Also, System Prefs caches the NAT file located at /Library/Preferences/SystemConfiguration/com.apple.nat
& will just overwrite your settings again, if you do things in the wrong order.
Actual addresses are, of course, your choice.
Switch off internet Sharing.
Close System Prefs-
In Terminal type these 3 commands
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 192.168.0.0 sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberEnd 192.168.0.20 sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkMask 255.255.255.0
-
Open System Prefs > Network
Select what is to be your shared port & set as followsConfigure IPv4: Manually
IP Address: 192.168.0.1
Subnet Mask: 255.255.255.0
Router: 192.168.0.1
Then in Advanced... > DNS add the same Router Address as DNS server, in this case 192.168.0.1OK, Apply.
Switch on Internet Sharing
Test your Bridge address in Terminal with ifconfig -a
& check the line inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
is what you expected.
Info worked from Mac OS Hints: Change the default subnet for Internet Sharing
Apparently, as you say, you need to modify the InternetSharing file, adding:
<key>AirPort</key>
<dict>
<key>40BitEncrypt</key>
<integer>0</integer>
<key>Channel</key>
<integer>0</integer>
<key>Enabled</key>
<integer>1</integer>
<key>Extreme</key>
<string></string>
<key>NetworkName</key>
<string>imacnet</string>
<key>NetworkPassword</key>
<data>cwB0AHUAYQByAA==</data>
<key>SharingNetworkNumberStart</key>
<string>10.0.99.0</string>
</dict>
It seems pretty straight forward.