private masquerading lan using venet only


New Member
Dec 2, 2011
Hi there. I have a host with several containers and I want to create a single private lan for the containers that masquerades behind the public IP address of the host. The host has two physical interfaces. After the initial proxmox installation, the host is configured as follows:
- vmbr0 bridged to eth0 with public IP address
- eth1 inactive
- venet0 active (no ip address)

I appreciate, one approach is to create a second bridge between eth1 and vmbr1 and make vmbr1 the gateway for the private lan. I assign veth devices to the containers for this. I've done this fine using the following iptables rules:
iptables -t nat -A POSTROUTING -o vmbr1 -j MASQUERADE
iptables -A FORWARD -d -o vmbr1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s -i vmbr1 -j ACCEPT
iptables -A FORWARD -i vmbr0 -o vmbr1 -j ACCEPT

*My question is as follows*: is it possible to do this using a private network where the containers only have manually assigned venet addresses. I've tried to replicate the above approach but I can't seem to achieve connectivity between the private lan and the outside world. I've read all the material on the openvz wiki but it doesn't appear to cover this exact scenario in detail.

I guess maybe I need to understand the vnet setup better, for example is the vnet0 on the host one end of the the point-to-point connection between each container with a venet and the host?


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!