[SOLVED] 2 VMs in same subnet unter NAT

hashime

Renowned Member
Aug 9, 2014
36
0
71
Hello

I am trying to put 2 VMs behind NAT but inside the same subnet, so they can directly talk to each other.
How would i do this?
 
Nvm, found it.
If someone has a similar problem:

create a new bridge with an internal IP and point the VM's Nic to that bridge. Then enable nat with
"iptables -t nat -A POSTROUTING -s '[internal network/xy]' -o [device with external ip] -j MASQUERADE"