The VLAN of eth0 holds 2 IP nets, from the machine with IP 10.64.0.101/27 (eth0@machine-1) I used to connect to the openVPN server at 10.0.0.41/27 (eth0@machine-2) with the IP range 192.168.0.0/24.
The following sniplet in the /etc/network/interfaces:
post-up /sbin/route add -net 10.0.0.32/27 dev eth0 post-up /sbin/route add -net 192.168.0.0/24 gw 10.0.0.41
worked fine. Of course machine-2 with 10.0.0.41 also had post-up /sbin/route add -net 10.64.0.96/27 dev eth0 in its /e/n/i and ip forwarding enabled.
How to translate it into netplan?
My first shot was
- to: 10.0.0.32/27 via: 10.64.0.101 on-link: true - to: 192.168.0.0/24 via: 10.0.0.41
Kind Regards Maniac
PS: growing the nets to /9 is not an option...
PPS: Yes, anycasts will be visible on both IP nets.