[SOLVED] Ubuntu 22.04 LXC not connected to internet

I have the following situation:
  • Proxmox 7.3.3 on the host, one network card available in the host. The host has ip address 192.168.1.100
  • I'm trying to run an LXC container (Ubuntu 22.04)
  • I applied the following networking settings for the LXC container:
    • Name: eth0
    • Bridge: vmbr0
    • IP address: 192.168.1.13/24
    • Gateway: 192.168.1.1
  • There are a couple VMs running as well, the have no problem with outgoing connections
I don't know how to solve this to be honest. Everything is filled in correctly, but still the LXC container doesn't have a connection to the internet. However, it can ping to my gateway, to the host and to other devices on the network. What could be wrong here?

A bit of debugging from within the LXC container

Code:
root@unifi:~# cat /etc/networks
# symbolic names for networks, see networks(5) for more information
link-local 169.254.0.0

root@unifi:~# 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 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0@if55: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 0e:34:6b:07:ff:90 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.1.13/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::c34:6bff:fe07:ff90/64 scope link
       valid_lft forever preferred_lft forever

root@unifi:~# ip r
default via 192.168.1.1 dev eth0 proto static
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.13

A bit of debugging from the Proxmox host

Code:
root@pve:~# pct config 113
arch: amd64
cores: 1
features: nesting=1
hostname: unifi
memory: 512
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.1,hwaddr=0E:34:6B:07:FF:90,ip=192.168.1.13/24,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-113-disk-0,size=8G
swap: 512
unprivileged: 1


root@pve:~# pveversion -v
proxmox-ve: 7.3-1 (running kernel: 5.15.83-1-pve)
pve-manager: 7.3-3 (running version: 7.3-3/c3928077)
pve-kernel-helper: 7.3-2
pve-kernel-5.15: 7.3-1
pve-kernel-5.13: 7.1-9
pve-kernel-5.15.83-1-pve: 5.15.83-1
pve-kernel-5.15.74-1-pve: 5.15.74-1
pve-kernel-5.13.19-6-pve: 5.13.19-15
ceph-fuse: 15.2.13-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-5
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-1
libpve-guest-common-perl: 4.2-3
libpve-http-server-perl: 4.1-5
libpve-storage-perl: 7.3-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.0-3
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.3.1-1
proxmox-backup-file-restore: 2.3.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.0-1
proxmox-widget-toolkit: 3.5.3
pve-cluster: 7.3-1
pve-container: 4.4-2
pve-docs: 7.3-1
pve-edk2-firmware: 3.20220526-1
pve-firewall: 4.2-7
pve-firmware: 3.6-2
pve-ha-manager: 3.5.1
pve-i18n: 2.8-1
pve-qemu-kvm: 7.1.0-4
pve-xtermjs: 4.16.0-1
qemu-server: 7.3-2
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+2
vncterm: 1.7-1
zfsutils-linux: 2.1.7-pve3
root@pve:~#



[/CODE}
 
Last edited:
Hi,

Maybe IP 192.168.1.13 is already reserved or used on another VM/CT? Can you please post the working CT configurations pct config <CTID>? And the following commands from a working CT?

Bash:
ip r
ip a
cat /etc/resolv.conf
 
Hi,

Maybe IP 192.168.1.13 is already reserved or used on another VM/CT? Can you please post the working CT configurations pct config <CTID>? And the following commands from a working CT?

Bash:
ip r
ip a
cat /etc/resolv.conf
Thanks for your (quick!!!) reply, @Moayad !
Here is the output:

Code:
rogierl@services [~]$ ip r
default via 192.168.1.1 dev ens18 proto static
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-c982adcafdc5 proto kernel scope link src 172.18.0.1
192.168.1.0/24 dev ens18 proto kernel scope link src 192.168.1.102


rogierl@services [~]$ 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 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 82:73:ce:63:c6:c5 brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 192.168.1.102/24 brd 192.168.1.255 scope global ens18
       valid_lft forever preferred_lft forever
    inet6 2a02:a46b:1e24:1:8073:ceff:fe63:c6c5/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 7145sec preferred_lft 3545sec
    inet6 fe80::8073:ceff:fe63:c6c5/64 scope link
       valid_lft forever preferred_lft forever
3: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
    link/none
    inet 100.80.24.113/32 scope global tailscale0
       valid_lft forever preferred_lft forever
    inet6 fd7a:115c:a1e0:ab12:4843:cd96:6250:1871/128 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::5927:c4f2:fdac:7562/64 scope link stable-privacy
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:3b:7f:6a:e2 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
5: br-c982adcafdc5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:9f:36:8e:54 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-c982adcafdc5
       valid_lft forever preferred_lft forever
    inet6 fe80::42:9fff:fe36:8e54/64 scope link
       valid_lft forever preferred_lft forever


rogierl@services [~]$ cat /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search taileea20.ts.net
[/CODE}
 

About

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!