[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"
 

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!