Bridge + NAT not working

gtrovato

Well-Known Member
May 16, 2019
30
2
48
56
Hi All,

I've set bridge + NAT on my Debian server with Proxmox 6.1.2 (Proxmox installed manually over Debian).
This is my interfaces file:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
address 62.75.216.143
netmask 24
gateway 62.75.216.1
bridge-ports eth0
bridge-stp off
bridge-fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.70.1
netmask 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 '192.168.70.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.70.0/24' -o eth0 -j MASQUERADE
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1


I've created a guest with Ubuntu 16.04 with IP address 192.168.70.250 and gateway 192.168.70.1, bridged with vmbr1.
All Firewall are disabled.
From Ubuntu guest I can ping the public IP address of the host (62.75.216.143) but ping to Internet doesn't work!

Any help?

Thank you!
 
* try using 'vmbr0' instead of 'eth0' in the postrouting iptables commands.
* '> ' is this literally in the file? (it should be a '>')
 
Hi Stoiko,

thanks, I've corrected, but I've checked and IP forward is enabled (in fact I can ping the public IP of the host).
 
Hi Stoiko,

thanks, I've corrected, but I've checked and IP forward is enabled (in fact I can ping the public IP of the host).
Still it doesn't work!