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
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.
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...
ps auxc | grep -i dns and
ps auxc | grep -i resolv and look for
systemd-resolved, and if both are running, you need to disable the DNS part of
systemd-resolved by editing
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