Comment 51 for bug 1670959

Revision history for this message
TuxInvader (tuxinvader) wrote :

I have this on Ubuntu 18.04. In my case I use dnsmasq with a custom configuration providing DHCP and DNS to multiple bridges (Virtual Machines and containers). So I need them both (in so far as I need dnsmasq and am being forced to use systemd).

The problem is a DNS loop between systemd and dnsmasq. systemd-resolved forwards DNS queries in parallel to entries in /etc/resolv.conf and servers picked up from interfaces via DHCP. If you, like me have dnsmasq in resolv.conf, and a dnsmasq configuration that forwards to systemd, then you have a loop.

My work-around is to add `DNS=127.1.1.1` into /etc/systemd/resolved.conf. Nothing is listening on 127.1.1.1 so the queries go unanswered. The systemd resovler gets answers only from servers provided to me via DHCP or statically assigned to an interface.

Inside my dnsmasq.conf I have `server=127.0.0.53`, and resolv.conf has `nameserver 127.0.0.1` which is dnsmasq.