Re: [Dnsmasq-discuss] Problem with server=/local/127.0.0.1

2018-12-14 Thread Vladislav Grishenko
Hi Denis,

.local is reserved domain for mdns, therefore by default it's resolved
mdns multicast on the client, not via dns.
check nsswitch.conf, if you're on linux, maybe for windows host
there's something similar.
it's not recommended to use .local domains for internal services.

чт, 13 дек. 2018 г. в 10:27, Denis :
>
> 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, ir is this option not supposed to work like I think?
>
> --
> Respectfully,
> Denis Shadrin
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



-- 

Best regards, Vladislav Grishenko

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


Re: [Dnsmasq-discuss] Problem with server=/local/127.0.0.1

2018-12-13 Thread Geert Stappers
On Thu, Dec 13, 2018 at 08:47:39PM +0300, Denis wrote:
> On Thu, 13 Dec 2018 09:54:44 +0100 Geert Stappers 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/]][[#][@|[#]]
> > |  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 ..
> > 
> 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.

/etc/resolv.conf and dnsmasq configuration file are separate files.
So don't expect them to be functional equivalent.


Back to previous lines

> In all these cases my PC's ip address (192.168.1.2) is resolved to my PC's 
> name (DenDesktop).

That resolving would I have called explicit "reverse lookup resolving".


> 64 bytes from 127.0.0.200 (127.0.0.200): icmp_seq=1 ttl=64 time=0.029 ms'

I think that /etc/hosts at DenDesktop has a line like

127.0.0.200dendesktop.local


> 64 bytes from DenDesktop.local (192.168.1.2): icmp_seq=1 ttl=64 time=0.027 ms'

Mostly likely based upon information in 

Re: [Dnsmasq-discuss] Problem with server=/local/127.0.0.1

2018-12-13 Thread Denis
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  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/]][[#][@|[#]]
> |  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


Re: [Dnsmasq-discuss] Problem with server=/local/127.0.0.1

2018-12-13 Thread Denis
In my previous letter there is a typo of course;
"In all these cases my PC's ip address (192.168.1.2) is NOT resolved to my PC's 
name (DenDesktop)"

On Thu, 13 Dec 2018 09:54:44 +0100
Geert Stappers  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/]][[#][@|[#]]
> |  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


Re: [Dnsmasq-discuss] Problem with server=/local/127.0.0.1

2018-12-13 Thread Geert Stappers
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/]][[#][@|[#]]
|  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
-- 
Leven en laten leven

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