Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Much simpler way to do this, using `defaults` command in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Much simpler way to do this, using `defaults` command in Terminal
Authored by: daimoh on Jul 23, '09 02:28:07AM

using the "defaults write" stuff worked fine for me, in that it added the relevant line to the file. However, it didn't add it under NAT as the OP mentioned.

So, I used the plist editor that came with XCode, but everytime I restart Internet Sharing, it loses the extra key I put in - it defaults back to what it was before.

How do you make that setting stick?

[ Reply to This | # ]
Much simpler way to do this, using `defaults` command in Terminal
Authored by: ka9lrn on Aug 06, '10 02:14:44AM

I was having the same problem. I found the fix. If the information is in memory when you start/stop Internet Sharing, the file on disk gets written over both when Internet Sharing is started and stopped. I stopped Internet Sharing, changed the file, then rebooted the machine prior to restarting Internet Sharing. After the reboot, it had to get the information from the file. So, the new address information was retained and kept in memory to be written out when it stopped again.

BTW, editing the binary is not necessary. The defaults command worked great with the modified write per Bigtoad. (Don't forget to prepend "sudo" to the example.)

[ Reply to This | # ]