jp498
10-14-2008, 07:46 AM
I have been searching how to do a static route on an NS5. It has 3.1.1 firmware on it.
http://forum.ubnt.com/forum/viewtopic.php?t=1122&highlight=static+route
I can do it, but not make it survive a reboot.
I used vi to create a /etc/rc.d/rc.poststart file containing
/sbin/route add -net 10.10.1.0 netmask 255.255.255.0 gateway 10.10.0.3
usually I have to chmod a file before it works as a script, but chmod is not present on the NS5. I can sh rc.poststart and it creates the route.
Then I did a cfgmtd -w and used the web interface system tab to reboot it. After it comes back up the rc.poststart file is gone and the route is not present.
What do I need to do to make this persistent?
I would suggest this be added to the GUI at some point. I like linux CLI and don't mind using it for more things if the CLI were better documented for NS. Thanks!
Update. I have tried putting the file in /etc/persistent with no luck either.
http://www.midcoast.com/~jp/staticroute.png
http://forum.ubnt.com/forum/viewtopic.php?t=1122&highlight=static+route
I can do it, but not make it survive a reboot.
I used vi to create a /etc/rc.d/rc.poststart file containing
/sbin/route add -net 10.10.1.0 netmask 255.255.255.0 gateway 10.10.0.3
usually I have to chmod a file before it works as a script, but chmod is not present on the NS5. I can sh rc.poststart and it creates the route.
Then I did a cfgmtd -w and used the web interface system tab to reboot it. After it comes back up the rc.poststart file is gone and the route is not present.
What do I need to do to make this persistent?
I would suggest this be added to the GUI at some point. I like linux CLI and don't mind using it for more things if the CLI were better documented for NS. Thanks!
Update. I have tried putting the file in /etc/persistent with no luck either.
http://www.midcoast.com/~jp/staticroute.png