::.2026.10.26 . writing
Two bridges for a Proxmox lab: one NAT, one isolated
My 3-node Proxmox cluster is up (that’s the build post, the order mattered there more than the commands). Now that I can actually put VMs on it, the question was where their traffic goes, and the answer has to fit inside a real constraint: each node has one 1GbE NIC, so the cluster, the management traffic, and every VM packet all share one physical port. I wanted lab networking I could make mistakes in ‘cause I will, on purpose some days, without touching the bridge everything already depends on. Two new bridges did that for me: one with a way out, one with no way out at all.
vmbr0 stays alone
vmbr0 is the existing home LAN bridge. It carries the cluster, it works, I’m not touching it. Anything I break from here on, I want to break on a bridge I built for breaking (that’s the same logic as keeping a lab copy of prod in your changeset before you ever consider the real one).
So the design is three bridges per node. vmbr0 stays exactly as it was. vmbr1 gets a host IP and masquerades out through vmbr0, so lab VMs that need internet can reach it. vmbr2 gets nothing, no IP, no physical port, it exists only so isolated labs can build an island where a firewall or router VM is the gateway.
That’s the whole plan. The rest is typing it the same way on all three nodes.
The numbering
My home LAN is 192.168.4.0/22, so the lab subnets are 10.10.N.0/24, where N is the node number: 10.10.1.0/24 on pve1, 10.10.2.0/24 on pve2, 10.10.3.0/24 on pve3. Overlap between the home range and the lab range would have been the kind of bug that eats an afternoon, so picking a totally separate space was the cheap insurance here.
The nice side effect of N being the node number: the same config applies on all three nodes in one command, changing only N, and you always know which subnet you’re looking at because the second octet is the node. Remember the node number.
The config
Backup first, then append the two bridges and reload. Set N to the node number before running:
N=2
command -v iptables >/dev/null || apt install -y iptables
cp /etc/network/interfaces /root/interfaces.bak
cat >> /etc/network/interfaces <<EOF
auto vmbr1
iface vmbr1 inet static
address 10.10.${N}.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s 10.10.${N}.0/24 -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 10.10.${N}.0/24 -o vmbr0 -j MASQUERADE
auto vmbr2
iface vmbr2 inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
EOF
ifreload -a; echo "exit: $?"vmbr1 handles two runtime bits in post-up lines, ip_forward and the NAT rule, and it cleans both up on post-down, so removing the stanza later doesn’t leave a rule half-rotting in the table. On an old Cisco the temptation to leave a stray NAT line is real.
The wrong command I ran first
With the config written, my first verification attempt was this:
ip -br addr show vmbr1 vmbr2And the answer was:
Error: either "dev" is duplicate, or "vmbr2" is garbage.ip addr show takes ONE interface name. Once that’s in your head you can’t unsee it, and I’ve typed show run int with two interfaces plenty of times on a Cisco to deserve the reminder.
So the better check is wider instead of narrower:
ip -br addr | grep vmbrAnd THAT result told the real story: none of the three nodes had vmbr1 or vmbr2 yet, and ip_forward was still 0. So I applied the config, then confirmed the bridges on all three nodes and moved on.
Verification
Three separate commands, nothing fancy:
ip -br addr | grep vmbr
sysctl net.ipv4.ip_forward
iptables -t nat -S POSTROUTING | grep 10.10Expected on pve2: vmbr1 up with 10.10.2.1/24, vmbr2 up with no IPv4 address, net.ipv4.ip_forward = 1, and a MASQUERADE rule for 10.10.2.0/24 out vmbr0.
NO-CARRIER is not broken
One thing that caught my eye after applying: a bridge with no ports and no attached VMs can show DOWN or NO-CARRIER, and vmbr2 looks permanently “dead” right now. That’s normal, it has no carrier and nothing plugged into it (an uplink-less switch sitting on the bench, but that’s the point). It comes up when a VM connects. Trust the show command, not the gut feeling that DOWN means you broke something.
The part I haven’t proven yet
NAT out through vmbr0 hasn’t been tested with a real VM. The bridges exist and the rules are in the table, but I’m not claiming outbound lab traffic works, only the config is there waiting for a VM.
Planned test, once a VM is on vmbr1 with IP 10.10.N.x/24, gateway 10.10.N.1, and a DNS server: from the VM, ping -c 2 1.1.1.1 and then curl -I https://example.com, and on the host, iptables -t nat -L POSTROUTING -v -n to watch the packet counters climb (or refuse to, which is also an answer).
If that works, the next fun part is building labs on vmbr2 where I have to be the network’s brain, i.e. a router VM inside the lab itself.
Recap
- Problem: Need lab VM networking I can break without touching the production
vmbr0bridge. - Design:
vmbr1NATs lab VMs out through the home LAN;vmbr2is isolated with no IP and no ports. - Build: Created both bridges with the same config on all three nodes; NAT rule on vmbr1; verified with
NO-CARRIERunderstood as expected. - Tradeoffs: Single NIC carries everything; vmbr2 stays unproven until a VM lands on it.
- Results: Config in place on every node; NAT proven later by the subnet-router LXCs.
- Reproduce: Proxmox node; bridge config only.
- Takeaway: Put experiments on bridges built for breaking.