2

I like working with Ubuntu but today I have a problem. With 18.04 LTS arrived Netplan and systemd-resolve. I want to deploy CoreDNS on a 18.04 server. If Netplan is the future then I would like to have a method for deploying CoreDNS, have usage of 53/tcp and 53/udp without having to "break" my system. Thank you in advance for your help. Gael

2 Answers2

0

In a stock 18.xx system, DNS is managed by systemd-resolved.

Although this addresses a problem when dnsmasq and systemd-resolved are run at the same time, it should also solve your problem with CoreDNS...

Regarding dnsmasq and systemd-resolved...

Do a ps auxc | grep -i dns and ps auxc | grep -i resolv and look for dnsmasq and systemd-resolved, and if both are running, you need to disable the DNS part of systemd-resolved by editing /etc/systemd/resolved.conf and...

change:

#DNSStubListener=yes

to:

DNSStubListener=no

then restart systemd-resolve and dnsmasq, or reboot.


You MAY need to reset the symlink that is /etc/resolv.conf (if dnsmasq is not running)...

sudo mv /etc/resolv.conf /etc/resolv.conf.OLD # save the old symlink

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf # create new symlink

Note: original symlink is...

sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

heynnema
  • 73,649
0

The only address that systemd-resolved binds to is 127.0.0.53. To deploy a nameserver on a system which is running systemd-resolved as a local resolver, you should configure that DNS server to bind to the specific addresses or interfaces that you want it to listen on, excluding 127.0.0.53.

slangasek
  • 5,828