I've installed a Proxmox VE 5.1 on a VirtualBox in macOS (10.12).

The guess OS, Debian Strech (Proxmox is built on debian), has 2 "physical" network interfaces (configured from VirtualBox), Host-Only and NAT, I can access to internet through the NAT interface:

root@proxmox:~# traceroute
traceroute to (, 30 hops max, 60 byte packets
 1 (  0.792 ms  0.694 ms  0.625 ms
 2  1dot1dot1dot1.cloudflare-dns.com (  2.829 ms  2.818 ms  3.318 ms

The /etc/network/interfaces in the debian host contains:

auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet static

auto enp0s8
iface enp0s8 inet static

auto vmbr0
iface vmbr0 inet static
    bridge_ports dummy1
    bridge_stp off
    bridge_fd 0

The "guest", debian sees to macOS ("host") from both interfaces (macOS IPs:,

The vmbr0 virtual interface was created for the proxmox LXC containers, I've added a iptables rule to send all the traffic from vmbr0 to the enp0s8 interface (the NAT interface in VirtualBox).

iptables -A POSTROUTING -s -o enp0s8 -j MASQUERADE -t nat

The problem is that when I create a LXC container inside proxmox, using the vmbr0 as network interface, the LXC container has not internet access, I can ping to the proxmox "master" (IP: but nothing else.

I've also tried to use enp0s8 as bridge_ports parameter, same result.

The file /etc/network/interfaces in the LXC container (Ubuntu 16.04) contains:

auto eth0
iface eth0 inet static

I have a quite similar config in another proxmox server (but in bare metal, not VirtualBox installation) and It works ok.

Can anyone tell me what is incorrect or missing in the network configuration to allow containers access to internet ?

  • iptables does not make routing decisions. You should use SNAT instead of MASQUERADE anyway because this is a static setup. What is the iptables forwarding configuration? Is routing enabled at all? cat /proc/sys/net/ipv4/ip_forward Apr 26, 2018 at 22:03
  • @HaukeLaging, It was that, /proc/sys/net/ipv4/ip_forward was "0", when I changed to "1" all works Ok. Please, move your comment to a response, so I can accept it.
    – Roberto
    Apr 27, 2018 at 6:07

1 Answer 1


In order to make routing from a VM work you need

  1. a correct routing configuration on the host (which seems to be the case here)
  2. to enable routing in general via /proc/sys/net/ipv4/ip_forward (which can be done on a permanent basis with the distro network tools or directly in /etc/sysctl.*)
  3. to allow the routing of packets with iptables (i.e. filter/FORWARD chain and / or its children)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .