My configuration: Manjaro Linux, 32-bit, one ethernet card. It is connected to a router with a cable, the router is connected to my ISP also with a cable. A netbook is connected to the router via Wi-Fi. On the PC: Avahi is installed and enabled (avahi-daemon active), systemd-resolved is disabled /etc/resolv.conf is usually filled by NetworkManager, but just before changing dnsmasq.conf and restarting it with different options I manually edited it (/etc/resolv.conf) and left only one line: "nameserver 192.168.1.1" (router address)
Results of "systemctl status dnsmasq.service": 1. With both lines ("local=/local/" and "server=/local/127.0.0.1") commented: Dec 13 19:32:53 DenDesktop dnsmasq[2564]: dnsmasq: syntax check OK. Dec 13 19:32:53 DenDesktop systemd[1]: Started A lightweight DHCP and caching DNS server. Dec 13 19:32:53 DenDesktop dnsmasq[2565]: started, version 2.80 cachesize 150 Dec 13 19:32:53 DenDesktop dnsmasq[2565]: compile time options: IPv6 GNU-getopt DBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth> Dec 13 19:32:53 DenDesktop dnsmasq[2565]: DBus support enabled: connected to system bus Dec 13 19:32:53 DenDesktop dnsmasq[2565]: reading /etc/resolv.conf Dec 13 19:32:53 DenDesktop dnsmasq[2565]: using nameserver 192.168.1.1#53 Dec 13 19:32:53 DenDesktop dnsmasq[2565]: read /etc/hosts - 5 addresses 2. With only "local=/local/" uncommented: (1) + one line: Dec 13 19:48:52 DenDesktop dnsmasq[3122]: using local addresses only for domain local 3. With only "server=/local/127.0.0.1" uncommented: (1) + one line: Dec 13 19:38:36 DenDesktop dnsmasq[2788]: ignoring nameserver 127.0.0.1 - local interface 4. With both lines uncommented: (1) + (2) + (3) In all these cases my PC's ip address (192.168.1.2) is resolved to my PC's name (DenDesktop). If I "ping DenDesktop.local", the result is: 'PING DenDesktop.local (127.0.0.200) 56(84) bytes of data. 64 bytes from 127.0.0.200 (127.0.0.200): icmp_seq=1 ttl=64 time=0.029 ms' If I manually insert "nameserver 127.0.0.1" into /etc/resolv.conf above all other nameservers and enable option "strict-order" in dnsmasq.conf, ONLY THEN local names are resolved, i.e. "ping DenDesktop.local" output is: 'PING DenDesktop.local (192.168.1.2) 56(84) bytes of data. 64 bytes from DenDesktop.local (192.168.1.2): icmp_seq=1 ttl=64 time=0.027 ms' I thought that "server=/local/127.0.0.1" was a functional equivalent of doing exactly that (putting the line "nameserver 127.0.0.1" into the beginning of /etc/resolv.conf): first checked 127.0.0.1 for domain local, then went to /etc/resolv.conf for other nameservers. It seems that the man page says that. So I don't understand why it is not working. -- Respectfully, Denis Shadrin On Thu, 13 Dec 2018 09:54:44 +0100 Geert Stappers <stapp...@stappers.nl> wrote: > On Thu, Dec 13, 2018 at 07:44:14AM +0300, Denis wrote: > > Hello, everyone! > > > > In my dnsmasq.conf "server=/local/127.0.0.1" doesn't seem to work. > > At least, it doesn't work how I thought it was supposed to work. I > > was under the impression that server=/$domainname/$address should > > cause the $domainname to be looked up only in $address. However, > > like I said, I have the line "server=/local/127.0.0.1", dnsmasq > > --test returns "syntax check OK", but my *.local names are not > > resolved. > > > > Here's the full content of my dnsmasq.conf: > > > > domain-needed > > bogus-priv > > strict-order > > server=/local/127.0.0.1 > > local=/local/ > > listen-address=127.0.0.1 > > no-dhcp-interface=127.0.0.1 > > expand-hosts > > domain=local > > > > Am I missing something, or is this option not supposed to work like > > I think? > > Text from the manual page of dnsmasq > > | -S, --local, > --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]] > | Specify IP address of upstream servers directly. | > | local is a synonym for server > > > Comment out your 'server=' and 'local=' lines or remove them. > Try again and report back. > > If the "*.local" still aren't resolved. Tell more how it is done. > (programs and computer being used, what should be the result, why) > I'm asking because the > > listen-address=127.0.0.1 > is somewhat strange .. > > > Groeten > Geert Stappers _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss