View Full Version : Keep routing table after reboot
arveknudsen
May 14, 2008, 05:39 AM
How do you save changes when you make manual changes to OSX’s routing tables?
I have been adding neccesary network routes (with the terminal command line) and changing the default gateways, but whenever the machine is rebooted it loses all this info...
Any ideas?
thirdeyeopen666
May 14, 2008, 01:02 PM
How do you save changes when you make manual changes to OSX’s routing tables?
I have been adding neccesary network routes (with the terminal command line) and changing the default gateways, but whenever the machine is rebooted it loses all this info...
Any ideas?
This is for Tiger... not sure if it will work in Leopard:
http://www.webboise.com/persistent-ip-routes-in-mac-os-x-tiger/
MacsRgr8
May 14, 2008, 01:20 PM
You mean the "route add -net.."?
You know, I have run into this some time ago. I think the quickest way I fixed it was to put it into a script and made it a launch item...
EDIT: similar to the post above.. :-/
arveknudsen
May 19, 2008, 07:14 AM
But then the user need to type the root password when the script execute. I can not give the root password to the users.
merl1n
May 19, 2008, 07:41 AM
This is for Tiger... not sure if it will work in Leopard:
http://www.webboise.com/persistent-ip-routes-in-mac-os-x-tiger/
It should work in Leopard as well since this is core Unix stuff.
Also, on that same web page is another link (under Responses, from Rick - the second one down) to download an archive with the two example files (archive is called PersistentRoutes.zip and contains the unix script PersistentRoutes and the .plist file). The link is in his response "here" marked in red.
dimatkach
Oct 26, 2008, 09:31 PM
Just put this into /etc/rc.local:
/sbin/route add -net <network> <gateway>
It will run as root on startup, no need for the user to enter password
arveknudsen
Oct 28, 2008, 01:33 PM
Thanks! I will try this.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.