Consolidating replies in one email again,

On Sun, Aug 4, 2019 at 3:04 PM wrote:
>
> 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.

| resolvectl status

Ubuntu 18.04's systemd doesn't have the resolvectl command:

$ ls /usr/bin/resolvectl
ls: cannot access '/usr/bin/resolvectl': No such file or directory

https://packages.ubuntu.com/search?searchon=contents&keywords=resolvectl&mode=exactfilename&suite=bionic&arch=any

So what else I can use beside `resolvectl`?

| Basically, look at the top of /etc/resolv.conf to see what is handeling it.

Ah, thank!

$ systemd-resolve --status | tail -11
Link 2 (eth0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.0.100
                      192.168.0.10
                      2607:f798:18:10:0:640:7125:xxxx
                      2607:f798:18:10:0:640:7125:yyyy
          DNS Domain: my.own.domain.tld

| Somehow I do read "`dig host` expecting `dig host.domain.tld`"
| because I have been bitten by assuming that domain name always
| gets added.

Bingo! That's exactly the problem!!

| Recheck the configuration of your DHCP server ...

For DHCP server configuration, I'm following this almost word for word:
https://sfxpt.wordpress.com/2013/11/30/dnsmasq-installation-configuration-5/

So how do I make sure that the domain name always gets added, in my
DHCP/DNS server configuration?

> > > 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


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to