Issue pinging FQDN ...
 
Share:
Notifications
Clear all

[Solved] Issue pinging FQDN from Proxmox LXC container


Brandon Lee
Posts: 500
Admin
Topic starter
(@brandon-lee)
Member
Joined: 15 years ago

If you are running into an issue where my Proxmox LXC containers can't resolve or ping FQDNs even though networking seems to be working fine, there are a few things you need to try.

First things to check - Make sure of the following

✅ The container has network access (can
✅ DNS settings inside the container (/etc/resolv.conf) point to a proper DNS server (e.g., 8.8.8.8)
✅ The Proxmox host itself can resolve FQDNs correctly
✅ The container is using a bridge network (vmbr0)

Troubleshooting Steps and Fixes:

1. Check DNS Settings in the Container

Run:

cat /etc/resolv.conf

If you want to manualy add/configure DNS to something like Googleโ€™s DNS as an example, you can use the following:

echo "nameserver 8.8.8.8" > /etc/resolv.conf echo "nameserver 1.1.1.1" >> /etc/resolv.conf

If /etc/resolv.conf keeps getting reset, you can check if it is managed by systemd-resolved. You might need to override settings using the follwoing command

ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

2. Make sure the container has correct network configuration settings

Check the containerโ€™s network settings in /etc/network/interfaces:ย 

cat /etc/network/interfaces

If you have DHCP running on your network, but DNS is not getting set correctly, try setting a static IP with a known good DNS server and see if this resolves the issue:

auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 1.1.1.1

Restart networking with:

systemctl restart networking

3. Check Proxmox Hostโ€™s LXC Configuration

Ensure the container isnโ€™t restricted from using DNS resolution by checking its config file:

cat /etc/pve/lxc/100.conf

Look for any unusual settings like unprivileged: 1 or lxc.apparmor.profile that may block networking. You may need to add:

lxc.cgroup.devices.allow = c *:* rwm

Or try switching from unprivileged: 1 to unprivileged: 0 temporarily to see if it resolves the issue.

4. Check if the DNS Queries are Being Blocked

Test resolving manually with:

nslookup google.com dig google.com

If these checks fail, check if Proxmox is filtering DNS queries. Some firewalls (like pfSense) may block external DNS queries if not configured to do so

5. Restart Network Services

Try restarting systemd-resolved inside the container:

systemctl restart systemd-resolved

Or restart the container:

pct stop 100 && pct start 100

Other things to try

If you've checked the above and it's still not working, the issue could be due to:

  • Proxmox LXC AppArmor profiles blocking DNS
  • Firewall rules preventing outbound DNS queries
  • The network bridge (vmbr0) not properly passing DNS requests

Let me know if any of these steps worked for you or if you're still facing the issue! 🚀