[SOLVED] Internet access to Containers


New Member
Sep 17, 2023
Hello there,

After some hours struggling on how to achieve it, i'm now asking for some help ! I've searched on a lot of existing topics before asking here, youtube videos also and official proxmox documentation, but i litterraly couldn't give any internet access to my proxmox container.

What i have actually :

- Clustered 2 proxmox servers (only testing there, i'll have a 3rd one later :D)
- 1 is a dedicated machine at home (Machine A :
- 1 is a VM containing proxmox over virtualbox on my computer (Machine B :

Actually :

- Both proxmox servers have internet access and static IP over my private network.
- LXC containers started on machine B do not have access to internet.
- LXC containers started on machine A do not have access to internet.
- If i start LXC container using DHCP, my router is able to see the container and assign it an IP over the network, BUT i can't ping my router ( from the container.

I'm doing every tests on machine B :

Actually, machine B configuration (/etc/network/interfaces) looks like this :

root@Machine-B:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet manual

auto vmbr0
iface vmbr0 inet static
        bridge-ports enp0s3
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '' -o enp0s3 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '' -o enp0s3 -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

Here is the route config on my LXC container in machine B (CT100) :

root@CT100:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0@if19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether fe:4b:f6:83:88:8e brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet metric 1024 brd scope global dynamic eth0
       valid_lft 85332sec preferred_lft 85332sec
    inet6 fe80::fc4b:f6ff:fe83:888e/64 scope link
       valid_lft forever preferred_lft forever
root@CT100:~# ip r
default via dev eth0 proto dhcp src metric 1024 dev eth0 proto kernel scope link src metric 1024 dev eth0 proto dhcp scope link src metric 1024
root@CT100:~# ping
PING ( 56(84) bytes of data.
--- ping statistics ---
11 packets transmitted, 0 received, 100% packet loss, time 10376ms

root@CT100:~# ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable
From icmp_seq=3 Destination Host Unreachable
--- ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3111ms
pipe 4
root@CT100:~# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.032 ms
64 bytes from icmp_seq=2 ttl=64 time=0.043 ms
--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1141ms
rtt min/avg/max/mdev = 0.032/0.037/0.043/0.005 ms

I tried a lot of stuff, but i really can't see what's wrong in my configuration. If anyone could help me ! Thanks a lot by the way :)


Bruuuh !

I've reinstalled everything with default values on Machine A, and it now works as it should ! I do not understand what i failed before, but it's all resolved for Machine A.

I guess i'll give an other try on machine B now :)

Have a nice day all
Last edited:


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!