I am trying to add persistent routes to my Debian box, which I am using as VPN server.
I am currently using "ip route" commands to add the routing. Here's an example of a command that I use:
ip route add 192.168.111.0/24 via 192.168.10.1 dev ppp0
ip route add 192.168.110.0/24 via 192.168.10.1 dev ppp1
The problem is that everytime the server restarts, or one of the connections get disconnected, it gets reconnected with a different interface #, which makes the previously added route command invalid already. I need a way to keep the routing valid, even when the interface # changes.
I have found a similar question, but the solution here is for Windows, not for Debian/Linux:
How to add persistent route for 2 VPN connections when interface # varies?
I would appreciate it if someone could point me to the right direction of getting the same solution but for Debian.
Thanks!