LXC No DNS and Can't Ping Gateway

dizzydre21

Member
Apr 10, 2023
80
2
13
Hello all,

I've recently started trying to move some services into LXCs, but I am having issues with that appear to be DNS related.

I have the Proxmox GUI sitting on a Linux Bridge that is tagged with VLAN 40. I also have several VMs that get tagged for VLAN 40, as they have managment consoles that I want on that VLAN. This works without issue.

The Debian and Ubuntu LXCs that I've tried should also be on this VLAN. When I boot them up, they recieve a reserved DHCP address from pfSense from the Interface that is used for VLAN 40 traffic. I can ping any IP address on VLAN 40 from within the LXC except the gateway. I can also ping 1.1.1.1, but I can't ping any website or device by name.

I've checked /etc/network/interfaces /etc/resolv.conf and /etc/hosts. All of them appear to set correctly.
 
Hello,
Could you please provide the contents of the following files for review?
  • /etc/network/interfaces
  • /etc/resolv.conf
  • /etc/hosts
Also, have you tried adding Google's DNS (8.8.8.8) as a nameserver in /etc/resolv.conf to see if that resolves the issue?
Perl:
~# cat /etc/resolv.conf  
...
nameserver 8.8.8.8
What is the output of:
~# dig google.com
 
Hello,
Could you please provide the contents of the following files for review?
  • /etc/network/interfaces
  • /etc/resolv.conf
  • /etc/hosts
Also, have you tried adding Google's DNS (8.8.8.8) as a nameserver in /etc/resolv.conf to see if that resolves the issue?
Perl:
~# cat /etc/resolv.conf 
...
nameserver 8.8.8.8
What is the output of:
~# dig google.com
Hi, somehow I missed your reply.

I believe the issue is resolved for me.

Yes, I could ping the outside world if using 8.8.8.8 for DNS. The issue seems to have been related to me having the Proxmox GUI on a VLAN, but it only occurred if I created the VLAN through the GUI.

I'm on mobile now, so I cant provide the exact difference, but I basically added the VLAN manually to the interfaces file. I do recall that it looked slightly different than creating it from the GUI.