static route LXC Ubuntu 18.04 container

eduardo2308

New Member
Aug 26, 2020
3
0
1
55
How to add a static route to an LXC container with Ubuntu 18.04, since the network configuration is no longer in the interfaces file
 
hi,

on the GUI select the container and go to Resources -> Network
 
i want to do this: ip route add {NETWORK/MASK} via {GATEWAYIP}
before you put it in the interfaces file to be persistent
 
oh sorry, i misunderstood.

to make custom network interfaces in the container you can make PVE ignore it: http://pve.proxmox.com/pve-docs/pve-admin-guide.html#_guest_operating_system_configuration

like touch /etc/.pve-ignore.interfaces will make PVE not modify the interfaces file and your changes should be kept.

be aware that most our ubuntu containers use systemd-networkd to configure networking
No, I would like to make custom routes for the existing interface. And make them persistent after reboot.