[Dnsmasq-discuss] Local dnsmasq server not utilized by Ubuntu

dnsmasqyq.xpt at neverbox.com dnsmasqyq.xpt at neverbox.com
Sun Aug 4 20:04:26 BST 2019


Hi,

Thanks a lot for all your replies.

Sorry I wasn't very clear first as I don't know if anyone would
read/reply. Here is my reply to you one by one, but at this single
place.

On Sun, Aug 4, 2019 at 1:36 PM Daniel Huhardeaux wrote:
>
> > Hi,
> >
> > I know this is not a dnsmasq issue per se, but all my machines are
> > Ubuntu based and they all can't utilized the local dnsmasq server that
> > I setup for my LAN, which literally making my local dnsmasq server
> > useless.

> systemd-resolve is irrelevant to the OP's question, it provides local
'on the machine' DNS caching.  What the OP wants is 'local on his LAN' DNS...

Sorry I wasn't very clear in my OP -- I've setup my local dnsmasq
server (DHCP/DNS) correctly. All my Ubuntu machines are picking up IPs
from my dnsmasq DHCP server. Just they don't use my dnsmasq DNS
server.

> > The problem is that the NetworkManager that Ubuntu uses insists to use
> > its own DNS server, which is 127.0.0.53, not the DHCP/DNS server I
> > setup for my LAN.

> Most likely you are looking at `systemd-resolved`. Consider
that "local DNS".  It still needs an upstream DNS.

Yes, I believe so. the 127.0.0.53 is used, and I can confirm that
whether the `resolvconf` is installed or not. The problem is that,
`systemd-resolved`'s upstream DNS is suppose to be my LAN dnsmasq
server (DHCP/DNS), at least I hope so, but it is not somehow, and this
is the exact problem I'm trying to solve/figure out why.

Why I say the upstream DNS is not my LAN dnsmasq DNS server? Because
when I `dig` for my local machine names, including the LAN dnsmasq
server itself, I get nothing in the `ANSWER SECTION` section, unless I
manually switch the `nameserver` entry in /etc/resolv.conf in *my
clients machines* to my LAN dnsmasq server. Then everything works.

> > I'm wondering how you guys solved such problems, since you are using
> > dnsmasq server just fine. I had been asking such questions at the
> > Ubuntu and NetworkManager side multiple times at multiple places, but
> > have never been able to get a straight/working answer.
>
> Hello.
>
> It's not a NetworkManager nor an Ubuntu problem: you have
> systemd-resolve installed on your machine (guess Ubuntu 18.04) which
> uses 127.0.0.53 as IP for DNS. You have to go in /etc/systemd and adapt
> the resolved.conf file to put your dnsmasq IP server as DNS.

Yes, exactly I'm using Ubuntu 18.04, thus systemd-resolve. So,

How to adapt the resolved.conf file so that my modification survive
reboot, and not hard-coding anything as when I take my laptop else
where, I don't want it still pointing to my home LAN dnsmasq server?

Thanks




More information about the Dnsmasq-discuss mailing list