I've set up proxmox in the google cloud.
For each external IP I have to set up different network and policy routing.
It works fine but I wasn't able to make the rules work during boot.
If I say in the terminal
ip route ad...
ip rule add ...
it works fine.
But when I put it to /etc/network/interfaces as "up" with an iface it doesn't work. Even more, there are no second, third etc ifaces in the /etc/network/interface.
I've tried to put "ip route|rule" commands in /etc/rc.local. I tried to put it in as systemd startup one-time service. I made a delay for the "ip route|rule" to start. Nothing. iptables works ther but ip route no. In the same setup on a physical server it works, in the google virtual machine no.
If I do the "ip route" manually it works. With autoboot no.
Maybe I do the wrong thing? Maybe there is a simple right way to put the "ip route" in the autoboot?
For each external IP I have to set up different network and policy routing.
It works fine but I wasn't able to make the rules work during boot.
If I say in the terminal
ip route ad...
ip rule add ...
it works fine.
But when I put it to /etc/network/interfaces as "up" with an iface it doesn't work. Even more, there are no second, third etc ifaces in the /etc/network/interface.
I've tried to put "ip route|rule" commands in /etc/rc.local. I tried to put it in as systemd startup one-time service. I made a delay for the "ip route|rule" to start. Nothing. iptables works ther but ip route no. In the same setup on a physical server it works, in the google virtual machine no.
If I do the "ip route" manually it works. With autoboot no.
Maybe I do the wrong thing? Maybe there is a simple right way to put the "ip route" in the autoboot?