permanent static route

If you don't know where to post, post here.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
ikookmaar
Starting Member
Starting Member
Posts: 38
Joined: Tue Mar 12, 2019 11:29 pm

permanent static route

Post by ikookmaar »

Can anyone tell me how to make a static route (back to my VPN client through the LAN adress of the VPN router) permanent on the Toon?
I did a # route add -net 10.0.8.0 netmask 255.255.255.0 gw 192.168.1.3
This works fine, but where or how should I add it to make it survive reboots?
B.T.W. it should not affect my default gateway (since that is a seperate device with another address)
Thanks...!
ikookmaar
Starting Member
Starting Member
Posts: 38
Joined: Tue Mar 12, 2019 11:29 pm

Re: permanent static route

Post by ikookmaar »

Think I just fixed it by adding to /etc/network/interfaces (at the bottom of the section # Wireless LAN interface:

Code: Select all

post-up route add -net 10.0.8.0 netmask 255.255.255.0 gw 192.168.1.3
and by restarting the network after that:

Code: Select all

# ifdown wlan0 && ifup wlan0
test it:

Code: Select all

# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
10.0.8.0 192.168.1.3 255.255.255.0 UG 0 0 0 wlan0
0.0.0.0 192.168.1.1 0.0.0.0 UG 10 0 0 wlan0
[/code]
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: permanent static route

Post by TheHogNL »

That file will most probably be overwritten by Toon apps at next reboot or network change.
See also viewtopic.php?f=102&t=12347&hilit=static&start=15

You need to add the route using another startup file, or add it to the udhcpd startup files
Member of the Toon Software Collective
Post Reply

Return to “Toon miscellaneous”