I am using openfortivpn to connect to a remote network. Unfortunately the remote infrastructure has a lot of subnets, some of which conflict with my local ones. There are only a couple of subnets I need connectivity to (which don't have conflicts). It seems that openfortivpn only accepts all routes or none from the gateway server.
To address this, I added my own script in /etc/ppp/ip-up.d/9000-myvpnlink (-rwxr-xr-x) and a corresponding one in ip-down.d/:
#!/bin/bash ip route add to 192.168.90.0/255.255.255.0 via $4 dev $0 ip route add to 192.168.92.0/255.255.255.0 via $4 dev $0 echo 1>/proc/sys/net/ipv4/ip_forward
However the routes do not appear / forwarding is not enabled. When I check the logs I see...
Oct 15 15:05:45 liv-i02-sg-ras NetworkManager: <info> [1571148345.2093] device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
How do I get my script to run? Is there a more sensible way to enable the routes?