cloud-init multiple interfaces

churnd

Active Member
Aug 11, 2013
43
2
28
Is there a way to set policy based routing rules via cloud-init if a VM is using multiple interfaces? Usually it'd involve something like this in /etc/network/interfaces or some such file in /etc/network/interfaces.d/:

Code:
iface eth1 inet static
   address 10.10.0.10
   netmask 255.255.255.0
   post-up ip route add 10.10.0.0/24 dev eth1 src 10.10.0.10 table rt2
   post-up ip route add default via 10.10.0.1 dev eth1 table rt2
   post-up ip rule add from 10.10.0.10/32 table rt2
   post-up ip rule add to 10.10.0.10/32 table rt2

with a table named "rt2" added to /etc/iproute2/rt_tables
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!