DNS Problem on Ubuntu 18.04 - Netplan

Junqueira Junior

New Member
Dec 3, 2018
1
1
1
39
I'm having problems to set a proper DNS server on the Ubuntu 18.04 LTS.

I've found several solutions through the use of the netplan configuration file. I have tried severals modifications without success. I can get into the VM and I am able to connect to other computers using the IP address. However, I cannot use the DNS server. Hence, it is not possible to install anything via apt install....

Right now my "/etc/netplan/01-netcfg.yaml" looks like:

network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: no
dhcp6: no
addresses: [YY.YYY.YY.XX/22]
gateway4: YY.YYY.YY.254
nameservers:
addresses: [8.8.4.4,8.8.8.8]
routes:
- to: YY.YYY.YY.254/22
via: 0.0.0.0
scope: link



Do you guys have any idea what i am doing wrong?

Thanks!
 
  • Like
Reactions: Julien Croy
I've found several solutions through the use of the netplan configuration file. I have tried severals modifications without success. I can get into the VM and I am able to connect to other computers using the IP address. However, I cannot use the DNS server. Hence, it is not possible to install anything via apt install....

Right now my "/etc/netplan/01-netcfg.yaml" looks like:

network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: no
dhcp6: no
addresses: [YY.YYY.YY.XX/22]
gateway4: YY.YYY.YY.254
nameservers:
addresses: [8.8.4.4,8.8.8.8]
routes:
- to: YY.YYY.YY.254/22
via: 0.0.0.0
scope: link


Not really a Proxmox issue; however: check if

- you can ping to nameservers

- when trying to access at a target specified by name (e.g. google.com) a DNS query is sent to (and answered from) th DNS server. This can be done be tcpdump resp. wireshark.

- apt install uses ipv4 (and does not try ipv6 which is the default).