This is my current network setup on host one (vm01). I have a public network available over vmbr0 and a private network connected to a nic over vmbr1 (used for cluster traffic and VM private network via a vlan). Now I want to NAT the vlan onto vmbr0 so that the vms can have limited internet access. I've tried to do this multiple times now but I just can't get it to work...
The VM's can reach themselves and vm01 (10.0.0.1) perfectly using the vlan, but no packets are being NATed :c
Code:
auto lo
iface lo inet loopback
iface enp2s0f0 inet manual
iface enp2s0f1 inet manual
iface ens2f0 inet manual
iface ens2f1 inet manual
auto vmbr0
iface vmbr0 inet static
address 109.230.xxx.xxx/29
gateway 109.230.xxx.xxx
bridge-ports enp2s0f0
bridge-stp off
bridge-fd 0
# bridge-ports ens2f0
auto vmbr1
iface vmbr1 inet static
address 10.1.0.1/16
bridge-ports ens2f1
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/16' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/16 ' -o vmbr0 -j MASQUERADE
#10 gig cluster network
auto vmbr1.10
iface vmbr1.10 inet static
address 10.0.0.1/16
The VM's can reach themselves and vm01 (10.0.0.1) perfectly using the vlan, but no packets are being NATed :c
Last edited: