xkostas Posted September 29, 2006 Share Posted September 29, 2006 I want to ask , how can i add a static route to my 10.4.7 system ? I give in a terminal "route add 192.0.0.0 192.168.0.1" and it works. It add's a gateway to my stantard configuration i have in the System Prefference, but when i reboot the route has gone. Is there a parameter like the "route add -p" of Windows ? Link to comment Share on other sites More sharing options...
Infamous Posted September 29, 2006 Share Posted September 29, 2006 I'm interested in this too... Link to comment Share on other sites More sharing options...
Rammjet Posted September 29, 2006 Share Posted September 29, 2006 Is there a parameter like the "route add -p" of Windows ? In Terminal, type: man route Link to comment Share on other sites More sharing options...
xkostas Posted September 29, 2006 Author Share Posted September 29, 2006 I did. I have read all the man but cant find nothing. There is a "static" command but when i reboot the extra gateway is gone. Link to comment Share on other sites More sharing options...
Rammjet Posted September 29, 2006 Share Posted September 29, 2006 Until you solve the problem, one way might be to create an Applescript to set the route command at every boot, and set that to run at boot. Go to your Applications -> AppleScript folder and double-click on "Script Editor" Copy and paste the following script into Script Editor do shell script "route add 192.0.0.0 192.168.0.1" Press "Compile" to verify the code. Save the script as an application as follows: 1) Go to File menu and select "Save As..." 2) Give your application a name (like RTE) 3) Select a place to put it (I recommend the Applications folder) 4) Select File format: application bundle * 5) Check the "Run Only" button 6) UN-Check the "Startup Screen" button 7) Press "Save" 8) Quit Script Editor (* Seems that saving it as an application gives it a PPC wrapper that requires Rosetta. Saving it as a bundle gives it an Intel wrapper, so start-up time should be faster as a bundle, even though it doesn't actually have to be a bundle.) Go to where you saved the application and double-click it to verify that it runs correctly. If it works, set it as a start-up item: - Go to System Preferences -> Accounts - Click on the Login Items tab - Click the plus (+) button - Find the application and press the Add button Reboot to verify that the start-up item works Link to comment Share on other sites More sharing options...
GeeBee75 Posted September 11, 2008 Share Posted September 11, 2008 OSX is Unix based at its core. I think OS9 migrants sometimes forget this fact. Just add a line to /etc/rc.local and you're done. No screwing around with long-winded instructions with /Library/StartUpItems, etc etc. IE: root# cat /etc/rc.local route add -net 172.22.0.0 127.0.0.1 Give that a try, should work fine. -Glenn Link to comment Share on other sites More sharing options...
Recommended Posts