The computer is connected to the network, say 192.168.0.0/24. There is a VPN connection to another network 192.168.10.0/24.
How to make so that when connecting a VPN route is automatically added to the network 192.168.40.0/24?
I understand that it would be possible to do this:
route add -p 192.168.40.0 mask 255.255.255.0 <IP VPN> The problem is that - it changes with every connection.