[Dnsmasq-discuss] local-service feature not working as expected

Simon Kelley simon at thekelleys.org.uk
Sat Jan 31 22:30:07 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 31/01/15 15:32, T o n g wrote:
> On Sat, 31 Jan 2015 03:44:26 +0000, T o n g wrote:
> 
>>> I following the following to config dnsmasq as DHCP and DNS
>>> server 
>>> http://sfxpt.wordpress.com/2013/11/30/dnsmasq-installation- 
>>> configuration-5/
>>> 
>>> It works well till Ubuntu 13.10. However, with Ubuntu 14.10,
>>> the dns query from localnetwork will always timeout...
>> 
>> Just for the archive, I've found the problem...
>> 
>> I.e., that `--listen-address=127.0.1.1` will willfully ignore any
>> dns queries from local network. This is the exact reason causing
>> the symptom that I reported above. More details at 
>> https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1414887/
> comments/2
> 
> I fixed the above problem and now my dnsmasq is starting like
> this:
> 
> dnsmasq  12608     1  0 09:45 ?        00:00:00 /usr/sbin/dnsmasq
> -x / var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7
> /etc/dnsmasq.d,.dpkg-dist,.dpkg- old,.dpkg-new --local-service
> 
> However, I think that `local-service` feature is not working as
> expected because when I was querying from local network, I still
> get timed out:
> 
> ``` $ dig @192.168.2.122 google.ca
> 
> ; <<>> DiG 9.9.5-4.3-Ubuntu <<>> @192.168.2.122 google.ca ; (1
> server found) ;; global options: +cmd ;; connection timed out; no
> servers could be reached ```
> 
> Only when I start dnsmasq manually without that `local-service`,
> did I get respond for localnetwork query:
> 
> ``` service dnsmasq stop * Stopping DNS forwarder and DHCP server
> dnsmasq                 [ OK ]
> 
> /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7
> /etc/ dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new & ```
> 
>> From another machine:
> 
> ``` $ dig @192.168.2.122 google.ca ... ;; ANSWER SECTION: 
> google.ca.              300     IN      A       173.194.43.87 ... 
> ;; Query time: 62 msec ;; SERVER: 192.168.2.122#53(192.168.2.122) 
> ;; WHEN: Sat Jan 31 10:12:00 EST 2015 ;; MSG SIZE  rcvd: 248
> 
> $ ifconfig eth0      Link encap:Ethernet  HWaddr 00:...:ef inet
> addr:192.168.2.64  Bcast:192.168.2.255  Mask:255.255.255.0 ```
> 
> The only difference is with or without that `local-service`. But
> wouldn't `local-service` be meant for localnetwork query to be OK?
> 
> 
> --local-service Accept DNS queries only from hosts whose address is
> on  a  local subnet, ie a subnet for which an interface exists on
> the server.
> 
> 192.168.2.64 and 192.168.2.122 are sure on the same local subnet.
> 
> Comments?
> 

What is the network configuration of the machine running dnsmasq (ie
the output of

ifconfig


Cheers,

Simon.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlTNV28ACgkQKPyGmiibgrfa4gCdFMXlNK93y2YZjj4+fpngMvNe
OvYAmwXNeOH4PtCNfkgHLoKxsOVpLejG
=+884
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list