Re: [Dnsmasq-discuss] Different behaviour with "interface=" on two almost identical systems
On Fri, Mar 29, 2024 at 03:45:20PM -0500, Chris Buechler wrote: >On Thu, Mar 28, 2024 at 11:40 AM Chris Green <[1]c...@isbd.net> wrote: > > I did try stopping dnsmasq and then nothing was listening on port > 53. > However, just to prove it:- > root@backup:~# ss -tulpn sport = 53 > Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port > Process > udp UNCONN 0 0[2]0.0.0.0:53 > 0.0.0.0:* users:(("dnsmasq",pid=1826,fd=4)) > udp UNCONN 0 0 [::]:53[::]:* > users:(("dnsmasq",pid=1826,fd=6)) > tcp LISTEN 0 32 [3]0.0.0.0:53 > 0.0.0.0:* users:(("dnsmasq",pid=1826,fd=5)) > tcp LISTEN 0 32 [::]:53[::]:* > users:(("dnsmasq",pid=1826,fd=7)) > >That's the nature of how dnsmasq binds by default. You need two config >lines to actually bind only to localhost: >listen-address=127.0.0.1 >bind-interfaces >The listen-address config will make it only reply to queries to >localhost, but doesn't prevent wildcard binding. bind-interfaces makes >it bind explicitly to the listen-address. See the bind-interfaces >section of the man page for details. >[4]https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html > OK, thank you, I did read those man page entries but found it rather confusing! It has fixed the problem though! :-) I still don't quite understand why it seemed to work on one system but not on another almost identical one. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Different behaviour with "interface=" on two almost identical systems
On Thu, Mar 28, 2024 at 03:50:57PM +0100, Buck Horn via Dnsmasq-discuss wrote: > On 28.03.24 14:28, Chris Green wrote: > > ... and another system, also running dnsmasq version 2.90:- > > > > chris@t470$ nmap 192.168.1.128 | grep 53 > > 53/tcpopen domain > > chris@t470 > > > > > > So why are they acting differently and, possibly more to the point, > > how do I make dnsmasq listen only on the loopback address? > > > Hi Chris, > > you are just probing for port 53, without information about the process > handling that port, so it could be another resolver on the same machine > (e.g. systemd-resolved, or a dnsmasq instance controlled by > NetworkManager) that hogs port 53. > > > You may want to consider using something like sudo ss -tulpn sport = 53 > to see what is actually listening. > I did try stopping dnsmasq and then nothing was listening on port 53. However, just to prove it:- root@backup:~# ss -tulpn sport = 53 Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process udp UNCONN 0 00.0.0.0:53 0.0.0.0:* users:(("dnsmasq",pid=1826,fd=4)) udp UNCONN 0 0 [::]:53[::]:* users:(("dnsmasq",pid=1826,fd=6)) tcp LISTEN 0 32 0.0.0.0:53 0.0.0.0:* users:(("dnsmasq",pid=1826,fd=5)) tcp LISTEN 0 32 [::]:53[::]:* users:(("dnsmasq",pid=1826,fd=7)) > > For listening on 127.0.0.1 only, you probably should consider to > explicitly state that as listen-address: > (quoting https://dnsmasq.org/docs/dnsmasq-man.html) > > -a, --listen-address= > > Listen on the given IP address(es). Both --interface and > --listen-address options may be given, in which case the set of both > interfaces and addresses is used. Note that if no --interface option is > given, but --listen-address is, dnsmasq will not automatically listen on > the loopback interface. To achieve this, its IP address, 127.0.0.1, must > be explicitly given as a --listen-address option. > That doesn't work! /etc/dnsmasq.conf is now:- # # # Default dnsmasq configuration file, with this configuration file dnsmasq # provides only local DNS caching and no DHCP. This file is used on nearly # all my systems which are ever on the home LAN. # # # Set to listen only on the loopback address. # listen-address=127.0.0.1 # # # This sets the upstream server[s] to the one[s] set by Network Manager, # usually automatically using DHCP from the ISP's (or my) DHCP/DNS server. # If we're on the home LAN the resolv-file will set the nameserver to # 192.168.1.1, if away from home it will be the ISP's nameserver[s]. # resolv-file=/run/NetworkManager/no-stub-resolv.conf ... and, after restarting dnsmasq:- chris$ nmap 192.168.1.4 | grep 53 53/tcp open domain chris$ Plus, why does it work (as the dnsmasq man page entry for listen says it should) on one system but not on another almost identical system? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Different behaviour with "interface=" on two almost identical systems
I've been doing a bit of clearing up of loose ends on systems on my LAN and decided that dnsmasq really only needs to listen on the loopback address on all my systems except the actual DNS server for the LAN. So I changed the dnsmasq.conf file to the following on all systems except the DNS server:- # # # Default dnsmasq configuration file, with this configuration file dnsmasq # provides only local DNS caching and no DHCP. This file is used on nearly # all my systems which are ever on the home LAN. # # # Set to listen only on localhost. # interface= # # # This sets the upstream server[s] to the one[s] set by Network Manager, # usually automatically using DHCP from the ISP's (or my) DHCP/DNS server. # If we're on the home LAN the resolv-file will set the nameserver to # 192.168.1.1, if away from home it will be the ISP's nameserver[s]. # resolv-file=/run/NetworkManager/no-stub-resolv.conf On my desktop system (192.168.1.3) this works as expected:- chris$ nmap localhost | grep 53 53/tcp open domain chris$ nmap 192.168.1.3 | grep 53 chris$ But on 192.168.1.4 it doesn't:- chris$ nmap 192.168.1.4 | grep 53 53/tcp open domain chris$ Both systems are running xubuntu with dnsmasq version 2.90. ... and another system, also running dnsmasq version 2.90:- chris@t470$ nmap 192.168.1.128 | grep 53 53/tcpopen domain chris@t470 So why are they acting differently and, possibly more to the point, how do I make dnsmasq listen only on the loopback address? ... and the /run/NetworkManager/no-stub-resolv.conf file is the same on all the systems:- # Generated by NetworkManager search zbmc.eu nameserver 192.168.1.1 -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] How to get dnsmasq to see changes in files in /etc/dnsmasq.d?
Is there a way (other than restarting dnsmasq) to get it to notice changes to files in /etc/dnsmasq.d? I have a blacklist file which I put in /etc/dnsmasq.d and, obviously, when the file is updated I want dnsmasq to notice any changes in the file. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Upgrade to [x]ubuntu 23.10 means dnsmasg can't read /run/NetworkManager
Up until now I have the following in my /etc/dnsmasq.conf:- resolv-file=/run/NetworkManager/no-stub-resolv.conf This means that dnsmasq uses the upstream DNS that Network Manager configures. When I'm on the local LAN this resolves to 'my' DNS server at 192.168.1.2, when I'm connected somewhere else Network Manager sorts things out accordingly and dnsmasq gets the right upstream DNS server. However the latest Ubuntu update has tightened the permissions on /etc/NetworkManager and dnsmasq can't read the file /run/NetworkManager/no-stub-resolv.conf. I know this is a slightly non-standard configuration but it has worked very nicely for me for some years. Can anyone suggest a way to fix this? Obviously /run/NetworkManager/no-stub-resolv.conf is created at every boot so the permissions will revert to 'too strict' every time I start the system. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Occasional "communications error", how to diagnose?
On Wed, Dec 13, 2023 at 08:59:05PM +, Simon Kelley wrote: > > > On 13/12/2023 15:25, Chris Green wrote: > > I run dnsmasq version 2.89 on my laptop which is running [x]ubuntu > > 23.04. > > > > I have systemd.resolvd disabled. > > > > I'm occasionally seeing the following error when getting a host's IP:- > > > > chris$ host homepi > > ;; communications error to 127.0.0.1#53: timed out > > homepi has address 192.168.1.113 > > chris$ ps -ef | grep dnsmasq > > dnsmasq 933 1 0 Dec06 ? 00:00:22 /usr/sbin/dnsmasq -x > > /run/dnsmasq/dnsmasq.pid > -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service > --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d > > > > chris 865413774 0 15:05 pts/100:00:00 grep --color=auto > > dnsmasq > > chris$ > > > > As can be seen dnsmasq is running and subsequent queries work without any > > error (or delay). The above timeout is a few seconds, maybe five or a bit > > less. > > > > There's no dnsmasq related error message in syslog (nothing for today at > > all). The system homepi is a Raspberry Pi on the same LAN as the laptop > > running dnsmasq, The error isn't only for one particular host, I've seen > > it for other systems on my LAN. > > > > Can anyone suggest what might be causing the error and/or how to diagnose > > what's wrong? > > > > It looks like the first query (or its reply) was dropped, host retried, > and it worked second time around. > > Since DNS transport is normally across UDP, which is defined as > unreliable, this is completely normal. Except that the UDP packets are > not actually traversing a network, they're going via the lo interface > within one machine. I'm sure there are circumstances where UDP packets > can get dropped in the kernel when going via the lo interface, but it > shouldn't happen very often. Is the machine under heavy load or memory > pressure? Maybe a network reconfiguration event could drop packets? > No, it's not a heavily loaded system by any means. It's a Thinkpad T470 laptop with an I7 processor and is virtually never worked hard at all. Just randomly running top now shows:- top - 09:59:28 up 12:04, 3 users, load average: 0.20, 0.12, 0.10 Tasks: 254 total, 1 running, 253 sleeping, 0 stopped, 0 zombie %Cpu(s): 1.5 us, 0.2 sy, 0.0 ni, 97.9 id, 0.3 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 7790.8 total,296.7 free, 1032.4 used, 6461.8 buff/cache MiB Swap: 15258.0 total, 15255.5 free, 2.5 used. 6370.8 avail Mem That's about the way it always is (three users are all me). What I don't understand is that there's nothing at all in the logs about the failure/timeout. Can I increase dnsmasq's logging to see if anything shows up? It's just 'my' laptop so there isn't a lot of DNS. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Occasional "communications error", how to diagnose?
I run dnsmasq version 2.89 on my laptop which is running [x]ubuntu 23.04. I have systemd.resolvd disabled. I'm occasionally seeing the following error when getting a host's IP:- chris$ host homepi ;; communications error to 127.0.0.1#53: timed out homepi has address 192.168.1.113 chris$ ps -ef | grep dnsmasq dnsmasq 933 1 0 Dec06 ?00:00:22 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d chris 865413774 0 15:05 pts/100:00:00 grep --color=auto dnsmasq chris$ As can be seen dnsmasq is running and subsequent queries work without any error (or delay). The above timeout is a few seconds, maybe five or a bit less. There's no dnsmasq related error message in syslog (nothing for today at all). The system homepi is a Raspberry Pi on the same LAN as the laptop running dnsmasq, The error isn't only for one particular host, I've seen it for other systems on my LAN. Can anyone suggest what might be causing the error and/or how to diagnose what's wrong? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Syntax for multiple listen addresses
On Mon, Jul 17, 2023 at 03:44:31PM +, Donald Muller wrote: >There is a tag set with the name of the interface automatically for >each request. You can use this tag to set the options for each >interface. It is documented in the man page. Isn't that all to do with DHCP though? My problem is entirely DNS. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Syntax for multiple listen addresses
On Mon, Jul 17, 2023 at 05:34:54PM +0200, Geert Stappers wrote: > On Mon, Jul 17, 2023 at 03:56:42PM +0100, Chris Green wrote: > > I'm sure this must be in the man page somewhere but I can't find it. > > If dnsmasq is to listen on more than one address how do you put this > > in the configuration file? > > > > I.e. is it:- > > listen-address=192.168.1.2,127.0.0.1 > > > > or is it:- > > listen-address=192.168.1.2 > > listen-address=127.0.0.1 > > > > Or will either work? > > > > sudo ss -plut | grep domain > You had me confused for a minute Gert but of course you're telling me that the above command will show what addresses dnsmasq is listening on and thus whether my "listen-address=192.168.1.2,127.0.0.1" is doing what I want. It is doing what I want! :-) Thank you. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Very odd sequence of replies to 'host'
There's something very odd going on with my dnsmqsq. The following sequence of 'host' commands was run on one of my client machines on my home LAN. This machine has a very minimal /etc/dnsmasq.conf as follows:- resolv-file=/run/NetworkManager/no-stub-resolv.conf The file /run/NetworkManager/no-stub-resolv.conf is:- # Generated by NetworkManager search zbmc.eu nameserver 192.168.1.2 /etc/resolv.conf is:- nameserver 127.0.0.1 ... and here is the sequence of host commands, they were done at manual typing speed, i.e. in a few tens of seconds overall, no long waits between them. chris$ host -a jacquibennett.com 127.0.1.1 Trying "jacquibennett.com" Using domain server: Name: 127.0.1.1 Address: 127.0.1.1#53 Aliases: Host jacquibennett.com not found: 4(NOTIMP) Received 35 bytes from 127.0.1.1#53 in 16 ms chris$ host jacquibennett.com 127.0.1.1 Using domain server: Name: 127.0.1.1 Address: 127.0.1.1#53 Aliases: jacquibennett.com has address 153.92.6.161 jacquibennett.com has IPv6 address 2a02:4780:a:1080:0:174b:7855:7 Host jacquibennett.com not found: 2(SERVFAIL) chris$ chris$ chris$ chris$ host jacquibennett.com 127.0.1.1 Using domain server: Name: 127.0.1.1 Address: 127.0.1.1#53 Aliases: jacquibennett.com has address 153.92.6.161 jacquibennett.com has IPv6 address 2a02:4780:a:1080:0:174b:7855:7 jacquibennett.com mail is handled by 5 mx1.hostinger.com. jacquibennett.com mail is handled by 10 mx2.hostinger.com. chris$ Why am I getting different answers each time, it's crazy! It's almost as if there's more than one process listening for DNS requests and they answer at random. I obviously have something very wrong somewhere but I don't really know how to diagnose this. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Syntax for multiple listen addresses
I'm sure this must be in the man page somewhere but I can't find it. If dnsmasq is to listen on more than one address how do you put this in the configuration file? I.e. is it:- listen-address=192.168.1.2,127.0.0.1 or is it:- listen-address=192.168.1.2 listen-address=127.0.0.1 Or will either work? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Problem with 127.0.1.1 versus 127.0.0.1
On Mon, Jul 17, 2023 at 11:30:18AM +0200, Petr Menšík wrote: > What is specified in dnsmasq does not matter. host by default does not > talk to dnsmasq directly. It reads /etc/resolv.conf and uses nameserver > specified there. If that is IP of dnsmasq, okay. If it is not, well, the > problem might be elsewhere. Because I don't know what is there, I cannot > help. > Ah, yes, sorry I understand now, /etc/resolv.conf is:- nameserver 127.0.0.1 > If you do "dig @localhost jacquibennett.com", then you are asking > dnsmasq explicitly. Just "dig jacquibennett.com" uses server in > /etc/resolv.conf, which may not even contain localhost address at all. > That is why I have asked what is there. > > On 17. 07. 23 9:00, Chris Green wrote: > > On Sun, Jul 16, 2023 at 11:58:38PM +0200, Petr Menšík wrote: > >> I think you have failed to show us what is in /etc/resolv.conf on the > >> machine, which is running host command. > >> > > It's specified in /etc/dnsmasq.conf:- > > > > resolv-file=/run/NetworkManager/no-stub-resolv.conf > > > > ... and the contents are:- > > > > # Generated by NetworkManager > > search zbmc.eu > > nameserver 192.168.1.2 > > > >> unless listen-address or interface is specified, it should listen on all > >> interfaces. > >> > > Yes, that's what I thought. > > > > > >> Try using host -v jacquibennett.com, it might provide more details what > >> exactly has timed out. > >> > >> If unsure what is host contacting, try separate queries to server > >> specified explicitly: > >> > >> - host -v jacquibennett.com 127.0.0.1 > >> - host -v jacquibennett.com 127.0.1.1 > >> > >> That might provide hints what is failing and what is working. > >> > > Ah, thank you, I hadn't thought to check options for the host command, > > I had been using dig to look deeper. > > > > Typically when I tried just now both the above host commands worked > > instantly with no errors! I'll have to keep trying to work out what's > > wrong. > dig is better tool anyway, stay using that. host returns more compact > result, but is worse tool when hunting strange errors. Mostly because > without -t parameters it does 3 queries and possibleerror does not have > clear indication, to which it belongs. > > > >> Cheers, > >> Petr > >> > >> On 7/16/23 22:10, Chris Green wrote: > >>> I use dnsmasq on a number of, mostly Ubuntu, home systems. One system > >>> at 192.168.1.2 acts as the DNS server for my LAN, then there are > >>> several 'client' systems that just use dnsmasq as a caching DNS server > >>> for their own lookups. > >>> > >>> I *suspect* I have a problem with looking up names via the local > >>> dnsmasq because it is listening only on 127.0.1.1 and the request is > >>> on 127.0.0.1#53. > >>> > >>> for example a 'host'command on my laptop returns:- > >>> > >>> chris$ host jacquibennett.com > >>> ;; communications error to 127.0.0.1#53: timed out > >>> jacquibennett.com has address 153.92.6.161 > >>> jacquibennett.com has IPv6 address 2a02:4780:a:1080:0:174b:7855:7 > >>> jacquibennett.com mail is handled by 5 mx1.hostinger.com. > >>> jacquibennett.com mail is handled by 10 mx2.hostinger.com. > >>> > >>> But dnsmasq is running on the laptop:- > >>> > >>> dnsmasq 7443 1 0 09:27 ? 00:00:01 /usr/sbin/dnsmasq -x > >>> /run/dnsmasq/dnsmasq.pid > >> -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service > >> --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d > >> > >>> > >>> The dnsmasq configuration file on the laptop (and other client > >>> systems) is almost non-existent, it's just:- > >>> > >>> resolv-file=/run/NetworkManager/no-stub-resolv.conf > >>> > >>> ... /run/NetworkManager/no-stub-resolv.conf is:- > >>> > >>> # Generated by NetworkManager > >>> search zbmc.eu > >>> nameserver 192.168.1.2 > >>> > >>> > >>> ... and in /etc/dnsmasq.d I just have a blacklist file with lots of > >>> address= entries, but that's all. The /etc/default/dnsmasq > >>> file just has:- > >>> > >>> ENABLED=1 > >&g
[Dnsmasq-discuss] Problem with 127.0.1.1 versus 127.0.0.1
I use dnsmasq on a number of, mostly Ubuntu, home systems. One system at 192.168.1.2 acts as the DNS server for my LAN, then there are several 'client' systems that just use dnsmasq as a caching DNS server for their own lookups. I *suspect* I have a problem with looking up names via the local dnsmasq because it is listening only on 127.0.1.1 and the request is on 127.0.0.1#53. for example a 'host'command on my laptop returns:- chris$ host jacquibennett.com ;; communications error to 127.0.0.1#53: timed out jacquibennett.com has address 153.92.6.161 jacquibennett.com has IPv6 address 2a02:4780:a:1080:0:174b:7855:7 jacquibennett.com mail is handled by 5 mx1.hostinger.com. jacquibennett.com mail is handled by 10 mx2.hostinger.com. But dnsmasq is running on the laptop:- dnsmasq 7443 1 0 09:27 ?00:00:01 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d The dnsmasq configuration file on the laptop (and other client systems) is almost non-existent, it's just:- resolv-file=/run/NetworkManager/no-stub-resolv.conf ... /run/NetworkManager/no-stub-resolv.conf is:- # Generated by NetworkManager search zbmc.eu nameserver 192.168.1.2 ... and in /etc/dnsmasq.d I just have a blacklist file with lots of address= entries, but that's all. The /etc/default/dnsmasq file just has:- ENABLED=1 CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new So why do I get that timeout error from the 'host' coommand? It's as if dnsmasq on the local machine isn't listening on 127.0.0.1. Does it only listen on 127.0.1.1 by default? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What does this reply to 'host' mean?
On Sun, Oct 16, 2022 at 04:10:31PM +0200, Geert Stappers via Dnsmasq-discuss wrote: > On Sun, Oct 16, 2022 at 01:34:26PM +0100, Chris Green wrote: > > I have been moving some domains around on my hosting provider and for > > one I'm getting the following rather strange response to a 'host' > > command:- > > > > chris$ host www.jacquibennett.com > > www.jacquibennett.com is an alias for jacquibennett.com. > > jacquibennett.com has address 92.205.12.16 > > Host jacquibennett.com not found: 2(SERVFAIL) > > > > Is this just a DNS propagation oddity or have I misconfigured something? > > > > $ host www.jacquibennett.com > www.jacquibennett.com is an alias for jacquibennett.com. > jacquibennett.com has address 92.205.12.16 > jacquibennett.com mail is handled by 0 > sxb1plzcpnl489538.prod.sxb1.secureserver.net. > $ > Thank you, so just a quirk of DNS propagation. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] What does this reply to 'host' mean?
I have been moving some domains around on my hosting provider and for one I'm getting the following rather strange response to a 'host' command:- chris$ host www.jacquibennett.com www.jacquibennett.com is an alias for jacquibennett.com. jacquibennett.com has address 92.205.12.16 Host jacquibennett.com not found: 2(SERVFAIL) Is this just a DNS propagation oddity or have I misconfigured something? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dnsmasq has started crashing rather frequently
On Thu, Sep 08, 2022 at 12:50:53PM +0100, Simon Kelley wrote: > > > On 05/09/2022 20:07, Chris Green wrote: > > I am running dnsmasq version 2.86 on xubuntu 22.04. Just recently (i.e. in > > the past few weeks) it has started crashing with a segfault. The syslog has > > the following:- > > > > Sep 5 19:43:14 t470 dnsmasq[13183]: no servers found in > > /run/NetworkManager/no-stub-resolv.conf, > will retry > > ... > > ... > > ... > > Sep 5 19:43:16 t470 kernel: [25987.169664] dnsmasq[13183]: segfault at > 558f820a9d9b ip 558f80d2db8e sp 7fff6a7cb810 error 4 in > dnsmasq[558f80cdf000+52000] > > > Sep 5 19:43:16 t470 kernel: [25987.169714] Code: 29 c1 85 ed 0f 85 f9 > fe ff ff 66 90 4d 85 c9 7f 19 e9 ed fe ff ff 66 0f 1f 44 00 00 49 83 c7 > 01 49 83 e9 01 0f 84 fa fd ff ff 41 80 7f ff 2e 75 eb e9 ee fd ff ff 66 > 0f 1f 44 00 00 0f b7 45 02 > > Sep 5 19:43:16 t470 systemd[1]: dnsmasq.service: Main process exited, > code=dumped, status=11/SEGV > > Sep 5 19:43:16 t470 systemd[1]: dnsmasq.service: Failed with result > > 'core-dump'. > > > > > > It didn't used to crash like this. I see that dnsmasq was moved from > > version > > 2.85 to version 2.86 at the end of July 2022, is there possibly a bug in > > 2.86 > > causing these crashes? > > > > Almost certainly this one: > > https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=d290630d31f4517ab26392d00753d1397f9a4114 > > Yes, that describes the symptoms exactly! > > > Fixed in the forthcoming 2.87 release. > Good, thank you. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] dnsmasq has started crashing rather frequently
I am running dnsmasq version 2.86 on xubuntu 22.04. Just recently (i.e. in the past few weeks) it has started crashing with a segfault. The syslog has the following:- Sep 5 19:43:14 t470 dnsmasq[13183]: no servers found in /run/NetworkManager/no-stub-resolv.conf, will retry ... ... ... Sep 5 19:43:16 t470 kernel: [25987.169664] dnsmasq[13183]: segfault at 558f820a9d9b ip 558f80d2db8e sp 7fff6a7cb810 error 4 in dnsmasq[558f80cdf000+52000] Sep 5 19:43:16 t470 kernel: [25987.169714] Code: 29 c1 85 ed 0f 85 f9 fe ff ff 66 90 4d 85 c9 7f 19 e9 ed fe ff ff 66 0f 1f 44 00 00 49 83 c7 01 49 83 e9 01 0f 84 fa fd ff ff 41 80 7f ff 2e 75 eb e9 ee fd ff ff 66 0f 1f 44 00 00 0f b7 45 02 Sep 5 19:43:16 t470 systemd[1]: dnsmasq.service: Main process exited, code=dumped, status=11/SEGV Sep 5 19:43:16 t470 systemd[1]: dnsmasq.service: Failed with result 'core-dump'. It didn't used to crash like this. I see that dnsmasq was moved from version 2.85 to version 2.86 at the end of July 2022, is there possibly a bug in 2.86 causing these crashes? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Can I have a little clarification of -S, --local, --server please
In the man page in the section on "-S, --local, --server" it says (among other things) :- Also permitted is a -S flag which gives a domain but no IP address; this tells dnsmasq that a domain is local and it may answer queries from /etc/hosts or DHCP but should never forward queries on that domain to any upstream servers. --local is a synonym for --server to make configuration files clearer in this case. Does this mean that "a domain but no IP address" can only be given with the -S flag? I suspect not but it's not immediately clear. Looking at the syntax given in the first line it would seem that -S, --local and --server are *exactly* the same and one can choose which to use to make the configuration file more user friendly. E.g. I have in my dnsmasq configuration file:- local=/zbmc.eu/ since my static IP home system is at zbmc.eu and I give the various systems here names like esprimo.zbmc.eu, backup.zbmc.eu and so on. Presumably I could change the above line to:- server=/zbmc.eu/ and everything would work the same. Presumably the -S option is only for use in the dnsmasq command line -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?
On Mon, May 30, 2022 at 12:49:22AM +0200, Uwe Schindler via Dnsmasq-discuss wrote: > Hi Chris > > However this brings me back to where my original question came from, since > > there > > is no 'nameserver' entry pointing at localhost will dnsmasq cache? Or do I > > have > > to manually add a 'nameserver 127.0.0.1' somewhere? > > Dnsmasq will cache for requests coming from localhost (like local tools, > ssh,...) and also from other devices on your local network. Local programs > on same machine like SSH, browsers, webservers, mailservers,... work because > of your /etc/resolv.conf file: It points to dnsmasq. > > Dnsmasq caches and forwards unknown requests to the server provided by > NetworkManager (which does similar stuff like resolvconf package). Somebody > should change the /etc/default/dnsmasq comment and say "resolvconf or > NetworkManager"). > Yes, thanks, on thinking about how it's all supposed to work the above makes sense. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?
On Sun, May 29, 2022 at 05:29:41PM +0200, Uwe Schindler via Dnsmasq-discuss wrote: [snip - useful explanation, thank you] Ah, now I see how it's working. I have a file in /etc/dnsmasq.d which contains:- resolv-file=/run/NetworkManager/no-stub-resolv.conf ... and /run/NetworkManager/no-stub-resolv.conf is:- # Generated by NetworkManager search zbmc.eu nameserver 192.168.1.2 (and I have a fully configured dnsmasq running on 192.168.1.2 with links up to upstream nameservers) However this brings me back to where my original question came from, since there is no 'nameserver' entry pointing at localhost will dnsmasq cache? Or do I have to manually add a 'nameserver 127.0.0.1' somewhere? > Uwe > > Am 29.05.2022 um 16:18 schrieb Chris Green: > > With the default /etc/default/dnsmasq file on Ubuntu it says:- > > > > # If the resolvconf package is installed, dnsmasq will use its output > > # rather than the contents of /etc/resolv.conf to find upstream > > # nameservers. Uncommenting this line inhibits this behaviour. > > # Note that including a "resolv-file=" line in > > # /etc/dnsmasq.conf is not enough to override resolvconf if it is > > # installed: the line below must be uncommented. > > #IGNORE_RESOLVCONF=yes > > > > I'm pretty sure I don't have resolvconf (or openresolv) so, in this > > case how does dnsmasq find the upstream servers. /etc/resolv.conf is :- > > > > # Generated by resolvconf > > nameserver 127.0.0.1 > > search zbmc.eu > > Which is a bit odd since I don't have resolvconf. > > > > The system works OK, DNS works, but I'd like to know how. > > > > > -- > Uwe Schindler > Achterdiek 19, D-28357 Bremen > https://www.thetaphi.de > eMail: u...@thetaphi.de > > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Where does dnsmasq get upstream DNS servers by default?
With the default /etc/default/dnsmasq file on Ubuntu it says:- # If the resolvconf package is installed, dnsmasq will use its output # rather than the contents of /etc/resolv.conf to find upstream # nameservers. Uncommenting this line inhibits this behaviour. # Note that including a "resolv-file=" line in # /etc/dnsmasq.conf is not enough to override resolvconf if it is # installed: the line below must be uncommented. #IGNORE_RESOLVCONF=yes I'm pretty sure I don't have resolvconf (or openresolv) so, in this case how does dnsmasq find the upstream servers. /etc/resolv.conf is :- # Generated by resolvconf nameserver 127.0.0.1 search zbmc.eu Which is a bit odd since I don't have resolvconf. The system works OK, DNS works, but I'd like to know how. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Is there any way found this "Cannot assign requested address"?
I want to configure a system to listen on an address that it doesn't actually have until I add the address to the network interface. It works OK on Raspberry Pi systems but apparently not on a pretty standard ubuntu Linux system. When I try to start dnsmasq I get this error:- root@esprimo# systemctl status dnsmasq.service × dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2022-02-13 16:56:27 GMT; 1min 46s ago Process: 3839 ExecStartPre=/etc/init.d/dnsmasq checkconfig (code=exited, status=0/SUCCESS) Process: 3847 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2) CPU: 19ms Feb 13 16:56:27 esprimo systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Feb 13 16:56:27 esprimo dnsmasq[3847]: dnsmasq: failed to create listening socket for 192.168.1.2: Cannot assign requested address Feb 13 16:56:27 esprimo dnsmasq[3847]: failed to create listening socket for 192.168.1.2: Cannot assign requested address Feb 13 16:56:27 esprimo dnsmasq[3847]: FAILED to start up Feb 13 16:56:27 esprimo systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT Feb 13 16:56:27 esprimo systemd[1]: dnsmasq.service: Failed with result 'exit-code'. Feb 13 16:56:27 esprimo systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server. In the dnsmasq man page it has:- -z, --bind-interfaces On systems which support it, dnsmasq binds the wildcard address, even when it is listening on only some interfaces. It then discards requests that it shouldn't reply to. This has the advantage of working even when interfaces come and go and change address. This option forces dnsmasq to really bind only the interfaces it is listening on. About the only time when this is useful is when running another nameserver (or another instance of dnsmasq) on the same ma‐ chine. Setting this option also enables multiple instances of dnsmasq which provide DHCP service to run in the same machine. I thought this would mean I could do what I want which is to have:- listen-address=192.168.1.2,127.0.0.1 ... and only actually create the IP 192.168.1.2 on the network interface when I want this system to be the DHCP/DNS server. Does the error mean that Ubuntu Linux isn't among "systems which support it"? Is there any other way to get the result I want? That is dnsmasq running but not actually being visible as a server on the LAN until I do something to "switch it on"? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] When does dnsmasq read the leases file?
On Fri, Feb 11, 2022 at 08:32:27PM +0100, Matus UHLAR - fantomas via Dnsmasq-discuss wrote: > > > On 2/10/22 22:33, Chris Green wrote: > > > > As per the subject when does dnsmasq [re]read the leases file? > > > On Fri, Feb 11, 2022 at 12:16:52AM +0100, Petr Menšík wrote: > > > When it starts. It has own data stored in-memory and just rewrites lease > > > file. It would not read any new leases from it if some other service > > > pushed them there. If dnsmasq is restarted, it starts a new process. It > > > has to read all configuration all again, which has to be done for leases. > > On 11.02.22 09:01, Chris Green wrote: > > So does that mean there's no way to 'warm start' an instance of dnsmasq > > with a set of leases? > > as Petr said, when dnsmasq starts, it reads the leases file. > not after. > > > > > I am experimenting with my backup DHCP/DNS strategy and I have just > > > > stopped my dnsmasq server and started another listening on the first > > > > dnsmasq server's IP address. It's working OK'ish. However the new > > > > dnsmasq server doesn't (of course) know the name/IP pairs that the old > > > > dnsmasq server had in its memory. > > > > > > > > If I had copied the dnsmasq.lease file across from the old server to > > > > the new one would that help? Is there some way to tell dnsmasq to > > > > reload its memory from the file? If dnsmasq is restarted (e.g. by > > > > systemd) does it read the dnsmasq.leases file? > > > Surely when dnsmasq is stopped and then started it reads it's previous > > leases file so that it still knows the names/IPs of systems that it > > has provided IPs for. So if I copy that leases file to another system > > and start a copy of dnsmasq there (with same configuration as the one > > it's replacing) won't it read that leases file? > > since it reads leases file on start, copying them to second system and > starting dnsmasq there would cause reading the leases file. > > however, copying it to system with running dnsmasq would cause losing that > file. > > If you want dhcp synchronization, better use isc-dhcpd or kea-dhcpd. > > for manual (or semi-automatic) transition copying leases file could work. Yes, thanks all, I think I understand (the bits I need anyway). -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Strange error when running 'host'
On Fri, Feb 11, 2022 at 04:06:52PM +, Chris Green wrote: > I am setting up my dnsmasq backup system(s) and have just moved to the > 'other' dnsmasq server, now I'm getting odd response to 'host' :- > > chris$ host esprimo > esprimo has address 192.168.1.3 > Host esprimo not found: 5(REFUSED) > chris$ host C475IP > C475IP has address 192.168.1.101 > Host C475IP not found: 5(REFUSED) > chris$ > > I have checked that I don't have two DNS servers running. Also if I > stop dnsmasq from listening I get no response. > > dig seems to produce a sensible response:- > > chris$ dig esprimo > > ; <<>> DiG 9.16.15-Ubuntu <<>> esprimo > ;; global options: +cmd > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47052 > ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 > > ;; OPT PSEUDOSECTION: > ; EDNS: version: 0, flags:; udp: 4096 > ;; QUESTION SECTION: > ;esprimo. IN A > > ;; ANSWER SECTION: > esprimo.0 IN A 192.168.1.3 > > ;; Query time: 8 msec > ;; SERVER: 127.0.0.1#53(127.0.0.1) > ;; WHEN: Fri Feb 11 15:59:11 GMT 2022 > ;; MSG SIZE rcvd: 52 > > > So what on earth have I misconfigured? > I've moved esprimo to 192.168.1.245 and it's (basically) working again. So I'm not in a sort of disaster area but I haven't a clue what was wrong with it being at 192.168.1.3. I've had supper and a drink now so it will have to wait until the morning. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Strange error when running 'host'
I am setting up my dnsmasq backup system(s) and have just moved to the 'other' dnsmasq server, now I'm getting odd response to 'host' :- chris$ host esprimo esprimo has address 192.168.1.3 Host esprimo not found: 5(REFUSED) chris$ host C475IP C475IP has address 192.168.1.101 Host C475IP not found: 5(REFUSED) chris$ I have checked that I don't have two DNS servers running. Also if I stop dnsmasq from listening I get no response. dig seems to produce a sensible response:- chris$ dig esprimo ; <<>> DiG 9.16.15-Ubuntu <<>> esprimo ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47052 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;esprimo. IN A ;; ANSWER SECTION: esprimo.0 IN A 192.168.1.3 ;; Query time: 8 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Fri Feb 11 15:59:11 GMT 2022 ;; MSG SIZE rcvd: 52 So what on earth have I misconfigured? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about /etc/hosts
On Fri, Feb 11, 2022 at 12:24:27AM +0100, Petr Menšík wrote: > I think we would need to know, which distribution and version you are > running. /etc/hosts is not directly controlled by dnsmasq. It is often > updated by system installation, which varies across distributions. > They're a mix of [x]ubuntu and Raspberry Pi systems, however the /etc/hosts have evolved with my changes added and removed over the years so they're a long way from default now. > Depends on how t470 and t470.zbmc.eu names are used any by what > services. I would recommend --local=/zbmc.eu/ or better auth-zone=zbmc.eu. > > I doubt host 127.0.1.1 were added automatically. Unless you don't know > what does use it, I would recommend to comment it out and reboot. Unless > you see any visible failures or delays during boot, it is safe to be > removed :) > I *think* I probably added the 127.0.1.1 so that t470 can 'talk to itself' by name as well as by using localhost. > Cheers, > Petr > > On 2/10/22 20:24, Chris Green wrote: > > When running dnsmasq it (by default) uses /etc/hosts to provide some > > system's addresses. > > > > Some of my systems have their names in the /etc/hosts file against > > a loopback address so host t470 has:- > > > > 127.0.0.1 localhost > > 127.0.1.1 t470.zbmc.eu t470 > > > > > > While others only have their names against their (static) IP address > > so host backup has:- > > > > 192.168.1.1 2860n # Draytek router, internet > > 192.168.1.2 dns.zbmc.eu dns # this Pi running dnsmasq > > 192.168.1.3 esprimo zbmc.eu # my desktop system > > 192.168.1.4 backup.zbmc.eu backup # backup Raspberry Pi, also > > DNS/DHCP backup > > > > > > Is that 127.0.1.1 loopback address just so that there is an IP for a > > system to refer to itself (particularly in the case where it has DHCP > > assigned IP so there isn't a fixed address for itself)? > > > > > > Where a system has a static/fixed IP is it OK to have only the > > 'localhost' loopback address and the 'real' static IP for 'self'? > > E.g. can one have:- > > > > 127.0.0.1 localhost > > > > 192.168.1.1 2860n # Draytek router, internet > > 192.168.1.2 dns.zbmc.eu dns # this Pi running dnsmasq > > 192.168.1.3 esprimo zbmc.eu # my desktop system > > 192.168.1.4 backup.zbmc.eu backup # backup Raspberry Pi, also > > DNS/DHCP backup > > > > As the /etc/hosts file on all of those systems (which have static IP)? > > > -- > Petr Menšík > Software Engineer > Red Hat, http://www.redhat.com/ > email: pemen...@redhat.com > PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB > > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about /etc/hosts
oN fRI, fEB 11, 2022 AT 07:30:51am +0100, gEERT sTAPPERS VIA dNSMASQ-DISCUSS WROTE: > On Fri, Feb 11, 2022 at 12:24:27AM +0100, Petr Menšík wrote: > > On 2/10/22 20:24, Chris Green wrote: > > > When running dnsmasq it (by default) uses /etc/hosts to provide some > > > system's addresses. > > > > > > Some of my systems have their names in the /etc/hosts file against > > > a loopback address so host t470 has:- > > > > > > 127.0.0.1 localhost > > > 127.0.1.1 t470.zbmc.eu t470 > > > > > > > > > While others only have their names against their (static) IP address > > > so host backup has:- > > > > > > 192.168.1.1 2860n # Draytek router, internet > > > 192.168.1.2 dns.zbmc.eu dns # this Pi running dnsmasq > > > 192.168.1.3 esprimo zbmc.eu # my desktop system > > > 192.168.1.4 backup.zbmc.eu backup # backup Raspberry Pi, also > > > DNS/DHCP backup > > > > > > > > > Is that 127.0.1.1 loopback address just so that there is an IP for a > > > system to refer to itself (particularly in the case where it has DHCP > > > assigned IP so there isn't a fixed address for itself)? > > > > > > > > > Where a system has a static/fixed IP is it OK to have only the > > > 'localhost' loopback address and the 'real' static IP for 'self'? > > > E.g. can one have:- > > > > > > 127.0.0.1 localhost > > > > > > 192.168.1.1 2860n # Draytek router, internet > > > 192.168.1.2 dns.zbmc.eu dns # this Pi running dnsmasq > > > 192.168.1.3 esprimo zbmc.eu # my desktop system > } } 192.168.1.3 esprimo.zbmc.eu # my desktop system > > > 192.168.1.4 backup.zbmc.eu backup # backup Raspberry Pi, also > > > DNS/DHCP backup > > > > > > As the /etc/hosts file on all of those systems (which have static IP)? > > > > > I think we would need to know, which distribution and version you are > > running. > > And which computer of them is running dnsmasq as Domain Name Server > for the other computers. > Currently 'dns' is running dnsmasq as the DHCP/DNS server for the LAN, however these questions are as a result of me wanting to move that service to one of the other systems on the LAN. > > /etc/hosts is not directly controlled by dnsmasq. > > dnsmasq, as DNServer, uses /etc/hosts as source > for hostname-IPaddress-mapping. Consider it as source of a single thruth. > > Back to > > > As the /etc/hosts file on all of those systems (which have static IP)? > > That is fairly ignorant. The whole idea of DNS is eliminating the > maintainance of /etc/hosts files. And having hostname-IPaddress-mapping > in several places (/etc/hosts and DNS) creates several thruths, which > should be avoided. > Yes, I know, but *some* systems have to have static IP:- 192.168.1.1 The VDSL router, not *absolutely* necessary but it is the default route 192.168.1.2 This is the DHCP/DNS server so has to be static 192.168.1.3 This is SMTP server among other things, if DNS fails I need it to remain as 192.168.1.3 192.168.1.4 Going to become backup DHCP/DNS -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] When does dnsmasq read the leases file?
On Fri, Feb 11, 2022 at 12:16:52AM +0100, Petr Menšík wrote: > On 2/10/22 22:33, Chris Green wrote: > > As per the subject when does dnsmasq [re]read the leases file? > > > > I am experimenting with my backup DHCP/DNS strategy and I have just > > stopped my dnsmasq server and started another listening on the first > > dnsmasq server's IP address. It's working OK'ish. However the new > > dnsmasq server doesn't (of course) know the name/IP pairs that the old > > dnsmasq server had in its memory. > > > > If I had copied the dnsmasq.lease file across from the old server to > > the new one would that help? Is there some way to tell dnsmasq to > > reload its memory from the file? If dnsmasq is restarted (e.g. by > > systemd) does it read the dnsmasq.leases file? > > > When it starts. It has own data stored in-memory and just rewrites lease > file. It would not read any new leases from it if some other service > pushed them there. If dnsmasq is restarted, it starts a new process. It > has to read all configuration all again, which has to be done for leases. > So does that mean there's no way to 'warm start' an instance of dnsmasq with a set of leases? Surely when dnsmasq is stopped and then started it reads it's previous leases file so that it still knows the names/IPs of systems that it has provided IPs for. So if I copy that leases file to another system and start a copy of dnsmasq there (with same configuration as the one it's replacing) won't it read that leases file? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Questions about /etc/hosts
When running dnsmasq it (by default) uses /etc/hosts to provide some system's addresses. Some of my systems have their names in the /etc/hosts file against a loopback address so host t470 has:- 127.0.0.1 localhost 127.0.1.1 t470.zbmc.eu t470 While others only have their names against their (static) IP address so host backup has:- 192.168.1.1 2860n # Draytek router, internet 192.168.1.2 dns.zbmc.eu dns # this Pi running dnsmasq 192.168.1.3 esprimo zbmc.eu # my desktop system 192.168.1.4 backup.zbmc.eu backup # backup Raspberry Pi, also DNS/DHCP backup Is that 127.0.1.1 loopback address just so that there is an IP for a system to refer to itself (particularly in the case where it has DHCP assigned IP so there isn't a fixed address for itself)? Where a system has a static/fixed IP is it OK to have only the 'localhost' loopback address and the 'real' static IP for 'self'? E.g. can one have:- 127.0.0.1 localhost 192.168.1.1 2860n # Draytek router, internet 192.168.1.2 dns.zbmc.eu dns # this Pi running dnsmasq 192.168.1.3 esprimo zbmc.eu # my desktop system 192.168.1.4 backup.zbmc.eu backup # backup Raspberry Pi, also DNS/DHCP backup As the /etc/hosts file on all of those systems (which have static IP)? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How to get dnsmasq to forget a changed IP address?
On Fri, Feb 04, 2022 at 11:57:46PM +0100, Geert Stappers via Dnsmasq-discuss wrote: > On Fri, Feb 04, 2022 at 06:44:17PM +0000, Chris Green wrote: > > I have just changed a system on my LAN to a static IP. I have added > > its address to /etc/hosts on my LAN's DHCP/DNS server (dnsmasq) and I > > have restarted dnsmasq on that system. I have also restarted dnsmasq > > on 'this' system (my laptop). However I'm still getting the old IP > > address for the changed system. > > > > How do I get systems to forget the old address? > > > > By understanding where IPv4-addresses are stored. > > Do known that DHCP server **and also** the DHCP client > do try to keep the IPv4-address. "try to keep" as in "keep assigned"(by > server) and "keep using" (by the client) > > Manual page of DHCP-server dnsmasq ( `man dnsmasq` ) mentions: > > /var/lib/misc/dnsmasq.leases > /var/db/dnsmasq.leases > > > Where the DHCP-client stores it's information, is up to the DHCP-client. > I'd looked at /var/lib/misc/dnsmasq.leases. However it turns out my problem was a typo! I was changing a system from DHCP client to static IP and I had mis-typed the new IP in /etc/hosts both on the DHCP/DNS server and on the system whose IP had changed. That did confuse things somewhat! My overnight backup scripts showed me the error by reporting that they couldn't connect to the backup system, with its incorrect IP. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Copying dnsmasq.leases, any issues to be aware of?
On Fri, Feb 04, 2022 at 09:28:42PM +, Simon Kelley wrote: > > > On 04/02/2022 18:16, Chris Green wrote: > > I'm looking at ways to provide backup DHCP/DNS with dnsmasq. This is > > on a small, fairly 'quiet' home LAN so there aren't dozens of clients > > connecting and disconnecting every second. Also if DHCP/DNS is not > > available for a few minutes the world won't end! :-) > > > > So, I'm proposing to have dnsmasq installed on two systems, one (say > > dns1, 192.168.1.2) is the live DHCP/DNS server, the other (say dns2, > > 192.168.1.3), both with static IP. > > > > If dns1 dies or needs to be turned off I just copy the dnsmasq > > configuration (stored elsewhere as well of course) to dns2 and also > > copy the dnsmasq.leases file and [re]start dnsmasq on dns2. Will this > > work reasonably OK? I.e. if/when a system on the LAN broadcasts a > > DHCP request will it get the same IP again? > > > > It's not a disaster if a system gets a different IP anyway, if > > something *really* needs a fixed IP I can add a dhcp-host in the > > dnsmasq configuration. > > > > I can even have dnsmasq running on dns2 all the time with it > > configured to provide only local DNS and no DHCP, then it's just 'copy > > dnsmasq configuration, copy dnsmasq.leases, restart dnsmasq. > > > > (All my systems run syncthing so it's very easy to have pretty much > > live copies of files synchronised across systems) > > > > To be honest, even if you didn't bother copying the leases file, most > systems would get the same address. The clients try to renew the lease on > the exiting DHCP server and when they get no response they broadcast the > renewal to try and find a new server. As long as there's no reason not to, > the new server will accept the client's request for the address it already > had. > OK, thanks Simon, I sort of knew this already but it's good to have it all confirmed. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Copying dnsmasq.leases, any issues to be aware of?
I'm looking at ways to provide backup DHCP/DNS with dnsmasq. This is on a small, fairly 'quiet' home LAN so there aren't dozens of clients connecting and disconnecting every second. Also if DHCP/DNS is not available for a few minutes the world won't end! :-) So, I'm proposing to have dnsmasq installed on two systems, one (say dns1, 192.168.1.2) is the live DHCP/DNS server, the other (say dns2, 192.168.1.3), both with static IP. If dns1 dies or needs to be turned off I just copy the dnsmasq configuration (stored elsewhere as well of course) to dns2 and also copy the dnsmasq.leases file and [re]start dnsmasq on dns2. Will this work reasonably OK? I.e. if/when a system on the LAN broadcasts a DHCP request will it get the same IP again? It's not a disaster if a system gets a different IP anyway, if something *really* needs a fixed IP I can add a dhcp-host in the dnsmasq configuration. I can even have dnsmasq running on dns2 all the time with it configured to provide only local DNS and no DHCP, then it's just 'copy dnsmasq configuration, copy dnsmasq.leases, restart dnsmasq. (All my systems run syncthing so it's very easy to have pretty much live copies of files synchronised across systems) -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How to resolve resolv.conf problems?
Well, after chasing around for some days and looking for answers to this issue I have decided that Network Manager is the problem. On my Raspberry Pi systems with no Network Manager it all configures correctly when you install dnsmasq. /etc/resolv.conf has "nameserver 127.0.0.1" in it and /run/dnsmasq/resolv.conf has "nameserver 192.168.1.2" (which is correct for me as 192.168.1.2 is the DNS server for my LAN) and dnsmasq is run with "-r /run/dnsmasq/resolv.conf". However, whatever I have tried, on this xubuntu 21.10 laptop it configures as above *except* that /run/dnsmasq/resolv.conf is empty, it says "# Generated by resolvconf" but has nothing in it. So, what I have done is to put a file in /etc/dnsmasq.d containing just the one line:- resolv-file=/run/NetworkManager/no-stub-resolv.conf The file /run/NetworkManager/no-stub-resolv.conf does contain the correct upstream DNS server. I suspect that Network Manager with dns=dnsmasq in the configuration file is supposed to configure things correctly (as on the Pi above) but for some reason it doesn't work quite right. However my workaround isn't too onerous and means my laptop can run dnsmasq and will use whatever DNS is provided by the network it is connected to. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How to resolve resolv.conf problems?
On Sat, Dec 04, 2021 at 02:55:08PM +, Chris Green wrote: > > As a final question, if one wants dnsmasq to do local cacheing do you > put 'nameserver 127.0.0.1' in the resolv.conf file and then provide > the upstream dns server elsewhere in the configuration? > I think this is mostly explained by the dnsmasq man page:- In order to configure dnsmasq to act as cache for the host on which it is running, put "nameserver 127.0.0.1" in /etc/resolv.conf to force local processes to send queries to dnsmasq. Then either specify the upstream servers directly to dnsmasq using --server options or put their addresses real in another file, say /etc/resolv.dnsmasq and run dnsmasq with the --resolv-file /etc/resolv.dnsmasq option. This second technique al‐ lows for dynamic update of the server addresses by PPP or DHCP. Does this mean that the configuration on the Raspberry Pi is correct? (as described at the start of this thread) Many, many tutorials one can find on the internet have /etc/resolv.conf like this:- search this.lan nameserver 127.0.0.1 nameserver 8.8.8.8 I assume this is just plain wrong! -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Comments, can I add comments on same line as confiuguration?
It's not explicitly allowed according te the man page but can I add comments to configuration lines in dnsmasq.conf, e.g. :- domain-needed # don't forward plain names dhcp-option=3,192.168.1.1 # default route -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Is this a reasonable solution to providing DHCP/DNS backup?
I have been thinking about this problem on and off ever since I brought it up here a few months ago. I think I have what sounds to me like a workable solution but I'd like to hear what others think, particularly if there are any very obvious holes in it. The idea is to have two systems on the LAN which are configured to run dnsmasq with identical configuration. I have systems with static IP, call them maindns on 192.168.1.2 and backupdns on 192.168.1.3 at the moment. At preset 192.168.1.2 is the DNS and DHCP server for the LAN. So, to provide backup I will configure backupdns to run dnsmasq as well, with listen-address=192.168.1.2 in its configuration so that it doesn't actually do anything (except provide local DNS via the loopback address maybe). If maindns dies then I simply add 192.168.1.2 to backupdns's ethernet interface:- ip addr add 192.168.1.2 dev enp0s25 It won't provide instant failover as I have to execute the above command and I'm not going to try and automate it, I don't need instant hot backup. However I can't see why it shouldn't work and allow me to fix maindns at my leisure. Can anyone see any major holes in this strategy? ... or even minor holes that mean I'll have to do a bit more than the 'ip' command? I'm aiming to synchronise /etc/dnsmasq.conf and /etc/dnsmasq.d (or at least keep them in step manually, it's not as if they change frequently). I may even try and synchronise the dnsmasq lease file. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How to provide DHCP for WiFi hotspot?
On Mon, Oct 11, 2021 at 10:59:01PM +0100, Alex Morris wrote: > On Mon, 11 Oct 2021, at 21:22, Chris Green wrote: > > > > Do I just need to add a DHCP range line such as:- > > > > dhcp-range=10.42.0.100,10.42.0.200 > > > > to /etc/dnsmasq.conf to get IP addresses for systems that connect to > > the WiFi hotspot or is there more needed? > > > > Depends what you want the clients to do. > > If you just want the clients to have IP addresses and be able to talk to > each other within the same subnet, then that should suffice. > > If you want the clients to also be able to communicate with other networks, > e.g. the Internet, then you may wish to consider also specifying options > 3 and 6. > Thanks, just what I was after knowing. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] How to provide DHCP for WiFi hotspot?
I am running dnsmasq on my xubuntu 21.04 laptop, I haven't changed the configuration from default at all yet. I have a WiFi hotspot configuration that brings up the WiFi as a server with IP confuguration:- inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255 Do I just need to add a DHCP range line such as:- dhcp-range=10.42.0.100,10.42.0.200 to /etc/dnsmasq.conf to get IP addresses for systems that connect to the WiFi hotspot or is there more needed? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What actually happens when dnsmasq is installed on a system running systemd (with systemd-resolved)?
On Tue, Sep 28, 2021 at 11:59:09PM +0100, Simon Kelley wrote: > On 28/09/2021 20:28, Chris Green wrote: > > I run xubuntu version 21.04 on several systems. Thus the default DNS > > cache and configuring of /etc/resolv.conf is done by systemd and its > > minions. > > > > Does anyone here know what happens if/when I install dnsmasq? Is the > > installation process clever enough to reconfigure and/or turn off the > > right things in systemd so that dnsmasq gets to do local DNS cacheing > > and so on? > > > > That's not a simple question to answer. It depends on the distro > packages for dnsmasq, systemd and possibly others. > > Systemd has a daemon called systemd-resolved which has much the same > functionality ad the DNS part of dnsmasq. > Yes, the interactions of systemd and dnsmasq are what I'm interested in. I guess the right place to ask (in my [x]ubuntu case is one of the Ubuntu support lists. I'll try there. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] What actually happens when dnsmasq is installed on a system running systemd (with systemd-resolved)?
I run xubuntu version 21.04 on several systems. Thus the default DNS cache and configuring of /etc/resolv.conf is done by systemd and its minions. Does anyone here know what happens if/when I install dnsmasq? Is the installation process clever enough to reconfigure and/or turn off the right things in systemd so that dnsmasq gets to do local DNS cacheing and so on? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Mon, Sep 06, 2021 at 01:17:52PM +0200, Matus UHLAR - fantomas via Dnsmasq-discuss wrote: > On 05.09.21 22:45, Chris Green wrote: > > I did say what versions I was running. The version which causes the > > problem is 2.80, the version that fixes it is 2.84. > > I don't think dnsmasq comes with init script for RPI. > And I'm not sure anyone with RPI is reading this list (did someone reply so > far?) > It's part of the dnsmasq distribution on both Pi and Ubuntu and I should think just about everywhere else:- chris@dns$ dpkg -L dnsmasq /. /etc /etc/default /etc/default/dnsmasq /etc/dnsmasq.conf /etc/dnsmasq.d /etc/dnsmasq.d/README /etc/init.d /etc/init.d/dnsmasq /etc/insserv.conf.d /etc/insserv.conf.d/dnsmasq /etc/resolvconf /etc/resolvconf/update.d /etc/resolvconf/update.d/dnsmasq /lib /lib/systemd /lib/systemd/system /lib/systemd/system/dnsmasq.service /usr /usr/lib /usr/lib/resolvconf /usr/lib/resolvconf/dpkg-event.d /usr/lib/resolvconf/dpkg-event.d/dnsmasq /usr/lib/tmpfiles.d /usr/lib/tmpfiles.d/dnsmasq.conf /usr/share /usr/share/dnsmasq /usr/share/dnsmasq/installed-marker /usr/share/doc /usr/share/doc/dnsmasq I've posted the diff as an attachment, I don't really think it's very edifying! :-) -- Chris Green 17a18 > INSTANCE="${2}" 22,23c23,24 < if [ -r /etc/default/$NAME ]; then < . /etc/default/$NAME --- > if [ -r /etc/default/${NAME}${INSTANCE:+.${INSTANCE}} ]; then > . /etc/default/${NAME}${INSTANCE:+.${INSTANCE}} 26c27 < # Get the system locale, so that messages are in the correct language, and the --- > # Get the system locale, so that messages are in the correct language, and the 29,30c30,31 < . /etc/default/locale < export LANG --- > . /etc/default/locale > export LANG 34c35 < # package 'dnsmasq' is removed but not purged, even if the dnsmasq-base --- > # package 'dnsmasq' is removed but not purged, even if the dnsmasq-base 37,38c38,39 < < test -x $DAEMON || exit 0 --- > > test -x ${DAEMON} || exit 0 42c43 < . /lib/lsb/init-functions --- > . /lib/lsb/init-functions 44,64c45,65 < log_warning_msg () { < echo "${@}." < } < < log_success_msg () { < echo "${@}." < } < < log_daemon_msg () { < echo -n "${1}: $2" < } < <log_end_msg () { < if [ $1 -eq 0 ]; then < echo "." < elif [ $1 -eq 255 ]; then < /bin/echo -e " (warning)." < else < /bin/echo -e " failed!" < fi < } --- > log_warning_msg () { > echo "${@}." > } > > log_success_msg () { > echo "${@}." > } > > log_daemon_msg () { > echo -n "${1}: ${2}" > } > > log_end_msg () { > if [ "${1}" -eq 0 ]; then > echo "." > elif [ "${1}" -eq 255 ]; then > /bin/echo -e " (warning)." > else > /bin/echo -e " failed!" > fi > } 76c77 < # Note that if the resolvconf package is installed it is not possible to --- > # Note that if the resolvconf package is installed it is not possible to 80,81c81,82 < if [ ! "$RESOLV_CONF" ] && <[ "$IGNORE_RESOLVCONF" != "yes" ] && --- > if [ ! "${RESOLV_CONF}" ] && >[ "${IGNORE_RESOLVCONF}" != "yes" ] && 84c85 < RESOLV_CONF=/run/dnsmasq/resolv.conf --- > RESOLV_CONF=/run/dnsmasq/resolv.conf 87,88c88,89 < for INTERFACE in $DNSMASQ_INTERFACE; do < DNSMASQ_INTERFACES="$DNSMASQ_INTERFACES -i $INTERFACE" --- > for INTERFACE in ${DNSMASQ_INTERFACE}; do > DNSMASQ_INTERFACES="${DNSMASQ_INTERFACES} -i ${INTERFACE}" 91,92c92,93 < for INTERFACE in $DNSMASQ_EXCEPT; do < DNSMASQ_INTERFACES="$DNSMASQ_INTERFACES -I $INTERFACE" --- > for INTERFACE in ${DNSMASQ_EXCEPT}; do > DNSMASQ_INTERFACES="${DNSMASQ_INTERFACES} -I ${INTERFACE}" 95c96 < if [ ! "$DNSMASQ_USER" ]; then --- > if [ ! "${DNSMASQ_USER}" ]; then 100c101 < # It's automatically ignored if --interface --except-interface, --listen-address --- > # It's automatically ignored if --interface --except-interface, > --listen-address 105c106 < DNSMASQ_OPTS="$DNSMASQ_OPTS --local-service" --- > DNSMASQ_OPTS="${DNSMASQ_OPTS} --local-service" 107,108c108,109 < # If the dns-root-data package is installed, then the trust anchors will be < # available in $ROOT_DS, in BIND zone-file
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sun, Sep 05, 2021 at 10:34:19PM +0200, Geert Stappers via Dnsmasq-discuss wrote: > On Sun, Sep 05, 2021 at 01:18:18PM +0100, Chris Green wrote: > > On Sun, Sep 05, 2021 at 12:51:54PM +0100, Chris Green wrote: > > [snip] > > > > > > It's the calls to systemd-start-resolvconf and systemd-stop-resolvconf > > > that are causing > > > the error. For some reason on the Pi it causes this error, but not on my > > > xubuntu system. > > > > > > Looking further the /etc/init.d/dnsmasq file has been quite extensively > > > revised between > > > the older version on my Pi and the newer version on xubuntu, many of > > > those revisions > > > look as if they're protecting against empty parameters. > > > > > ... and copying the 2.84 version of /etc/init.d/dnsmasq over to the > > Raspberry Pi has fixed the error. (Yes, I know copying bits of one > > version to another is not in general a good idea but this is just a > > bash script so is unlikely to have dependencies etc.) > > Please be a better community member. Tell more about your side of > the story. Share here the two versions of /etc/init.d/dnsmasq One > version is "the Raspberry Pi version", the other "xubuntu". Doing so > makes it possible to compare the versions. It will reveal what made > the real difference. > I did say what versions I was running. The version which causes the problem is 2.80, the version that fixes it is 2.84. A diff between the two versions shows a *lot* of changes but they're all to do with quoting etc. and making sure that empty parameters aren't causing problems. There's no real change in logic that I can see. A typical change is:- < case "$RETVAL" in --- > case "${RETVAL}" in -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's the "right" way to specify upstream servers?
On Sun, Sep 05, 2021 at 01:51:22PM +0200, Matus UHLAR - fantomas via Dnsmasq-discuss wrote: > > > On 03.09.21 17:13, Chris Green wrote: > > > > I know there probably isn't a "right" way to do this but, while I've > > > > been trying to sort out how to make my dns/dhcp more resilient, I have > > > > looked at my existing dnsmasq running on a Pi and it looks a bit odd > > > > to me. > > > > > > > > It's a pretty standard, off the shelf Raspberry Pi installation using > > > > the Lite version as it's headless. The dnsmasq.conf file has been > > > > changed quite a lot over the years though and I wonder if it's still > > > > optimal. > > > > > > > > The upstream servers *seem* to be specified in /etc/dhcpcd.conf as > > > > follows:- > > > > > > > ># Example static IP configuration: > > > >interface eth0 > > > >static ip_address=192.168.1.2/24 > > > >#static ip6_address=fd51:42f8:caae:d92e::ff/64 > > > >static routers=192.168.1.1 > > > >static domain_name_servers=192.168.1.2 1.1.1.1 212.159.13.49 > > > On Sat, Sep 04, 2021 at 04:33:10PM +0200, Matus UHLAR - fantomas via > > Dnsmasq-discuss wrote: > > > this is dhcp client configuration, not dhcp server. > > > > > > iiuc it tells dhcp client not to use IP address, default route nor servers > > > that DHCP server provided. > > On 04.09.21 17:52, Chris Green wrote: > > This *is* the DHCP server for my LAN so these are the upstream DNS > > servers it gives to its clients. > > - why do you run a DHCP client on a DHCP server then? > - Especially when you configured it statically and not to use DHCP settings? > > note that this is dnsmasq list, not dhcpcd. > Because that's what you get if you install dnsmasq and very little else on an 'out of the box' Raspberry Pi. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sun, Sep 05, 2021 at 12:51:54PM +0100, Chris Green wrote: [snip] > > It's the calls to systemd-start-resolvconf and systemd-stop-resolvconf that > are causing > the error. For some reason on the Pi it causes this error, but not on my > xubuntu system. > > Looking further the /etc/init.d/dnsmasq file has been quite extensively > revised between > the older version on my Pi and the newer version on xubuntu, many of those > revisions > look as if they're protecting against empty parameters. > ... and copying the 2.84 version of /etc/init.d/dnsmasq over to the Raspberry Pi has fixed the error. (Yes, I know copying bits of one version to another is not in general a good idea but this is just a bash script so is unlikely to have dependencies etc.) -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sun, Sep 05, 2021 at 10:14:02AM +0100, Chris Green wrote: [snip] > > I'm going to try a dnsmasq installation on a non Raspberry Pi system and > see what happens. > ... and after going round lots of circles I think I have found what causes the problem - it's the systemd configuration for dnsmasq that produces the "Too few arguments." I found that the error appears when you stop dnsmasq as well as when you start it. The systemd service file for dnsmasq is:- [Unit] Description=dnsmasq - A lightweight DHCP and caching DNS server Requires=network.target Wants=nss-lookup.target Before=nss-lookup.target After=network.target [Service] Type=forking PIDFile=/run/dnsmasq/dnsmasq.pid # Test the config file and refuse starting if it is not valid. ExecStartPre=/etc/init.d/dnsmasq checkconfig # We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a # wrapper picking up extra configuration files and then execs dnsmasq # itself, when called with the "systemd-exec" function. ExecStart=/etc/init.d/dnsmasq systemd-exec # The systemd-*-resolvconf functions configure (and deconfigure) # resolvconf to work with the dnsmasq DNS server. They're called like # this to get correct error handling (ie don't start-resolvconf if the # dnsmasq daemon fails to start). ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target It's the calls to systemd-start-resolvconf and systemd-stop-resolvconf that are causing the error. For some reason on the Pi it causes this error, but not on my xubuntu system. Looking further the /etc/init.d/dnsmasq file has been quite extensively revised between the older version on my Pi and the newer version on xubuntu, many of those revisions look as if they're protecting against empty parameters. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
I have looked at a new installation of dnsmasq on another Raspberry Pi and that does exactly the same thing. A ps shows:- dnsmasq605 1 0 Sep04 ?00:00:17 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d In syslog it seems to produce a "Too few arguments" error every time it's [re]started:- root@backup# grep 'Too few' syslog* syslog.1:Sep 4 11:55:06 backup dnsmasq[16069]: Too few arguments. syslog.1:Sep 4 12:16:19 backup dnsmasq[17888]: Too few arguments. syslog.1:Sep 4 12:16:19 backup dnsmasq[17946]: Too few arguments. syslog.1:Sep 4 12:29:27 backup dnsmasq[19102]: Too few arguments. syslog.1:Sep 4 12:29:27 backup dnsmasq[19160]: Too few arguments. syslog.1:Sep 4 17:07:47 backup dnsmasq[606]: Too few arguments. That last one is the process after the running copy of dnsmasq. So there would seem to be something broken about the Raspberry Pi default configuration. This is the version information:- chris@backup$ dnsmasq --version Dnsmasq version 2.80 Copyright (c) 2000-2018 Simon Kelley Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile This software comes with ABSOLUTELY NO WARRANTY. Dnsmasq is free software, and you are welcome to redistribute it under the terms of the GNU General Public License, version 2 or 3. Same error reported on Stack Exchange about a year and a half ago:- https://raspberrypi.stackexchange.com/questions/106249/dnsmasq-error-too-few-arguments I'm going to try a dnsmasq installation on a non Raspberry Pi system and see what happens. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sat, Sep 04, 2021 at 10:33:23PM +0100, Simon Kelley wrote: > > > > Do see already that dnsmasq is started (with some PID) > > And there is another dnsmasq, probably a dnsmasq script, > > with another PID. > > > > Answering "And how is dnsmasq started? What is in configuration file?" > > might reveal what is the other dnsmasq (script). > > > > > > When using the DHCP-script, a dnsmasq daemon actually consists of two > processes, which normally end up with consecutive PIDs, so this is > probably npt a case of dnsmasq being invoked twice, but an error during > the running of the script by the second process which exists to do > exactly that. > I'm not explicitly starting a DHCP script, does it always run even if not explicitly invoked? If not then I need to work out what is running it without telling me! -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sat, Sep 04, 2021 at 10:19:09PM +0200, Geert Stappers via Dnsmasq-discuss wrote: > On Sat, Sep 04, 2021 at 08:16:44PM +0100, Chris Green wrote: > > > > > This is with log-queries=extra and log-dhcp set. > > And how is dnsmasq started? What is in configuration file? > > > > Is there anything else I can do to get more diagnostics? > > Do see already that dnsmasq is started (with some PID) > And there is another dnsmasq, probably a dnsmasq script, > with another PID. > > Answering "And how is dnsmasq started? What is in configuration file?" > might reveal what is the other dnsmasq (script). > > It's a pretty close to default installation on a Raspberry Pi with dnsmasq being [re]started from /etc/init.d (though systemd is underneath implementing this). Here is my dnsmasq.conf with comments stripped out:- domain-needed bogus-priv expand-hosts domain=zbmc.eu dhcp-range=192.168.1.80,192.168.1.127,12h dhcp-option=3,192.168.1.1 dhcp-leasefile=/home/chris/.cfg/dns/dnsmasq.leases dhcp-authoritative log-queries=extra log-dhcp local=/zbmc.eu/ cname=bbb,beaglebone cname=x201,maxine-X201 cname=oki,MC342-AE529C dhcp-host=00:BB:3A:E9:A3:15,maxineKindle dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 dhcp-host=28:EF:01:2D:EB:07,chrisKindle dhcp-host=08:EB:74:9D:47:53,humaxFreeview dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy dhcp-host=AC:AE:19:2C:3F:5A,roku dhcp-host=10:FE:ED:63:29:74,TL-WA7210 dhcp-host=1c:1b:0d:60:9a:e1,ben,192.168.1.121 dhcp-host=44:00:49:fd:3d:4d,maxTablet dhcp-host=cc:ab:2c:39:69:2b,benYouview dhcp-host=00:74:22:80:6a:65,bison dhcp-host=00:25:36:AE:52:9C,192.168.1.50 -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sat, Sep 04, 2021 at 09:20:37PM +0100, Simon Kelley wrote: > On 04/09/2021 17:14, Chris Green wrote: > > When [re]starting dnsmasq I see the following in syslog:- > > > > Sep 4 17:01:08 dns systemd[1]: dnsmasq.service: Succeeded. > > Sep 4 17:01:08 dns systemd[1]: Stopped dnsmasq - A lightweight DHCP > > and caching DNS server. > > Sep 4 17:01:08 dns systemd[1]: Starting dnsmasq - A lightweight DHCP > and caching DNS server... > > Sep 4 17:01:08 dns dnsmasq[18982]: dnsmasq: syntax check OK. > > Sep 4 17:01:08 dns dnsmasq[18991]: started, version 2.80 cachesize 150 > > Sep 4 17:01:08 dns dnsmasq[18991]: DNS service limited to local subnets > > Sep 4 17:01:08 dns dnsmasq[18991]: compile time options: IPv6 GNU-getopt > DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect > inotify dumpfile > > Sep 4 17:01:08 dns dnsmasq-dhcp[18991]: DHCP, IP range 192.168.1.80 -- > 192.168.1.127, lease time 12h > > Sep 4 17:01:08 dns dnsmasq[18991]: using local addresses only for > > domain zbmc.eu > > Sep 4 17:01:08 dns dnsmasq[18991]: reading /run/dnsmasq/resolv.conf > > Sep 4 17:01:08 dns dnsmasq[18991]: using local addresses only for > > domain zbmc.eu > > Sep 4 17:01:08 dns dnsmasq[18991]: ignoring nameserver 192.168.1.2 - > > local interface > > Sep 4 17:01:08 dns dnsmasq[18991]: using nameserver 1.1.1.1#53 > > Sep 4 17:01:08 dns dnsmasq[18991]: using nameserver 212.159.13.49#53 > > Sep 4 17:01:08 dns dnsmasq[18991]: read /etc/hosts - 12 addresses > > Sep 4 17:01:08 dns dnsmasq[18992]: Too few arguments. > > Sep 4 17:01:08 dns systemd[1]: Started dnsmasq - A lightweight DHCP > > and caching DNS server. > > Sep 4 17:02:17 dns dnsmasq[18991]: read /etc/hosts - 12 addresses > > Sep 4 17:05:05 dns dnsmasq-dhcp[18991]: DHCPREQUEST(eth0) 192.168.1.95 > > cc:ab:2c:39:69:2b > > Sep 4 17:05:05 dns dnsmasq-dhcp[18991]: DHCPACK(eth0) 192.168.1.95 > > cc:ab:2c:39:69:2b > benYouview > > > > What does that error from process 18992 mean "Too few arguments."? Does it > > indicate > > any sort of problem? > > > > The PID of the process is different, so I'd guess that it's coming from > a dhcp-script invocation. > You mean a script invoked by having the --dhcp-script= option set? I'm not doing that explicitly Will it get invoked implicitly because I have set dhcp-leasefile? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's this error in syslog mean?
On Sat, Sep 04, 2021 at 07:09:30PM +0200, john doe wrote: > On 9/4/2021 6:14 PM, Chris Green wrote: > > When [re]starting dnsmasq I see the following in syslog:- > > > > Sep 4 17:01:08 dns systemd[1]: dnsmasq.service: Succeeded. > > Sep 4 17:01:08 dns systemd[1]: Stopped dnsmasq - A lightweight DHCP and > caching DNS server. > > Sep 4 17:01:08 dns systemd[1]: Starting dnsmasq - A lightweight DHCP > and caching DNS server... > > Sep 4 17:01:08 dns dnsmasq[18982]: dnsmasq: syntax check OK. > > Sep 4 17:01:08 dns dnsmasq[18991]: started, version 2.80 cachesize 150 > > Sep 4 17:01:08 dns dnsmasq[18991]: DNS service limited to local > > subnets > > Sep 4 17:01:08 dns dnsmasq[18991]: compile time options: IPv6 GNU-getopt > DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect > inotify dumpfile > > Sep 4 17:01:08 dns dnsmasq-dhcp[18991]: DHCP, IP range 192.168.1.80 -- > 192.168.1.127, lease time 12h > > Sep 4 17:01:08 dns dnsmasq[18991]: using local addresses only for > > domain zbmc.eu > > Sep 4 17:01:08 dns dnsmasq[18991]: reading /run/dnsmasq/resolv.conf > > Sep 4 17:01:08 dns dnsmasq[18991]: using local addresses only for > > domain zbmc.eu > > Sep 4 17:01:08 dns dnsmasq[18991]: ignoring nameserver 192.168.1.2 - > > local interface > > Sep 4 17:01:08 dns dnsmasq[18991]: using nameserver 1.1.1.1#53 > > Sep 4 17:01:08 dns dnsmasq[18991]: using nameserver 212.159.13.49#53 > > Sep 4 17:01:08 dns dnsmasq[18991]: read /etc/hosts - 12 addresses > > Sep 4 17:01:08 dns dnsmasq[18992]: Too few arguments. > > Sep 4 17:01:08 dns systemd[1]: Started dnsmasq - A lightweight DHCP and > caching DNS server. > > Sep 4 17:02:17 dns dnsmasq[18991]: read /etc/hosts - 12 addresses > > Sep 4 17:05:05 dns dnsmasq-dhcp[18991]: DHCPREQUEST(eth0) > > 192.168.1.95 cc:ab:2c:39:69:2b > > Sep 4 17:05:05 dns dnsmasq-dhcp[18991]: DHCPACK(eth0) 192.168.1.95 > > cc:ab:2c:39:69:2b > benYouview > > > > What does that error from process 18992 mean "Too few arguments."? Does it > > indicate > > any sort of problem? > > > > Would be better if you could increase the log verbosity to troubleshoot > this... > Well, I've turned on the extra logging and it looks much the same:- Sep 4 20:12:55 dns systemd[1]: dnsmasq.service: Succeeded. Sep 4 20:12:55 dns systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server. Sep 4 20:12:55 dns systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Sep 4 20:12:55 dns dnsmasq[1735]: dnsmasq: syntax check OK. Sep 4 20:12:56 dns dnsmasq[1744]: started, version 2.80 cachesize 150 Sep 4 20:12:56 dns dnsmasq[1744]: DNS service limited to local subnets Sep 4 20:12:56 dns dnsmasq[1744]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile Sep 4 20:12:56 dns dnsmasq-dhcp[1744]: DHCP, IP range 192.168.1.80 -- 192.168.1.127, lease time 12h Sep 4 20:12:56 dns dnsmasq[1744]: using local addresses only for domain zbmc.eu Sep 4 20:12:56 dns dnsmasq[1744]: reading /run/dnsmasq/resolv.conf Sep 4 20:12:56 dns dnsmasq[1744]: using local addresses only for domain zbmc.eu Sep 4 20:12:56 dns dnsmasq[1744]: ignoring nameserver 192.168.1.2 - local interface Sep 4 20:12:56 dns dnsmasq[1744]: using nameserver 1.1.1.1#53 Sep 4 20:12:56 dns dnsmasq[1744]: using nameserver 212.159.13.49#53 Sep 4 20:12:56 dns dnsmasq[1744]: read /etc/hosts - 12 addresses Sep 4 20:12:56 dns dnsmasq[1745]: Too few arguments. Sep 4 20:12:56 dns systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server. Sep 4 20:13:21 dns dnsmasq[1744]: 1 192.168.1.96/1424 query[] graph.facebook.com from 192.168.1.96 Sep 4 20:13:21 dns dnsmasq[1744]: 1 192.168.1.96/1424 forwarded graph.facebook.com to 1.1.1.1 Sep 4 20:13:21 dns dnsmasq[1744]: 1 192.168.1.96/1424 forwarded graph.facebook.com to 212.159.13.49 This is with log-queries=extra and log-dhcp set. Is there anything else I can do to get more diagnostics? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Details of the --dhcp-optsdir= option
On Sat, Sep 04, 2021 at 03:34:59PM +0100, Ed W wrote: > On 04/09/2021 12:07, Chris Green wrote: > > On Sat, Sep 04, 2021 at 11:29:32AM +0100, Ed W wrote: > >> On 04/09/2021 09:15, Chris Green wrote: > >> > >>> I was aiming to synchronise the lease file in /var between the two > >>> systems as well as the configuration. > >>> > >> Did you see my suggestion to cross post the events to each machine using > >> a script? I replied in one > >> of your other threads re this situation? I think you could make a > >> simple/imperfect > cluster setup > >> like this fairly easily? (good enough for a small home lan) > >> > > Yes, but I'm not quite clear what you mean by "cross post the events"? > > Do you mean something more than just synchronising the > > /var/lib/misc/dnsmasq.leases > > file between the two systems? > > Hi, yes, dnsmasq emits a dbus event when a lease is created and has a dbus > method to add a lease to > it's db. > > Both can be scripted (examples given), so you can effectively "do something" > every time a lease is > handed out and poke the details of that lease into the other system *live*, > ie it goes directly into > its in memory db (which eventually will filter out to the on disk db) > > This gives you your optimal solution in that both machines have an in sync > view of the lease table, > ie promoting the second machine will immediately know the state of all > the leases handed out by the > first > > I speculate (without proof) that it might even work "well enough" to have > both machines online and > fighting to hand out dhcp leases... It's definitely *wrong*, but on a small > network it might not > break... > I think I can probably just use syncthing to synchronise the lease file across systems. Since the normal case will be that only one system is changing the file it's a simple sync requirement. If/when a system fails sync is no longer doing anything. Trying to run both DHCP servers seems just a bit risky! :-) -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What's the "right" way to specify upstream servers?
On Sat, Sep 04, 2021 at 04:33:10PM +0200, Matus UHLAR - fantomas via Dnsmasq-discuss wrote: > On 03.09.21 17:13, Chris Green wrote: > > I know there probably isn't a "right" way to do this but, while I've > > been trying to sort out how to make my dns/dhcp more resilient, I have > > looked at my existing dnsmasq running on a Pi and it looks a bit odd > > to me. > > > > It's a pretty standard, off the shelf Raspberry Pi installation using > > the Lite version as it's headless. The dnsmasq.conf file has been > > changed quite a lot over the years though and I wonder if it's still > > optimal. > > > > The upstream servers *seem* to be specified in /etc/dhcpcd.conf as > > follows:- > > > ># Example static IP configuration: > >interface eth0 > >static ip_address=192.168.1.2/24 > >#static ip6_address=fd51:42f8:caae:d92e::ff/64 > >static routers=192.168.1.1 > >static domain_name_servers=192.168.1.2 1.1.1.1 212.159.13.49 > > this is dhcp client configuration, not dhcp server. > > iiuc it tells dhcp client not to use IP address, default route nor servers > that DHCP server provided. > This *is* the DHCP server for my LAN so these are the upstream DNS servers it gives to its clients. > I really wonder why you run dhcp client in this case. > > > /etc/resolv.conf is:- > > > ># Generated by resolvconf > >nameserver 127.0.0.1 > > this means local clients query something running on localhost, apparently > dnsmasq. > > > So, is the above OK? Is it the "right" way to do it? etc. > > I recomment using nameservers the DHCP server provided, not override it > unless you really know why. > As I said this *is* the DHCP server. The second upstream server is the one I get from my ISP (212.159.13.49 that is). > Also, I would put upstream nameservers to resolv.conf, so the resolving > works even if dnsmasq fails, crashes or is killed. > > > The /etc/resolv.conf is written by /etc/init.d/dnsmasq and is, I > > believe, correct so that dnsmasq does local cacheing. However I'm not > > sure about the upstream servers in /etc/dhcpcd.conf including the > > local host as well. > > I don't see dnsmasq configuration here. > > I assume it's configured but I am not familiar to raspberry configuration... Exactly my problem! It's an 'out of the box' installation of dnsmasq on a Raspberry Pi that I have changed to static IP so that it can act as my local DNS/DHCP server. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] What's this error in syslog mean?
When [re]starting dnsmasq I see the following in syslog:- Sep 4 17:01:08 dns systemd[1]: dnsmasq.service: Succeeded. Sep 4 17:01:08 dns systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server. Sep 4 17:01:08 dns systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Sep 4 17:01:08 dns dnsmasq[18982]: dnsmasq: syntax check OK. Sep 4 17:01:08 dns dnsmasq[18991]: started, version 2.80 cachesize 150 Sep 4 17:01:08 dns dnsmasq[18991]: DNS service limited to local subnets Sep 4 17:01:08 dns dnsmasq[18991]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile Sep 4 17:01:08 dns dnsmasq-dhcp[18991]: DHCP, IP range 192.168.1.80 -- 192.168.1.127, lease time 12h Sep 4 17:01:08 dns dnsmasq[18991]: using local addresses only for domain zbmc.eu Sep 4 17:01:08 dns dnsmasq[18991]: reading /run/dnsmasq/resolv.conf Sep 4 17:01:08 dns dnsmasq[18991]: using local addresses only for domain zbmc.eu Sep 4 17:01:08 dns dnsmasq[18991]: ignoring nameserver 192.168.1.2 - local interface Sep 4 17:01:08 dns dnsmasq[18991]: using nameserver 1.1.1.1#53 Sep 4 17:01:08 dns dnsmasq[18991]: using nameserver 212.159.13.49#53 Sep 4 17:01:08 dns dnsmasq[18991]: read /etc/hosts - 12 addresses Sep 4 17:01:08 dns dnsmasq[18992]: Too few arguments. Sep 4 17:01:08 dns systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server. Sep 4 17:02:17 dns dnsmasq[18991]: read /etc/hosts - 12 addresses Sep 4 17:05:05 dns dnsmasq-dhcp[18991]: DHCPREQUEST(eth0) 192.168.1.95 cc:ab:2c:39:69:2b Sep 4 17:05:05 dns dnsmasq-dhcp[18991]: DHCPACK(eth0) 192.168.1.95 cc:ab:2c:39:69:2b benYouview What does that error from process 18992 mean "Too few arguments."? Does it indicate any sort of problem? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Details of the --dhcp-optsdir= option
On Sat, Sep 04, 2021 at 11:29:32AM +0100, Ed W wrote: > On 04/09/2021 09:15, Chris Green wrote: > > >> This works if your DHCP server only hands out static addressing so the host > >> names are all listed in the /etc/hosts or addn hosts location on both > >> machines. If the DHCP server is handing out addresses from a pool, then > >> only the DHCP dnsmasq instance will know about those hosts by name. > >> > > I was aiming to synchronise the lease file in /var between the two > > systems as well as the configuration. > > > > Did you see my suggestion to cross post the events to each machine using > a script? I replied in one > of your other threads re this situation? I think you could make a > simple/imperfect cluster setup > like this fairly easily? (good enough for a small home lan) > Yes, but I'm not quite clear what you mean by "cross post the events"? Do you mean something more than just synchronising the /var/lib/misc/dnsmasq.leases file between the two systems? Anyway I think I'm slowly working my way to a reasonable way of doing this. My latest idea changes things a little:- Run identical dnsmasq configurations on two systems, keep the configuration files and lease files synchronised. Use --listen-address to tell dnsmasq to listen to an IP that is only configured on one of the systems. Then, if that system dies, use 'ip addr add x.x.x.x eth0' to create the IP that dnsmasq will use on the backup system and all will be well. Will dnsmasq complain if the --listen-address doesn't exist? If so I can simply disable dnsmasq on the backup system (still synchronise files) and start it up as well as configure the IP when I need it. Can anyone see any major holes in this? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Details of the --dhcp-optsdir= option
On Fri, Sep 03, 2021 at 02:32:06PM -0700, Michael wrote: > On 9/3/21 1:23 PM, Chris Green wrote: > > If I have set dhcp-optsdir in /etc/dnsmasq.conf and add a file to the > > directory it points to I assume any extra configuration in the added > > file will 'just happen' without any restart or signalling of dnsmasq. > > > > However (like the description for dhcp-hostsdir I presume that an > > option I have added as above will not be removed if I delete the added > > file. Specifically if I put a dhcp-range option in the added file > > (when there wasn't one in /etc/dnsmasq.conf) the DHCP server in > > dnsmasq will be turned on, but removing the file won't turn the DHCP > > server off again. I'd need to restart dnsmasq to turn the DHCP server > > off (or would one of the signals suffice?). > I believe this is correct. > > > > I'm thinking of running dnsmasq on two systems on my LAN to provide > > some resilience. One will be configured to run DHCP as well as DNS, > > the other will be DNS only. Apart from DHCP the configurations > > will be identical and the IPs of both systems will be given by the > > DHCP server as DNS IPs. > > > This works if your DHCP server only hands out static addressing so the host > names are all listed in the /etc/hosts or addn hosts location on both > machines. If the DHCP server is handing out addresses from a pool, then > only the DHCP dnsmasq instance will know about those hosts by name. > I was aiming to synchronise the lease file in /var between the two systems as well as the configuration. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Details of the --dhcp-optsdir= option
On Fri, Sep 03, 2021 at 02:32:06PM -0700, Michael wrote: > > > So the normal 'everything working' situation will be system A (say on > > 192.168.1.2) is a DNS and DHCP server. System B (say on 192.168.1.3) > > provides only DNS. System A's DHCP server will give out both > > 192.168.1.2 and 192.168.1.3 as DNS servers. > > > > If 192.168.1.3 fails or is off line everything continues to work OK > > except maybe some slowing down of DNS because of requests to > > 192.168.1.3 having to timeout before retrying on 192.168.1.2. > > > > If 192.168.1.2 fails I will add the DHCP configuration to it > > 'manually' and then I'll have a working system while I fix > > 192.168.1.2. > > > > I think it is important to understand the DNS doesn't really have the > concept of primary and secondary nameservers. They are all expected to be > equal and the client can choose which one it wants to try. So, your > servers have to have the ability to give the same responses or you will go > crazy trying to figure out why somethings aren't working right. > Yes, that's why I intend to have both DNS servers running when things are 'normal'. Both should respond pretty quickly so it shouldn't matter which gets asked first. > > In your scenario, you could sync the leases file over regularly as a > backup. Then when the failure occurs, you would update the secondary box > to add the dhcp options, stop the redirection above, and begin > owning/managing the DHCP leases file. When the primary comes back online, > you have to reverse the whole process or leave it this way until the next > failure, but sync the files the other way. > Ah, I think I can see the issue you're trying to point me to. If a client X gets its IP etc. from server A then server B won't have its details and if another client Y makes a DNS request for the name of the client X then server B won't know it. If I copy the leases file back and forth regularly will server B know client X's IP? Maybe it would actually be better to run only one dnsmasq and just keep its configuration and lease files in sync with the other installation. If server A fails then just start up dnsmasq on server B. This is simpler as both dnsmasq configurations can be identical, the only issue is that I need to change server B's IP address to that of server A. It might actually be easier/quicker to add the second IP in promiscuous mode (or run dnsmasq in a docker container in macvlan mode, but this adds a whole layer of complexity, especially as the servers will probably be different hardware). -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Details of the --dhcp-optsdir= option
If I have set dhcp-optsdir in /etc/dnsmasq.conf and add a file to the directory it points to I assume any extra configuration in the added file will 'just happen' without any restart or signalling of dnsmasq. However (like the description for dhcp-hostsdir I presume that an option I have added as above will not be removed if I delete the added file. Specifically if I put a dhcp-range option in the added file (when there wasn't one in /etc/dnsmasq.conf) the DHCP server in dnsmasq will be turned on, but removing the file won't turn the DHCP server off again. I'd need to restart dnsmasq to turn the DHCP server off (or would one of the signals suffice?). I'm thinking of running dnsmasq on two systems on my LAN to provide some resilience. One will be configured to run DHCP as well as DNS, the other will be DNS only. Apart from DHCP the configurations will be identical and the IPs of both systems will be given by the DHCP server as DNS IPs. So the normal 'everything working' situation will be system A (say on 192.168.1.2) is a DNS and DHCP server. System B (say on 192.168.1.3) provides only DNS. System A's DHCP server will give out both 192.168.1.2 and 192.168.1.3 as DNS servers. If 192.168.1.3 fails or is off line everything continues to work OK except maybe some slowing down of DNS because of requests to 192.168.1.3 having to timeout before retrying on 192.168.1.2. If 192.168.1.2 fails I will add the DHCP configuration to it 'manually' and then I'll have a working system while I fix 192.168.1.2. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] What's the "right" way to specify upstream servers?
I know there probably isn't a "right" way to do this but, while I've been trying to sort out how to make my dns/dhcp more resilient, I have looked at my existing dnsmasq running on a Pi and it looks a bit odd to me. It's a pretty standard, off the shelf Raspberry Pi installation using the Lite version as it's headless. The dnsmasq.conf file has been changed quite a lot over the years though and I wonder if it's still optimal. The upstream servers *seem* to be specified in /etc/dhcpcd.conf as follows:- # Example static IP configuration: interface eth0 static ip_address=192.168.1.2/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=192.168.1.1 static domain_name_servers=192.168.1.2 1.1.1.1 212.159.13.49 /etc/resolv.conf is:- # Generated by resolvconf nameserver 127.0.0.1 So, is the above OK? Is it the "right" way to do it? etc. The /etc/resolv.conf is written by /etc/init.d/dnsmasq and is, I believe, correct so that dnsmasq does local cacheing. However I'm not sure about the upstream servers in /etc/dhcpcd.conf including the local host as well. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about DHCP persistence and lease times
On Fri, Sep 03, 2021 at 01:58:54PM +0100, Jesus M Diaz wrote: > I wasn't considering erasing/deleting the dnsmasq.leases file, I was > rather thinking of copying it to a non-running backup dnsmasq so > that > if/when the running dnsmasq fails I can start the other and it will > give out the same IPs. > >Do you really need this? I mean, if dhcp server dies and you have a >stand-by backup that takes over immediately, the renew request from the >hosts will be to use the same IP address, so if you don't have the >dnsmasq.lease file, ergo there are no leases at the moment, dnsmasq >would grant the same (requested) IP address. That's why I asked the question about persistence of IP address, does a client give a 'hint' to the DHCP server that it would like the same IP again? However it's trivial to copy the contents of the leases file across so it's not a big issue. > > The only other issue is then how to tell 'everyone' that the DNS > server has > changed address. > >Why don't you always include both DNS servers, so if one dies, the >second one will be there anyway? I was thinking about the usual "one local server and 1.1.1.1 or 8.8.8.8 as secondary" but now I think about it I suppose there's nothing difficult about providing two local servers. However will having one of them non-functional slow things down at all? So:- 1 - How do I configure dnsmasq to give two DNS server addresses? 2 - Will only actually having one listening cause any delay? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Questions about DHCP persistence and lease times
On Fri, Sep 03, 2021 at 12:08:20PM +0100, Ed W wrote: > On 03/09/2021 11:31, Chris Green wrote: > > Two questions really:- > > > > Is the file /var/lib/misc/dnsmasq.leases the only place where > > dnsmasq keeps DHCP/IP/Name information across restarts? I.e. if I > > delete that file will new DHCP requests get new IPs? (or does the > > client have some memory of the last IP it got?) > > > > > > If a client's DHCP lease expires and it sends a new DHCP request > > out, which fails, will it continue to use the old values or will > > it just die? > > > > > > I realise /var/lib/misc/dnsmasq.leases is not cast in stone and could > > be a different file but I'm sure it's clear what question I'm asking. > > > > My understanding is yes to this. > > Dnsmasq keeps it's database completely in ram while running. It updates > the disk "periodically" (ie > whenever the in ram changes), and calls some external events at the same time. > > To be precise I believe you need to first stop dnsmasq before erasing the > disk cache (however, I > regularly get away with doing so while it's running... ;-) ) > I wasn't considering erasing/deleting the dnsmasq.leases file, I was rather thinking of copying it to a non-running backup dnsmasq so that if/when the running dnsmasq fails I can start the other and it will give out the same IPs. The only other issue is then how to tell 'everyone' that the DNS server has changed address. It's a pity that one can't associate an RJ-45 socket with a specific IP address! :-) -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Questions about DHCP persistence and lease times
Two questions really:- Is the file /var/lib/misc/dnsmasq.leases the only place where dnsmasq keeps DHCP/IP/Name information across restarts? I.e. if I delete that file will new DHCP requests get new IPs? (or does the client have some memory of the last IP it got?) If a client's DHCP lease expires and it sends a new DHCP request out, which fails, will it continue to use the old values or will it just die? I realise /var/lib/misc/dnsmasq.leases is not cast in stone and could be a different file but I'm sure it's clear what question I'm asking. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How do others provide backup for their DNS? Ideas wanted
On Thu, Sep 02, 2021 at 10:32:01AM -0700, Michael wrote: [snip earlier stuff] > Hi Chris, > > I am sure there are some good guides out there for learning docker. I just > learned by just picking a project that I wanted to try and set out to get it > running. You could always run your primary on a pi and your backup on > another platform without any issues using my example below. > Yes, thank you, I've already got it installed and I'm playing with it. > Personally, I like to use docker-compose, because it allows you to spin up > the same arguments each time without remembering them. > > As I mentioned, I am not using just dnsmasq, but rather pihole built on top > of DNSmasq, but my docker-compose file looks like this below. You should > be able to adapt the arguments for just dnsmasq pretty easily. > > > pihole-main: > container_name: pihole-main > restart: unless-stopped > image: pihole/pihole > hostname: pihole-main > domainname: $DOMAINNAME > mac_address: 02:42:c0:a8:65:02 > environment: > - TZ=${TZ} > - "WEBPASSWORD=fakepassword" > - "TEMPERATUREUNIT=f" > - DNSMASQ_USER=${DNSMASQ_USER} > - PUID=${PUID} > - PGID=${PGID} > > # Internal IP of the cloudflared container > - "DNS1=8.8.8.8" > > # Explicitly disable a second DNS server, otherwise Pi-hole uses > Google > - "DNS2=no" > > # Listen on all interfaces and permit all origins > # This allows Pihole to work in this setup and when answering across > VLANS, > # but do not expose pi-hole to the internet! > - "DNSMASQ_LISTENING=all" > > dns: > # - 127.0.0.1 > - 8.8.8.8 > > # Persist data and custom configuration to the host's storage > volumes: > - ${VOLUME}/pihole-main/config:/etc/pihole/ > - ${VOLUME}/pihole-main/dnsmasq:/etc/dnsmasq.d/ > - ${VOLUME}/pihole-main/misc:/var/lib/misc/ > - ${VOLUME}/pihole-main/home:/home/ > > cap_add: > - NET_ADMIN > - CAP_SYS_NICE > > # 1. Join the public network so it's reachable by systems on our LAN > networks: > lan: > ipv4_address: 192.168.101.2 > > > With this configuration, the IP of the container is always 192.168.101.2. > The server it is running on though has a different IP - something in the > 192.168.101 range. This way, if I bring this container up on the backup > machine, it can come up on the same IP and mac address and the clients never > know it moved. > > > Bring it up is just as simple as docker-compose up -d on the backup machine. > > Then with this config, I just rsync the ${VOLUME}/pihole-main directory to > the backup machine and it is ready if needed. > Thank you, that's brilliant. The bit I don't quite understand yet is:- # 1. Join the public network so it's reachable by systems on our LAN networks: lan: ipv4_address: 192.168.101.2 I couldn't see how to do this with docker but you've shown me how. I think we'd better shut-up now as this is drifting away from dnsmasq. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Further thoughts/questions on failover
On Thu, Sep 02, 2021 at 10:44:48AM -0700, Michael wrote: > > However, if you are running DHCP and dnsmasq is updating/maintaining a list > of host names of your local clients in the leases file, then only one of the > dnsmasq instances is going to know about those. In this instance, I think > makes more sense to ensure you have one really robust dnsmasq system than > having two that don't respond the same. > This is exactly my situation, the main reason for running dnsmasq is that I want names for devices on my LAN. If I didn't want/need this then I'd be better off letting my router provide DHCP, and DNS forwarding. No need for dnsmasq at all. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Further thoughts/questions on failover
On Thu, Sep 02, 2021 at 02:58:44PM +0100, Kevin Tedder wrote: > Chris > You just need to update the /etc/resolv.conf file on each of your clients to > point them at both DNS's. > > e.g > nameserver 192.168.1.2 > nameserver 192.168.1.3 > > The client will now ask both DNS servers. It will get a response even if one > of them is off-line. > Does that work satisfactorily though? OK, there's a secondary DNS server on the system but it won't have all the local systems' names in its cache will it? My main reason for running a local DNS is so that all systems on my LAN have proper names. These names will only be in the DNS instance which was their DHCP server as well won't they? > > Your solution to move the SD card to another RPI is fine, unless the issue > is a corrupted SD Card. Wasn't this the original issue that you are trying > to avoid? > I wasn't aiming to move the SD card, I was aiming to keep an 'as up to date as possible' image of the running DNS system. Possibly, in addition, writing the image out to an actual, spare, SD card at intervals. > Personally, I'd rather have two systems fully operational all the time. To > discover that the back up solution is not working at the critical moment is > the same as not having a backup at all. Is there some way the two systems can share the client names supplied at DHCP time? > The added benefit is maintenance. You can take one off-line to > update/upgrade whilst the other continues to provide service. > Yes, I quite agree there. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Further thoughts/questions on failover
I'm still ruminating on this problem! :-) A number of people are using docker containers to manage this, one live dnsmasq in a container is the default DNS/DHCP for the system and another dnsmasq container is maintained to keep its files in sync with the running one. So far so good. What I don't follow is what happens if/when failure occurs as I don't see how the replacement dnsmasq instance can appear at the same address on the LAN. So, unless all systems are rebooted they will lose DNS won't they? E.g. My default dnsmasq instance runs on a system at 192.168.1.2, if I had a 'clone' docker container on my desktop machine it would be at address 192.168.1.3. So, if 192.168.1.2 dies and I start the dnsmasq container on my desktop machine it's at 192.168.1.3 but all machines on the network are configured (until reboot or DHCP reload time) to use 192.168.1.2. Am I missing something very obvious here (probably!). Just maintaining a Rasberry Pi image and updating the dnsmasq files on it would actually work better (for me anyway) as I could copy it out to an actual SD card regularly and all I'd need to do to recover after a failure would be to plug the SD card into a non-dead Pi and turn it on. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] How do others provide backup for their DNS? Ideas wanted
Thanks for the replies. It does seem that any sort of live failover for DHCP and/or DNS turns out to be quite complex. I am thus thinking that simply having a reasonably quick to start 'cold' backup makes sense. I really don't mind if my LAN is DNS and DHCP'less for an hour or so, it can cope! The best idea (and I haven't really thought about the practicalities yet) I have had so far is a dual boot Raspberry Pi or similar that reboots itself to the 'other' OS in the small hours, backs up the 'main' OS (which is the dnsmasq server) and then reboots back to the 'main' server. One then has a daily cloned image of the dnsmasq server which can be plugged into backup hardware if the server fails. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] How do others provide backup for their DNS? Ideas wanted
I run dnsmasq on a Raspberry Pi to provide DHCP and DNS services on my home LAN. It's just very handy having names for all devices rather than having to use IP addresses. A few weeks ago the Pi died (or, more accurately, the SD card it was running on died) and it took me quite a while to get things back together again (like half a day or so, mostly down to trying to rush things). This isn't "mission critical", nothing awful happened when we didn't have the Pi providing DNS for half a day but it was 'messy'. So, I've been wondering how I can help myself sort things out more easily and quickly if it happens again. What do others do? The ways I can think of are:- Have an 'image' SD card of the Pi kept up to date somehow so that I can either change the SD card in the running Pi or use another Pi in place of it. Problem is how to keep the image up to date. Have a 'warm backup' dnsmasq running on another system. There is another Pi on the LAN and also a desktop server both of which are on all the time. How easy is it to replace one dnsmasq system with another on the LAN? Any other obvious ways? Thanks for any ideas. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Monthly posting, man page
On Sat, Mar 06, 2021 at 10:42:46PM +0100, Geert Stappers via Dnsmasq-discuss wrote: > On Sat, Mar 06, 2021 at 08:12:30PM +0000, Chris Green wrote: > > On Sat, Mar 06, 2021 at 08:34:26PM +0100, Monthly posting wrote: > > > > > > The dnsmasq manual is feature complete. And known as hard to read for > > > those who are new to it. But still do read it and try to understand it. > > > Reading it again is known being effective for getting better > > > understandig. > > > > > I agree with much of what this posting said. but, what/where is "The > > dnsmasq manual"? Do you mean the dnssmasq man page? > > If so I think it would be a good idea if this was more explicit. > > Will do. > > > > Seeing a reference to "The dnsmasq manual" I'd expect to be able to > > find it at https://dnsmasq.org/ and (as far as I know) it isn't there. > > Quote from the paragraph (section?) "Get code." > >The tarball includes this documentation, source, and manpage. > > And `manpage` is a link to https://dnsmasq.org/docs/dnsmasq-man.html > You're absolutely right! :-) I'm not quite sure why I missed/ignored that before. I think it's just that I was expecting something more like 'a manual' somwhere. > > Thanks for the feedback. > Thanks for being so polite! -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Monthly posting
On Sat, Mar 06, 2021 at 08:34:26PM +0100, Monthly posting via Dnsmasq-discuss wrote: > > The dnsmasq manual is feature complete. And known as hard to read for > those who are new to it. But still do read it and try to understand it. > Reading it again is known being effective for getting better > understandig. > I agree with much of what this posting said. but, what/where is "The dnsmasq manual"? Do you mean the dnssmasq man page? If so I think it would be a good idea if this was more explicit. Seeing a reference to "The dnsmasq manual" I'd expect to be able to find it at https://dnsmasq.org/ and (as far as I know) it isn't there. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Can I tell dnsmasq not to use one isolated?address in a DHCP range
On Sat, Dec 26, 2020 at 03:13:40PM +, Alex Morris wrote: > On Sat, 26 Dec 2020, at 13:57, Chris Green wrote: > > Is it possible to tell dnsmasq not to use one IP address in a > > dhcp-range assignment? I have a user on my LAN who has set > > 192.168.1.121 in their system as their IP address and it's in my > > dhcp-range=192.168.1.80,192.168.1.223,12h > > > > (I think they originally used dnsmasq's DHCP to get 192.168.1.121 so > > it's unlikely to get re-assigned but better safe than sorry) > > > > > > As a follow-up I guess that if I want dnsmasq to return a system name > > for 192.168.1.121 (which it hasn't assigned itself) I'll need to add > > it to /etc/hosts on the dnsmasq system. > > > > Would setting a dhcp-host reservation for that IP address, allocated to > a non-existent MAC address, achieve the desired result? > Yes, I suppose it would. I can even use the actual address of the system that has set itself to 192.168.1.121. It will probably never ask for an address, but if it does it will get 192.168.1.121 anyway. Thanks! -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Can I tell dnsmasq not to use one isolated address in a DHCP range
Is it possible to tell dnsmasq not to use one IP address in a dhcp-range assignment? I have a user on my LAN who has set 192.168.1.121 in their system as their IP address and it's in my dhcp-range=192.168.1.80,192.168.1.223,12h (I think they originally used dnsmasq's DHCP to get 192.168.1.121 so it's unlikely to get re-assigned but better safe than sorry) As a follow-up I guess that if I want dnsmasq to return a system name for 192.168.1.121 (which it hasn't assigned itself) I'll need to add it to /etc/hosts on the dnsmasq system. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Rather basic question - how do you tell dnsmasq what upstream DNS servers to use?
On Sat, Oct 03, 2020 at 06:06:56PM +0200, Geert Stappers wrote: > On Sat, Oct 03, 2020 at 03:59:46PM +0100, Chris Green wrote: > > I'm feeling really silly, I've been using dnsmasq for several years > > running it on a dedicated Raspberry Pi on the LAN to provide local DNS. > > > > It's been working perfectly OK but just a very short while ago the > > Google DNS server at 8.8.8.8 went down for a while and it's what I > > (appear to) use as the upstream DNS. > > > > How and where does one set dnsmasq's upstream DNS? Is it the following > > line in /etc/dhcpcd.conf :- > > > > /etc/dhcpcd.conf:static domain_name_servers=192.168.1.4 8.8.8.8 > > fd51:42f8:caae:d92e::1 > > > > The file /run/dnsmasq/resolv.conf appears to be derived directly from > > the above:- > > > > chris@newdns$ more resolv.conf > > # Generated by resolvconf > > nameserver 192.168.1.4 > > nameserver 8.8.4.4 > > nameserver fd51:42f8:caae:d92e::1 > > > > The Raspberry Pi running dnsmasq is 192.168.1.4 on the LAN here, I'm > > running dnsmasq version 2.76. > > Snippet from the dnsmasq manual page: > >-S, --local, > > --server=[/[]/[domain/]][[#][@|[#]] > Specify IP address of upstream servers >directly. Setting this flag does not suppress >reading of /etc/resolv.conf, use --no-resolv to do that. > Yes, but do I want it to ignore /etc/resolv.conf (well, actually, /var/run/dnsmasq/resolv.conf) ? Do I want resolvconf to handle which DNS servers are used or am I better turning resolvconf off altogether? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Rather basic question - how do you tell dnsmasq what upstream DNS servers to use?
I'm feeling really silly, I've been using dnsmasq for several years running it on a dedicated Raspberry Pi on the LAN to provide local DNS. It's been working perfectly OK but just a very short while ago the Google DNS server at 8.8.8.8 went down for a while and it's what I (appear to) use as the upstream DNS. How and where does one set dnsmasq's upstream DNS? Is it the following line in /etc/dhcpcd.conf :- /etc/dhcpcd.conf:static domain_name_servers=192.168.1.4 8.8.8.8 fd51:42f8:caae:d92e::1 The file /run/dnsmasq/resolv.conf appears to be derived directly from the above:- chris@newdns$ more resolv.conf # Generated by resolvconf nameserver 192.168.1.4 nameserver 8.8.4.4 nameserver fd51:42f8:caae:d92e::1 The Raspberry Pi running dnsmasq is 192.168.1.4 on the LAN here, I'm running dnsmasq version 2.76. Would I be better with two unrelated DNS servers in the above configuration, e.g. a Google one and one from my ISP? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] DNSMasq slow.
On Thu, Oct 01, 2020 at 12:25:57PM +0200, Matus UHLAR - fantomas wrote: > > On 30.09.20 21:41, Ken D'Ambrosio wrote: > > > Hi, all. I've got a RasPi 4, with 4 GB of mostly empty RAM, acting > > > as my firewall/gateway, with DHCP and DNSMasq running. And > > > performance of it is... odd. E.g., I have an entry in /etc/hosts on > > > the Pi that I figured would be served nearly instantly, since no > > > external lookup is required, and, out of ten lookups from the same > > > host that sits on the common network, I range from about .2 seconds > > > to 7. (Note that it seems to fluctuate throughout the lookups, not > > > just faster after the first lookup fills the cache or anything.) > > > Lookups for hosts not in /etc/hosts seem to be roughly as long as > > > well. > > > > > > Not sure how to troubleshoot this. Any suggestions would be greatly > > > appreciated. > > On 01.10.20 11:35, Matus UHLAR - fantomas wrote: > > running 'tcpdump port 53' could help you find out. > > I can guess that clients are asking for a fqdns (because in DNS you MUST ask > > for fqdns) your dnsmasq is not accepting as local > > other possibility I can think of is that clients searches for records > while ipv6 addresses aren't in your hosts table I think that was one of the issues I had though it was muddied by systemd-resolved as well. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] DNSMasq slow.
On Wed, Sep 30, 2020 at 09:41:58PM -0400, Ken D'Ambrosio wrote: > Hi, all. I've got a RasPi 4, with 4 GB of mostly empty RAM, acting as my > firewall/gateway, with DHCP and DNSMasq running. And performance of it > is... odd. E.g., I have an entry in /etc/hosts on the Pi that I figured > would be served nearly instantly, since no external lookup is required, and, > out of ten lookups from the same host that sits on the common network, I > range from about .2 seconds to 7. (Note that it seems to fluctuate > throughout the lookups, not just faster after the first lookup fills the > cache or anything.) Lookups for hosts not in /etc/hosts seem to be roughly > as long as well. > > Not sure how to troubleshoot this. Any suggestions would be greatly > appreciated. > Are you sure the query gets as far as your Pi running dnsmasq immediately? I have had ongoing issues with systemd-resolved on Linux hosts where it causes all sorts of issues before the query even gets sent off the originating system (or at least sends incorrect queries before the correct one). It's also worth looking at the dnsmasq syslog entries on the Pi for the period the query takes, my problem with systemd-resolved was initially diagnosed from there. In the end I've disabled systemd-resolved on all my systems as, with DNS on a fast LAN and not many clients, it's really not needed. There's a couple of quite long threads here about the delays I saw amd systemd-resolved, probably in the last 12 months or so. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Howto reclaim all dhcp leases after router reboot
On Fri, Sep 25, 2020 at 02:39:04PM +0200, Tuxo wrote: > Hi Matus, > > Thanks for replying so quickly to my request. > > On 25.09.20 11:39, Matus UHLAR - fantomas wrote: > > > > > why the need to reclaim them? > > > > Because I like to have a place (file) where I can see what leases have been > given out, to what IP address and what hostname is currently using them. > I've written myself a script to do this for me, independent of what is doing DHCP. It produces output like this:- chris$ lan 16 packets received by filter, 0 packets dropped by kernel 192.168.1.1 2860n xx:xx:xx:xx:xx:xx DrayTek Corp. 192.168.1.3 esprimo xx:xx:xx:xx:xx:xx Fujitsu Technology Solutions GmbH 192.168.1.4 newdnsxx:xx:xx:xx:xx:xx Raspberry Pi Foundation 192.168.1.10TD-W9980 xx:xx:xx:xx:xx:xx TP-LINK TECHNOLOGIES CO.,LTD. 192.168.1.202820n xx:xx:xx:xx:xx:xx DrayTek Corp. 192.168.1.30Tenda-W311R xx:xx:xx:xx:xx:xx Tenda Technology Co., Ltd. 192.168.1.50MC342-AE529C xx:xx:xx:xx:xx:xx Oki Electric Industry Co., Ltd. 192.168.1.92t470 xx:xx:xx:xx:xx:xx Intel Corporate 192.168.1.96humaxYouview xx:xx:xx:xx:xx:xx HUMAX Co., Ltd. 192.168.1.99TL-SG108E xx:xx:xx:xx:xx:xx TP-LINK TECHNOLOGIES CO.,LTD. 192.168.1.107 Galaxy-A10xx:xx:xx:xx:xx:xx Samsung Electronics Co.,Ltd 192.168.1.108 pibackup xx:xx:xx:xx:xx:xx Raspberry Pi Trading Ltd (DUP: 2) 192.168.1.110 amazon-ac95e92de xx:xx:xx:xx:xx:xx Amazon Technologies Inc. 192.168.1.114 oldbackup xx:xx:xx:xx:xx:xx MICRO-STAR INT'L CO.,LTD 192.168.1.121 DESKTOP-978VD5M xx:xx:xx:xx:xx:xx GIGA-BYTE TECHNOLOGY CO.,LTD. It's basically the output from the program arp-scan (available from most repositories I think). -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Is there a way to return an alias in preference to real host name?
On Sun, Aug 02, 2020 at 07:54:00PM +0200, john doe wrote: > On 8/2/2020 2:39 PM, Chris Green wrote: > > I have a couple of systems on my home LAN which have long, not very > > useful, names, e.g.:- > > > > DESKTOP-978VD5M - An MS Windows machine > > MC342-AE529C - An OKI printer > > > > I have added cname entries as follows in my dnsmasq.conf :- > > > > cname=ben,DESKTOP-978VD5M > > cname=oki,MC342-AE529C > > > > So I can refer to them as 'ben' and 'oki'. > > > > However it would be even better if the names 'ben' and 'oki' were > > returned when I use 'host', 'arp-scan' or similar commands. Is there > > a way of getting dnsmasq to do this (preferably without losing the > > ability to use the long, unmemorable, names as well)? > > > > The Host utility should say that 'oki' is an alias for 'MC342-AE529C' > then show Ip(s) for the record. > Yes it does:- chris$ host oki oki is an alias for MC342-AE529C. MC342-AE529C has address 192.168.1.50 ... but 'the other way round' it doesn't tell me about OKI:- chris$ host 192.168.1.50 50.1.168.192.in-addr.arpa domain name pointer MC342-AE529C.zbmc.eu. I really want anything that looks up a name from an numeric IP to return the alias rather than the long name. I.e. the alias should be the 'preferred' name as it were. For example I want "nmap -sP" to return the 'better' names which it doesn't at present:- chris$ nmap -sP 192.168.1.0/24 ... ... ... Nmap scan report for MC342-AE529C.zbmc.eu (192.168.1.50) Host is up (0.00024s latency). ... ... ... -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Is there a way to return an alias in preference to real host name?
I have a couple of systems on my home LAN which have long, not very useful, names, e.g.:- DESKTOP-978VD5M - An MS Windows machine MC342-AE529C - An OKI printer I have added cname entries as follows in my dnsmasq.conf :- cname=ben,DESKTOP-978VD5M cname=oki,MC342-AE529C So I can refer to them as 'ben' and 'oki'. However it would be even better if the names 'ben' and 'oki' were returned when I use 'host', 'arp-scan' or similar commands. Is there a way of getting dnsmasq to do this (preferably without losing the ability to use the long, unmemorable, names as well)? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Still investigating delay on first dns query - more info
On Thu, Mar 26, 2020 at 12:02:45PM +, Simon Kelley wrote: > On 23/03/2020 13:25, Chris Green wrote: > > > > I'm running dnsmasq version 2.76 on a Raspberry Pi. The systems > > seeing the delay when they send a query are (mostly) running xubuntu > > 19.10. > > > > The delay only occurs when querying names on the LAN, requests for > > external names run normally. It makes no difference whether I give a fully > > qualified name or just the machine name (the domain gets added by the > > 'search' option in /etc/resolv.con anyway). > > > > It appears to be something to do with IPV6 and records (or lack > > of them) that causes the issue but I'm still stumped as to how to fix > > it. > > > > Having set 'log-queries=extra' in /etc/dnsmasq.conf I see the > > following in /var/log/syslog when I query (using 'host') the name > > 'esprimo' twice from my laptop after booting (booting the laptop that > > is). > > [snip log] > > > > So for some reason first time round the querying system asks > > repeatedly for the record, then waits 5 seconds, asks again and > > then gives up. But it only does this the first time it sends the > > query. (I suspect that the delay re-occurs after a long idle time but > > I can't reproduce the delay by clearing the systemd resolvctl cache) > > > > I realise this probably isn't directly a dnsmasq problem but I'd > > really appreciate any suggestions or workarounds that might help me > > fix this issue. I can easily add more debug flags or configuration if > > they might help. > > > > > Dnsmasq looks to be doing the right thing here, if one assumes that what > it sends is the same as what it logs (and I have not reason to believe > it isn't). > > Given the MX query, it looks like the originator may be a mail transfer > agent (sendmail, exim and friends). Can you determine what is making the > queries and maybe configure it not to use IPv6? > > Yes, thank you Simon. It just dawned on me (thinking about it in bed last night) that the log only shows what dnsmasq *sent* and not what was received or acted on at the other end. I think my next job is probably to set up wireshark or something like it and actually observer what is going in and out of the client system. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Still investigating delay on first dns query - more info
is NODATA-IPv6 Mar 23 12:59:06 newdns dnsmasq[4256]: 73 192.168.1.92/37906 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:06 newdns dnsmasq[4256]: 73 192.168.1.92/37906 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:06 newdns dnsmasq[4256]: 74 192.168.1.92/37906 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:06 newdns dnsmasq[4256]: 74 192.168.1.92/37906 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:06 newdns dnsmasq[4256]: 75 192.168.1.92/37906 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:06 newdns dnsmasq[4256]: 75 192.168.1.92/37906 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:06 newdns dnsmasq[4256]: 76 192.168.1.92/37906 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:06 newdns dnsmasq[4256]: 76 192.168.1.92/37906 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:06 newdns dnsmasq[4256]: 77 192.168.1.92/37906 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:06 newdns dnsmasq[4256]: 77 192.168.1.92/37906 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:06 newdns dnsmasq[4256]: 78 192.168.1.92/37906 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:06 newdns dnsmasq[4256]: 78 192.168.1.92/37906 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:11 newdns dnsmasq[4256]: 79 192.168.1.92/35896 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:11 newdns dnsmasq[4256]: 79 192.168.1.92/35896 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:11 newdns dnsmasq[4256]: 80 192.168.1.92/48696 query[MX] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:11 newdns dnsmasq[4256]: 80 192.168.1.92/48696 config esprimo.zbmc.eu is NODATA Second 'host esprimo':- Mar 23 12:59:25 newdns dnsmasq[4256]: 91 192.168.1.92/56179 query[A] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:25 newdns dnsmasq[4256]: 91 192.168.1.92/56179 /etc/hosts esprimo.zbmc.eu is 192.168.1.3 Mar 23 12:59:25 newdns dnsmasq[4256]: 92 192.168.1.92/59553 query[] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:25 newdns dnsmasq[4256]: 92 192.168.1.92/59553 config esprimo.zbmc.eu is NODATA-IPv6 Mar 23 12:59:25 newdns dnsmasq[4256]: 93 192.168.1.92/32976 query[MX] esprimo.zbmc.eu from 192.168.1.92 Mar 23 12:59:25 newdns dnsmasq[4256]: 93 192.168.1.92/32976 config esprimo.zbmc.eu is NODATA So for some reason first time round the querying system asks repeatedly for the record, then waits 5 seconds, asks again and then gives up. But it only does this the first time it sends the query. (I suspect that the delay re-occurs after a long idle time but I can't reproduce the delay by clearing the systemd resolvctl cache) I realise this probably isn't directly a dnsmasq problem but I'd really appreciate any suggestions or workarounds that might help me fix this issue. I can easily add more debug flags or configuration if they might help. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] DNS/host lookup delay, how to diagnose?
On Thu, Feb 20, 2020 at 09:22:05AM +, Chris Green wrote: > > P.S. > > Here is assumed that original poster found in manual page: > > > > --log-queries > > Log the results of DNS queries handled by dnsmasq. > > Yes, thanks, I'll be trying that but I wasn't sure how much timing > information it would provide. > Here is the result of a query that took 5 seconds in 'host':- Feb 20 09:24:05 newdns dnsmasq[465]: 15 192.168.1.92/52420 query[A] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:05 newdns dnsmasq[465]: 15 192.168.1.92/52420 /etc/hosts esprimo.zbmc.eu is 192.168.1.3 Feb 20 09:24:06 newdns dnsmasq[465]: 16 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 16 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 17 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 17 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 18 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 18 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 19 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 19 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 20 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 20 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 21 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 21 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 22 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 22 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 23 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 23 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 24 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 24 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 25 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 25 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 26 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 26 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 27 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 27 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 28 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 28 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 27 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 28 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 28 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 29 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 29 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 30 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 30 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 31 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 31 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 32 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 32 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 33 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 33 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6 Feb 20 09:24:06 newdns dnsmasq[465]: 34 192.168.1.92/52342 query[] esprimo.zbmc.eu from 192.168.1.92 Feb 20 09:24:06 newdns dnsmasq[465]: 34 192.168.1.92/52342 config esprimo.zbmc.eu is NODATA-IPv6
Re: [Dnsmasq-discuss] DNS/host lookup delay, how to diagnose?
On Thu, Feb 20, 2020 at 07:36:02AM +0100, Geert Stappers wrote: > On Wed, Feb 19, 2020 at 10:16:17PM +0000, Chris Green wrote: > > I have a small home LAN with a number of machines running (mostly) > > xubuntu versions 19,10 and 18.04. > > > > I have a local DNS/DHCP server machine (a Raspberry Pi) running dnsmasq. > > ambiguous, Because I can read > > } I have a local DNS/DHCP server machine implemented by running dnsmasq. > } I have a local DNS/DHCP server machine that is also running dnsmasq. > Yes, sorry. 192.168.1.1 - Draytek router with DHCP/DNS turned off. 192.168.1.3 - Desktop running xubuntu 19.10 192.168.1.4 - Raspberry Pi running DHCP and DNS for LAN, Raspbian GNU/Linux, dnsmasq version 2.76 192.168.1.x - Other machines running xubuntu etc. DHCP assigned addresses > > > If I reboot one of my machines and then do a DNS query using 'host' > > for a local machine the first (and only the first) response takes a > > long time. The correct IP address is returned instantly but then > > there is a long (5 seconds) delay before getting back to the command > > prompt. Subsequent searches are much faster. > > Thus the DNS on the Raspberry Pi is providing the initial response to the query but the client's local dnsmasq cache is providing the response to subsequent queries (xubuntu installs dnsmasq for local DNS caching). > > Presumably the faster subsequent responses are down to the local DNS > > cache in the client machine but why am I getting that five second > > delay for the first request? > > > > How can I diagnose this? > > Chart all compoments, shared the new map with us, tell again the situation. > > > Regards > Geert Stappers > > P.S. > Here is assumed that original poster found in manual page: > > --log-queries > Log the results of DNS queries handled by dnsmasq. Yes, thanks, I'll be trying that but I wasn't sure how much timing information it would provide. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] DNS/host lookup delay, how to diagnose?
I have a small home LAN with a number of machines running (mostly) xubuntu versions 19,10 and 18.04. I have a local DNS/DHCP server machine (a Raspberry Pi) running dnsmasq. If I reboot one of my machines and then do a DNS query using 'host' for a local machine the first (and only the first) response takes a long time. The correct IP address is returned instantly but then there is a long (5 seconds) delay before getting back to the command prompt. Subsequent searches are much faster. Presumably the faster subsequent responses are down to the local DNS cache in the client machine but why am I getting that five second delay for the first request? How can I diagnose this? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
On Sun, Oct 20, 2019 at 12:17:50PM +0200, john doe wrote: > On 10/20/2019 10:15 AM, Chris Green wrote: > > On Sun, Oct 20, 2019 at 08:59:03AM +0200, Geert Stappers wrote: > >> On Sat, Oct 19, 2019 at 10:21:26PM +0100, Chris Green wrote: > > I don't add any command line options to dnsmasq, my changes to the > > defaults in /etc/dnsmasq.conf are as follows:- > > > > domain-needed > > bogus-priv > > expand-hosts > > domain=zbmc.eu > > dhcp-range=192.168.1.80,192.168.1.127,12h > > dhcp-option=3,192.168.1.1 > > dhcp-authoritative > > local=/zbmc.eu/ > > cname=bbb,beaglebone > > cname=mx201,maxine-X201 > > cname=ben,DESKTOP-978VD5M > > cname=oki,MC342-AE529C > > dhcp-host=00:BB:3A:E9:A3:15,maxineKindle > > dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 > > dhcp-host=28:EF:01:2D:EB:07,chrisKindle > > dhcp-host=08:EB:74:9D:47:53,humaxFreeview > > dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview > > dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy > > dhcp-host=AC:AE:19:2C:3F:5A,roku > > dhcp-host=10:FE:ED:63:29:74,TL-WA7210 > > dhcp-host=00:25:36:AE:52:9C,192.168.1.50 > > > > So I have a domain= like you. > > > >> What happens at _client_ side, actually happens at _client_ side. > >> > > Yes, of course, and it seems to be all OK now after restarting > > everything (but no other changes) so *something* had got out of kilter > > so that unqualified names weren't working but was fixed by the reboots. > > It may well be that upgrades (that don't usually require restarts on > > Linux) had got some systemd bits in a tangle which a restart sorted out. > > > >> > >>> ... and why doesn't a local name only work on the machine running dnsmasq? > >> > >> Sorry, can't parse that question. If the question was > >> } ... and why does a local name only work on the machine running dnsmasq? > >> or > >>> ... and why doesn't a local name work on the machine running dnsmasq? > >> say so. Yes, do put effort in asking a question.[1] > >> > > Asking for the address of an unqualified name on the machine running > > dnsmasq fails:- > > > > chris@newdns$ host esprimo > > Host esprimo not found: 3(NXDOMAIN) > > chris@newdns$ host esprimo.zbmc.eu > > esprimo.zbmc.eu has address 192.168.1.3 > > chris@newdns$ > > > > Is there any way to fix this? It's not incredibly impoprtant because > > I only rarely do anything (as in log in and run programs) on that > > machine but it would be nice if it worked the same as the other > > machines on the LAN. > > > > It's presumably down to the order in which it runs its client DHCP > > requests versus when dnsmasq starts so that it can answer itself. > > > > You are not using 'dhcp-fqdn' (1)? > > 1) http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html > No, and reading what it does I can't see any good reason for doing so. My LAN runs on a single subnet so all systems *must* have unique names anyway. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
On Sun, Oct 20, 2019 at 08:59:03AM +0200, Geert Stappers wrote: > On Sat, Oct 19, 2019 at 10:21:26PM +0100, Chris Green wrote: > > > > So why does my laptop have *two* "search zbmc.eu" lines in > > /etc/resolv.conf whereas other machines only have one? > > Yes, your laptop and your other machines in your network. > Only my laptop gets *two* "search zbmc.eu" lines, all the other machines (well, all two of them that are actual accessible computers running Linux) have only one "search zbmc.eu" which seems more reasonable. > > > Also, how does this line get added to /etc/resolv.conf? > > Welcome to the wonderful world of the server-client-concept. > > The DHCP client does a "DHCP request", DHCP server (Dnsmasq) answers. > In the reply are > https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Client_configuration_parameters > > > such as code 15 (domain) and code 119 (domain search). > Client uses the recieved configuration parameters (where it seems fit). > OK, yes, I supposed that must be the way it happens. I guess for some reason my laptop is doing something odd/wrong. In fact I've just had a thought, it maybe connects using WiFi sometimes and using a wired connection at other times. It could well be that it sends out a DHCP broadcast request for both wired and WiFi connections. > Check in the manual page of Dnsmasq the section "--domain". It starts > with: "Specifies DNS domains for the DHCP server." and contains > | In addition, when a suffix is set then hostnames without a domain part > | have the suffix added as an optional domain part. Eg on my network I > | can set --domain=thekelleys.org.uk and have a machine whose DHCP > | hostname is "laptop". The IP address for that machine is available > | from dnsmasq both as "laptop" and "laptop.thekelleys.org.uk". > That gives some information about _server_ side. > I don't add any command line options to dnsmasq, my changes to the defaults in /etc/dnsmasq.conf are as follows:- domain-needed bogus-priv expand-hosts domain=zbmc.eu dhcp-range=192.168.1.80,192.168.1.127,12h dhcp-option=3,192.168.1.1 dhcp-authoritative local=/zbmc.eu/ cname=bbb,beaglebone cname=mx201,maxine-X201 cname=ben,DESKTOP-978VD5M cname=oki,MC342-AE529C dhcp-host=00:BB:3A:E9:A3:15,maxineKindle dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 dhcp-host=28:EF:01:2D:EB:07,chrisKindle dhcp-host=08:EB:74:9D:47:53,humaxFreeview dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy dhcp-host=AC:AE:19:2C:3F:5A,roku dhcp-host=10:FE:ED:63:29:74,TL-WA7210 dhcp-host=00:25:36:AE:52:9C,192.168.1.50 So I have a domain= like you. > What happens at _client_ side, actually happens at _client_ side. > Yes, of course, and it seems to be all OK now after restarting everything (but no other changes) so *something* had got out of kilter so that unqualified names weren't working but was fixed by the reboots. It may well be that upgrades (that don't usually require restarts on Linux) had got some systemd bits in a tangle which a restart sorted out. > > > ... and why doesn't a local name only work on the machine running dnsmasq? > > Sorry, can't parse that question. If the question was > } ... and why does a local name only work on the machine running dnsmasq? > or > > ... and why doesn't a local name work on the machine running dnsmasq? > say so. Yes, do put effort in asking a question.[1] > Asking for the address of an unqualified name on the machine running dnsmasq fails:- chris@newdns$ host esprimo Host esprimo not found: 3(NXDOMAIN) chris@newdns$ host esprimo.zbmc.eu esprimo.zbmc.eu has address 192.168.1.3 chris@newdns$ Is there any way to fix this? It's not incredibly impoprtant because I only rarely do anything (as in log in and run programs) on that machine but it would be nice if it worked the same as the other machines on the LAN. It's presumably down to the order in which it runs its client DHCP requests versus when dnsmasq starts so that it can answer itself. Thanks for all the help so far Geert. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
On Sat, Oct 19, 2019 at 10:21:21PM +0200, Geert Stappers wrote: > On Sat, Oct 19, 2019 at 09:02:19PM +0100, Chris Green wrote: > > > > > > > > I've suddenly lost the ability to resolve local machine names without > > > > a domain suffix, e.g.:- > > > > > > > > ... and on a Linux machine on the LAN:- > > > > > > > > chris$ host t470 > > > > Host t470 not found: 2(SERVFAIL) > > > > chris$ host t470.zbmc.eu > > > > t470.zbmc.eu has address 192.168.1.92 > > > > chris$ > > > > > > > > > . > > > > > > > > Help!! :-) > > > > > > On a Linux system > > > grep -e search -e domain /etc/resolv.conf > > > > > chris$ grep -e search -e domain /etc/resolv.conf > > search zbmc.eu > > search zbmc.eu > > chris$ > > > > Is that what you were asking me to do? > > Yes. > > > > Strangely I seem to be able to resolve local names without a suffix > > now. I have rebooted a few machines, maybe something simply got > > full/misconfigured and a reboot has cleared it up. > > OK > I'm still a bit worried by all this as everything seemed to be working well for many months and years and now it's all a bit hit and miss. On the Raspberry Pi I can't resolve names without a domain:- chris@newdns$ grep -e search -e domain /etc/resolv.conf chris@newdns$ host esprimo Host esprimo not found: 3(NXDOMAIN) chris@newdns$ host esprimo.zbmc.eu esprimo.zbmc.eu has address 192.168.1.3 chris@newdns$ On my laptop, running xubuntu 19.04 I see:- chris$ grep -e search -e domain /etc/resolv.conf search zbmc.eu search zbmc.eu chris$ more /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers. search zbmc.eu nameserver 127.0.0.53 search zbmc.eu chris$ host esprimo esprimo.zbmc.eu has address 192.168.1.3 On my desktop machine (also running xubuntu 19.04) :- chris@esprimo$ grep -e search -e domain /etc/resolv.conf search zbmc.eu chris@esprimo$ more /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers. nameserver 127.0.0.53 search zbmc.eu chris@esprimo$ Other machines (running xubuntu 18.04) look similar to the desktop machine. So why does my laptop have *two* "search zbmc.eu" lines in /etc/resolv.conf whereas other machines only have one? Also, how does this line get added to /etc/resolv.conf? ... and why doesn't a local name only work on the machine running dnsmasq? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
On Sat, Oct 19, 2019 at 09:00:27PM +0200, Geert Stappers wrote: > On Sat, Oct 19, 2019 at 07:31:49PM +0100, Chris Green wrote: > > I've run dnsmasq for several years on my small home LAN. I'm running > > dnsmasq on a raspberry-pi and most of the client machines on the LAN > > are linux (xubuntu). > > > > I've suddenly lost the ability to resolve local machine names without > > a domain suffix, e.g.:- > > > > On the Raspberry Pi itself:- > > > > chris@newdns$ host esprimo > > Host esprimo not found: 3(NXDOMAIN) > > chris@newdns$ host esprimo.zbmc.eu > > esprimo.zbmc.eu has address 192.168.1.3 > > chris@newdns$ > > > > ... and on a Linux machine on the LAN:- > > > > chris$ host t470 > > Host t470 not found: 2(SERVFAIL) > > chris$ host t470.zbmc.eu > > t470.zbmc.eu has address 192.168.1.92 > > chris$ > > > > > > So what's gone wrong/changed? The raspberry pi is pretty up to date:- > > > > chris@newdns$ uname -a > > Linux newdns 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l > > GNU/Linux > > chris@newdns$ more /etc/issue > > Raspbian GNU/Linux 9 \n \l > > chris@newdns$ dnsmasq --version > > Dnsmasq version 2.76 Copyright (c) 2000-2016 Simon Kelley > > Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua > TFTP conntrack ipset auth DNSSEC loop-detect inotify > > > > This software comes with ABSOLUTELY NO WARRANTY. > > Dnsmasq is free software, and you are welcome to redistribute it > > under the terms of the GNU General Public License, version 2 or 3. > > chris@newdns$ > > > > I don't *think* I've changed anything in /etc/dnsmasq.conf recently. > > > > Help!! :-) > > On a Linux system > grep -e search -e domain /etc/resolv.conf > chris$ grep -e search -e domain /etc/resolv.conf search zbmc.eu search zbmc.eu chris$ Is that what you were asking me to do? Strangely I seem to be able to resolve local names without a suffix now. I have rebooted a few machines, maybe something simply got full/misconfigured and a reboot has cleared it up. Or, more likely I suspect, systemd reconfigured something during system updates and the reboot was needed to get things properly sorted. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] I've lost my ability to resolve local machine names without a domain suffix
I've run dnsmasq for several years on my small home LAN. I'm running dnsmasq on a raspberry-pi and most of the client machines on the LAN are linux (xubuntu). I've suddenly lost the ability to resolve local machine names without a domain suffix, e.g.:- On the Raspberry Pi itself:- chris@newdns$ host esprimo Host esprimo not found: 3(NXDOMAIN) chris@newdns$ host esprimo.zbmc.eu esprimo.zbmc.eu has address 192.168.1.3 chris@newdns$ ... and on a Linux machine on the LAN:- chris$ host t470 Host t470 not found: 2(SERVFAIL) chris$ host t470.zbmc.eu t470.zbmc.eu has address 192.168.1.92 chris$ So what's gone wrong/changed? The raspberry pi is pretty up to date:- chris@newdns$ uname -a Linux newdns 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux chris@newdns$ more /etc/issue Raspbian GNU/Linux 9 \n \l chris@newdns$ dnsmasq --version Dnsmasq version 2.76 Copyright (c) 2000-2016 Simon Kelley Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify This software comes with ABSOLUTELY NO WARRANTY. Dnsmasq is free software, and you are welcome to redistribute it under the terms of the GNU General Public License, version 2 or 3. chris@newdns$ I don't *think* I've changed anything in /etc/dnsmasq.conf recently. Help!! :-) -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Local dnsmasq server not utilized by Ubuntu
On Sun, Aug 04, 2019 at 07:30:17PM +0200, Daniel Huhardeaux wrote: > Le 04/08/2019 à 15:57, dnsmasqyq@neverbox.com a écrit : > > 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. > > > > 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. > > > > 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. 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 (at least I'm pretty sure that's what he wants). He needs to turn off whatever is doing DHCP for the LAN and get dnsmasq to do it instead. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Local dnsmasq server not utilized by Ubuntu
On Sun, Aug 04, 2019 at 09:57:19AM -0400, dnsmasqyq@neverbox.com 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. > I run dnsmasq in a machine on my mostly xubuntu LAN so my set-up should work for you too. > 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. > That's the 'local to the machine' caching DNS server and that's the way it should be. > 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. > What you (probably, almost certainly) need to do is turn off the DHCP server that's already running on your LAN. It'll be in the router that connects you to the internet most probably. Then, as long as *your* dnsmasq is running in one of the machines on the LAN and is configured to provide DHCP (not the default, you have to uncomment the 'dhcp-range' line in dnsmasq.conf) you should find that everything will start working as you want. Machines will need to be rebooted (or wait a long[ish] time) to start using dnsmasq. If the above doesn't work then keep asking questions, with more detailed information about your set-up, and I'm sure answers will be forthcoming. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Local dnsmasq server not utilized by Ubuntu
On Sun, Aug 04, 2019 at 04:51:54PM +0200, john doe wrote: > On 8/4/2019 3:57 PM, dnsmasqyq@neverbox.com 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. > > > > 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. > > > > 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. > > > > https://askubuntu.com/questions/2321/what-is-the-proper-way-to-change-the-dns-ip > That doesn't really address the OP's problem. He wants to have a system running dnsmasq to provide local DNS for his LAN (at least I *think* that's what he's asking for). My other reply outlines what I think the OP needs to do - turn off the default/router DHCP server. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Some MAC addresses recognised, others not, in dhcp lines
On Sat, Aug 03, 2019 at 11:36:25PM +0200, Geert Stappers wrote: > On Sat, Aug 03, 2019 at 09:50:44PM +0100, Chris Green wrote: > > I'm running dnsmasq version 2.76 on a raspberry pi to provide DNS and > > DHCP services on my LAN. > > > > I have some dhcp-host lines in my configuration file to give names to > > systems that don't give their names, e.g.:- > > > > dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 > > dhcp-host=28:EF:01:2D:EB:07,chrisKindle > > dhcp-host=08:EB:74:9D:47:53,humaxFreeview > > dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview > > dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy > > dhcp-host=1C:1B:0D:60:9A:E1,ben > > dhcp-host=AC:AE:19:2C:3F:5A,roku > > dhcp-host=10:FE:ED:63:29:74,TL-WA7210 > > > > Most of these work but a couple don't work ..and I think I have > > just realised why they don't work. Systems which don't request their > > IP address from dnsmasq don't provide dnsmasq with their MAC address > > and thus dnsmasq doesn't give them a name. > > > > Presumably these static IPs must be put into /etc/hosts on the dnsmasq > > system, is this the only way of handling this? > > To handle what? > > Please elaborate the challenge you are facing. > The 'challenge' of giving names to IPs which don't want to tell me their names! :-) I want TL-WA7210 and 'ben' to be names I can use (and see). -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Some MAC addresses recognised, others not, in dhcp lines
I'm running dnsmasq version 2.76 on a raspberry pi to provide DNS and DHCP services on my LAN. I have some dhcp-host lines in my configuration file to give names to systems that don't give their names, e.g.:- dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 dhcp-host=28:EF:01:2D:EB:07,chrisKindle dhcp-host=08:EB:74:9D:47:53,humaxFreeview dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy dhcp-host=1C:1B:0D:60:9A:E1,ben dhcp-host=AC:AE:19:2C:3F:5A,roku dhcp-host=10:FE:ED:63:29:74,TP-Link_TL-WA7210 Most of these work but a couple don't work ..and I think I have just realised why they don't work. Systems which don't request their IP address from dnsmasq don't provide dnsmasq with their MAC address and thus dnsmasq doesn't give them a name. Presumably these static IPs must be put into /etc/hosts on the dnsmasq system, is this the only way of handling this? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Strategies for DNS and DHCP backup
I run dnsmasq on a Raspberry Pi to provide DHCP and DNS services on my home network. I often spend quite long periods away from home and I'd like to have a way of providing some sort of backup if the Raspberry Pi dies for any reason. Recently the Pi has died a couple of times so I set up a second Pi with the same dnsmasq configuration file but without it set to run from /etc/init.d so that I could ssh into my network and start it manually. This worked OK when I had to use it recently but it does require that I notice something is wrong which I may not do when I'm away. Is there a straightforward way of having a secondary DHCP and DNS server on a LAN? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] What does this 'wrong server-ID' message mean?
I'm having a minor problem with my laptop and 'roaming WiFi', I've just noticed the following sequence in syslog on the system that runs as my DHCP/DNS server running dnsmasq:- Feb 5 21:32:52 dns dnsmasq-dhcp[385]: DHCPDISCOVER(eth0) 00:28:f8:3d:3b:aa Feb 5 21:32:52 dns dnsmasq-dhcp[385]: DHCPOFFER(eth0) 192.168.1.92 00:28:f8:3d:3b:aa Feb 5 21:32:55 dns dnsmasq-dhcp[385]: DHCPDISCOVER(eth0) 00:28:f8:3d:3b:aa Feb 5 21:32:55 dns dnsmasq-dhcp[385]: DHCPOFFER(eth0) 192.168.1.92 00:28:f8:3d:3b:aa Feb 5 21:32:55 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.102 00:28:f8:3d:3b:aa Feb 5 21:32:55 dns dnsmasq-dhcp[385]: DHCPNAK(eth0) 192.168.1.102 00:28:f8:3d:3b:aa wrong server-ID Feb 5 21:33:24 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.92 00:28:f8:3d:3b:aa Feb 5 21:33:24 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.92 00:28:f8:3d:3b:aa t470 Feb 5 21:33:24 dns dnsmasq-dhcp[385]: DHCPDISCOVER(eth0) 00:28:f8:3d:3b:aa Feb 5 21:33:24 dns dnsmasq-dhcp[385]: DHCPOFFER(eth0) 192.168.1.92 00:28:f8:3d:3b:aa Feb 5 21:33:24 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.102 00:28:f8:3d:3b:aa Feb 5 21:33:24 dns dnsmasq-dhcp[385]: DHCPNAK(eth0) 192.168.1.102 00:28:f8:3d:3b:aa wrong server-ID Feb 5 21:33:29 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:33:29 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.100 7c:67:a2:57:6c:78 DESKTOP-2S4CP78 Feb 5 21:33:35 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:33:35 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.100 7c:67:a2:57:6c:78 DESKTOP-2S4CP78 Feb 5 21:34:39 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:34:39 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.100 7c:67:a2:57:6c:78 DESKTOP-2S4CP78 Feb 5 21:34:45 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:34:45 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.100 7c:67:a2:57:6c:78 DESKTOP-2S4CP78 Feb 5 21:35:37 dns systemd[1]: Started Session c4 of user chris. Feb 5 21:36:44 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:36:44 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.100 7c:67:a2:57:6c:78 DESKTOP-2S4CP78 Feb 5 21:36:45 dns dnsmasq-dhcp[385]: DHCPREQUEST(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:36:45 dns dnsmasq-dhcp[385]: DHCPACK(eth0) 192.168.1.100 7c:67:a2:57:6c:78 DESKTOP-2S4CP78 Feb 5 21:37:14 dns dnsmasq-dhcp[385]: DHCPDISCOVER(eth0) 7c:67:a2:57:6c:78 Feb 5 21:37:14 dns dnsmasq-dhcp[385]: DHCPOFFER(eth0) 192.168.1.100 7c:67:a2:57:6c:78 Feb 5 21:37:14 dns dnsmasq-dhcp[385]: DHCPDISCOVER(eth0) 7c:67:a2:57:6c:78 So what's happening around that DHCPNAK message? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] DHCP problem when moving from one WiFi SSID to another
On Thu, Dec 27, 2018 at 08:26:25AM +0100, john doe wrote: > On 12/26/2018 6:58 PM, Chris Green wrote: > > I have a large[ish[ house and to provide good WiFi throughout I run > > two Draytek routers. The 'main' one is a Vigor 2860n which connects > > to the internet by FTTC, the second one is an old Vigor 2820n which > > has its WAN disabled and the LAN hardwired to the 2860n LAN. > > > > Currently I'm using the same SSID on both routers, I've read quite a > > lot around this and the weight of opinion seems to be that using the > > same SSID should work OK and is more transparent to the user than > > using different ones. However I have also tried different SSIDs for > > the two routers requiring user intervention to move from one to the > > other, this shows the same symptoms (described below) as using the > > same SSID. > > > > What happens is that when I move around such that the WiFi connection > > should move from the 2820n to the 2860n my laptop loses its IP > > address. > > > > DHCP and DNS is provided by dnsmasq running on a RaspberryPi, the > > basic IPV4 setup is as follows:- > > > > Vigor 2860n - 192.168.1.1 > > Raspberry Pi - 192.168.1.2 (runs dnsmasq) > > Desktop 192.168.1.3 > > Vigor 2820n - 192.168.1.20 > > > > The Pi assigns IP addresses from 192.168.80 to 192.168.1.127 and the > > conf file is:- > > > > domain-needed > > bogus-priv > > expand-hosts > > domain=zbmc.eu > > dhcp-range=192.168.1.80,192.168.1.127,12h > > dhcp-option=3,192.168.1.1 > > local=/zbmc.eu/ > > cname=bbb,beaglebone > > cname=mx201,maxine-X201 > > cname=ben,DESKTOP-978VD5M > > cname=oki,MC342-AE529C > > dhcp-host=00:BB:3A:E9:A3:15,maxineKindle > > dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 > > dhcp-host=28:EF:01:2D:EB:07,chrisKindle > > dhcp-host=08:EB:74:9D:47:53,humaxFreeview > > dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview > > dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy > > dhcp-host=00:25:36:AE:52:9C,192.168.1.50 > > > > > > My laptop seems to lose its IP address whenever I move from one > > Draytek's WiFi to the other but only when the IP is assigned by > > dnsmasq. If I connect to my guest network (192.168.6.x) then I get a > > IP address assigned by the 2860n and a good connection to the outside > > world. If I then reconnect to the 'local' WiFi the laptop loses its > > IP address. It's as if dnsmasq doesn't see the disconnection and > > doesn't answer the new DHCP broadcast from my laptop. If I leave it > > disconnected for a minute or two and then re-connect to the WiFi it > > *does* get an IP. > > > > > > Can anyone explain what might be wrong and/or a fix or workaround? > > > > > > How is this issue different from the one you posted a fiew mounths back (1)? > > Did you try what Simon Kellie suggested then? > > 1) > http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q2/012225.html > He didn't really. :-) He said:- "but I don't have any concrete suggestions on how to fix it. I think the SSID change is a red-herring." But, yes, it is basically the same issue, but now I'm not changing SSID. I have now changed the dnsmasq configuration to set dhcp-authoritative, maybe that will do something. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Documentation error (minor)
While looking through the example dnsmasq.conf file comments with a view to seeing if there was anything relevant to my recent question about losing DHCP configuration when re-connecting I found:- # Set the DHCP server to authoritative mode. In this mode it will barge in # and take over the lease for any client which broadcasts on the network, # whether it has a record of the lease or not. This avoids long timeouts # when a machine wakes up on a new network. DO NOT enable this if there's # the slightest chance that you might end up accidentally configuring a DHCP # server for your campus/company accidentally. The ISC server uses # the same option, and this URL provides more information: # http://www.isc.org/files/auth.html #dhcp-authoritative The link http://www.isc.org/files/auth.html is broken and, although I searched around a bit in isc.org I couldn't find anything relevant. By the way, while I'm about it would this possibly be the answer to my DHCP re-connect problem? "This avoids long timeouts when a machine wakes up on a new network." does sound a bit hopeful. However I'm not really clear what the sentence after means so I'm not sure if I can try this safely or not. -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] DHCP problem when moving from one WiFi SSID to another
I have a large[ish[ house and to provide good WiFi throughout I run two Draytek routers. The 'main' one is a Vigor 2860n which connects to the internet by FTTC, the second one is an old Vigor 2820n which has its WAN disabled and the LAN hardwired to the 2860n LAN. Currently I'm using the same SSID on both routers, I've read quite a lot around this and the weight of opinion seems to be that using the same SSID should work OK and is more transparent to the user than using different ones. However I have also tried different SSIDs for the two routers requiring user intervention to move from one to the other, this shows the same symptoms (described below) as using the same SSID. What happens is that when I move around such that the WiFi connection should move from the 2820n to the 2860n my laptop loses its IP address. DHCP and DNS is provided by dnsmasq running on a RaspberryPi, the basic IPV4 setup is as follows:- Vigor 2860n - 192.168.1.1 Raspberry Pi - 192.168.1.2 (runs dnsmasq) Desktop 192.168.1.3 Vigor 2820n - 192.168.1.20 The Pi assigns IP addresses from 192.168.80 to 192.168.1.127 and the conf file is:- domain-needed bogus-priv expand-hosts domain=zbmc.eu dhcp-range=192.168.1.80,192.168.1.127,12h dhcp-option=3,192.168.1.1 local=/zbmc.eu/ cname=bbb,beaglebone cname=mx201,maxine-X201 cname=ben,DESKTOP-978VD5M cname=oki,MC342-AE529C dhcp-host=00:BB:3A:E9:A3:15,maxineKindle dhcp-host=00:09:B0:C9:CE:81,onkyoTx-nr616 dhcp-host=28:EF:01:2D:EB:07,chrisKindle dhcp-host=08:EB:74:9D:47:53,humaxFreeview dhcp-host=2C:08:8C:CC:9A:9E,humaxYouview dhcp-host=00:1F:E2:4E:8F:CA,maxineStudy dhcp-host=00:25:36:AE:52:9C,192.168.1.50 My laptop seems to lose its IP address whenever I move from one Draytek's WiFi to the other but only when the IP is assigned by dnsmasq. If I connect to my guest network (192.168.6.x) then I get a IP address assigned by the 2860n and a good connection to the outside world. If I then reconnect to the 'local' WiFi the laptop loses its IP address. It's as if dnsmasq doesn't see the disconnection and doesn't answer the new DHCP broadcast from my laptop. If I leave it disconnected for a minute or two and then re-connect to the WiFi it *does* get an IP. Can anyone explain what might be wrong and/or a fix or workaround? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] 'junk found in command line' - what does this mean? (systemd problem I suspect)
I have dnsmasq running on a Raspberry Pi providing DHCP and DNS on my home network. It looks as if we had a power failure overnight and, as a result (I think) dnsmasq won't restart on the Raspberry Pi when I reboot it. If I run dnsmasq manually from the command line it works OK, thus I do have DHCP/DNS back now but I'd like it to start at boot time. I did recently update to a newer Raspbian so the power failure *might* be a red herring. The diagnostics from systemd when you try and restart dnsmasq are as follows:- root@raspberrypi:~# /etc/init.d/dnsmasq restart [] Restarting dnsmasq (via systemctl): dnsmasq.serviceJob for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details. failed! root@raspberrypi:~# systemctl status dnsmasq.service ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled) Drop-In: /run/systemd/generator/dnsmasq.service.d └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf Active: failed (Result: exit-code) since Wed 2018-07-18 10:34:18 BST; 14s ago Process: 963 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=1/FAILURE) Process: 960 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS) Jul 18 10:34:17 raspberrypi dnsmasq[960]: dnsmasq: syntax check OK. Jul 18 10:34:18 raspberrypi dnsmasq[963]: dnsmasq: junk found in command line Jul 18 10:34:18 raspberrypi systemd[1]: dnsmasq.service: control process exited, code=exited status=1 Jul 18 10:34:18 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server. Jul 18 10:34:18 raspberrypi systemd[1]: Unit dnsmasq.service entered failed state. root@raspberrypi:~# ps -ef | grep dns nobody 911 1 0 10:31 ?00:00:00 dnsmasq root 991 942 0 10:34 pts/000:00:00 grep dns root@raspberrypi:~# journalctl -xn -- Logs begin at Wed 2018-07-18 10:17:03 BST, end at Wed 2018-07-18 10:34:43 BST. -- Jul 18 10:34:18 raspberrypi dnsmasq[963]: dnsmasq: junk found in command line Jul 18 10:34:18 raspberrypi dnsmasq[963]: junk found in command line Jul 18 10:34:18 raspberrypi dnsmasq[963]: FAILED to start up Jul 18 10:34:18 raspberrypi systemd[1]: dnsmasq.service: control process exited, code=exited status=1 Jul 18 10:34:18 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server. -- Subject: Unit dnsmasq.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit dnsmasq.service has failed. -- -- The result is failed. Jul 18 10:34:18 raspberrypi systemd[1]: Dependency failed for Host and Network Name Lookups. -- Subject: Unit nss-lookup.target has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit nss-lookup.target has failed. -- -- The result is dependency. Jul 18 10:34:18 raspberrypi systemd[1]: Unit dnsmasq.service entered failed state. Jul 18 10:34:43 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories... -- Subject: Unit systemd-tmpfiles-clean.service has begun with start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit systemd-tmpfiles-clean.service has begun starting up. Jul 18 10:34:43 raspberrypi systemd[1]: Started Cleanup of Temporary Directories. -- Subject: Unit systemd-tmpfiles-clean.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit systemd-tmpfiles-clean.service has finished starting up. -- -- The start-up result is done. So what's wrong and how do I fix it? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] DHCP failure when changing SSID on same network
I have a large house and run two Draytek Vigor routers to provide full coverage. The 'main' router is a Draytek 2860n which has the VDSL connection to the internet. The second router is a Draytek Vigoer 2820n which has no WAN connections and just has its LAN connected to the 2860n's LAN side. DHCP/DNS is provided by a Raspberry Pi running dnsmasq. Everything is otherwise pretty standard, 192.168.1.x private network with the 2860n at 192.168.1.1 and the Pi at 192.168.1.2. I have the routers' WiFi set up so they have different SSIDs. In general it all works fine, I can connect my laptop to either SSID as required. The problem I have is when I move around the house. My laptop runs xubuntu 17.10 and uses Network Manager to handle the networking. So, say I'm connected to 2820n and move to the other side of the house where I need to connect to 2860n. I manually use the Network Manager applet to disconnect from 2820n and connect to 2860n. It appears to work fine and says I'm connected but most times that I do this the DHCP set-up fails. I have a connection but there is no default route and no DNS and the laptop has no IP address assigned (all IPV4 this). Sometimes it works OK and usually if I disconnect and wait a while (say a minute or two) and then reconnect it will work OK. It seems as if dhclient is failing as if I run it manually when in the not working state it just hangs. Does dnsmasq have some sort of delay before 'dropping' a DHCP client? I.e. is it possible that dnsmasq sees the same MAC address re-connecting and assumes that it still has its IP setup? If so is there some way I can make dnsmasq quicker at seeing that a client has disconnected? -- Chris Green ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss