On Yosemite, you'll need to set SharingNetworkNumberEnd and SharingNetworkMask as well.
#editing file /Library/Preferences/SystemConfiguration/com.apple.nat.plist
defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 172.16.42.0
defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberEnd 172.16.42.254
defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkMask 255.255.255.0