[Dnsmasq-discuss] Avoid conflicts between dnsmasq and systemd-resolved.

Hongyi Zhao hongyi.zhao at gmail.com
Sun Sep 13 23:52:49 BST 2020


On Mon, Sep 14, 2020 at 4:26 AM Geert Stappers <stappers at stappers.nl> wrote:
>
> On Sun, Sep 13, 2020 at 03:36:42PM +0800, Hongyi Zhao wrote:
> > Hi,
> >
> > On Ubuntu 20.04, I let dnsmasq listen on 127.0.0.1:53, at the same
> > time, I also noted that systemd-resolved has a default stub dns
> > resolver which is listening on 127.0.0.53:53.
> >
> > And for my case, the /etc/resolv.conf is a symlink as following:
> >
> > $ realpath -e /etc/resolv.conf
> > /run/systemd/resolve/stub-resolv.conf
> >
> > The content of this file is shown as follows:
> >
> > $ cat /etc/resolv.conf
> > # This file is managed by man:systemd-resolved(8). Do not edit.
> > #
> > # This is a dynamic resolv.conf file for connecting local clients to the
> > # internal DNS stub resolver of systemd-resolved. This file lists all
> > # configured search domains.
> > #
> > # Run "resolvectl status" to see details about the uplink DNS servers
> > # currently in use.
> > #
> > # Third party programs must not access this file directly, but only through the
> > # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
> > # replace this symlink by a static file or a different symlink.
> > #
> > # See man:systemd-resolved.service(8) for details about the supported modes of
> > # operation for /etc/resolv.conf.
> >
> > nameserver 127.0.0.53
> > options edns0
> >
> >
> > I use the netplan to set 127.0.0.1 as the dns for all interfaces. But
> > it seems there are some conflicts on my above configuration. Say, when
> > I do the following testing:
> >
> > $ dig www.baidu.com
> >
> > I always noticed that there will have multiple dnsmasq instances be
> > triggered automatically and the resolution will fail.
> >
> > So I want to know how to solve the confliction problem between dnsmasq
> > and systemd-resolved.
>
> The trick is deciding which DNS is "upstream"

Still, I'm no so clear on the solution. How to solve it? Any more
hints/instructions?

Regards,
HY

>
>
>
> Groeten
> Geert Stappers
> --
> Silence is hard to parse
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



-- 
Hongyi Zhao <hongyi.zhao at gmail.com>



More information about the Dnsmasq-discuss mailing list