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

Simon Kelley simon at thekelleys.org.uk
Mon Feb 2 22:41:02 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I wonder if the code assumes that there won't be two or more
interfaces on the _same_ subnet? Will check and get back to you.

Cheers,

Simon.


On 02/02/15 05:26, T o n g wrote:
> On Sat, 31 Jan 2015 15:32:46 +0000, 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 ```
> 
>> 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?
> 
> Here is the network configuration of the machine running dnsmasq:
> 
> % ifconfig eth0      Link encap:Ethernet  HWaddr 00:...:8c inet
> addr:192.168.2.122  Bcast:192.168.2.255  Mask:255.255.255.0 inet6
> addr: fe80::...:d08c/64 Scope:Link UP BROADCAST RUNNING MULTICAST
> MTU:1500  Metric:1 RX packets:2172 errors:0 dropped:0 overruns:0
> frame:0 TX packets:1686 errors:0 dropped:0 overruns:0 carrier:0 
> collisions:0 txqueuelen:1000 RX bytes:696161 (696.1 KB)  TX
> bytes:168402 (168.4 KB) Interrupt:16
> 
> lo        Link encap:Local Loopback inet addr:127.0.0.1
> Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING
> MTU:65536  Metric:1 RX packets:5967 errors:0 dropped:0 overruns:0
> frame:0 TX packets:5967 errors:0 dropped:0 overruns:0 carrier:0 
> collisions:0 txqueuelen:0 RX bytes:1594629 (1.5 MB)  TX
> bytes:1594629 (1.5 MB)
> 
> wlan0     Link encap:Ethernet  HWaddr 00:...:09 inet
> addr:192.168.2.74  Bcast:192.168.2.255  Mask:255.255.255.0 inet6
> addr: fe80::...:609/64 Scope:Link UP BROADCAST RUNNING MULTICAST
> MTU:1500  Metric:1 RX packets:12049 errors:0 dropped:0 overruns:0
> frame:0 TX packets:257 errors:0 dropped:0 overruns:0 carrier:0 
> collisions:0 txqueuelen:1000 RX bytes:3969955 (3.9 MB)  TX
> bytes:41687 (41.6 KB)
> 
> It's a vanilla Ubuntu 14.10, with a vanilla dnsmasq installation:
> 
> % cat /etc/dnsmasq.conf /etc/dnsmasq.d/network-manager | sed
> '/^$/d; /^#/d' bind-interfaces
> 
> Thanks
> 
> 
> 
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJUz/z9AAoJEBXN2mrhkTWiZnIQAKh7502I4xOlEPmggIg7VCjP
zuYovvKRDyNhG+v2sx7T7svG0zWYH3KKl7IzhUeplkao9zsEPmJ3BWypYCQrLfFq
2oTnHzeSxb7zz04+ZU8ReLtqFRM/maUFXdwtnPgiPWD/XH4QFld2+KF4jZ8uS8D7
ycwmaPg1UygLHZI+PtvvfEs99gQmks/NP5K/ahUYByFtseBCalnTSPkVxRYevV8B
5cNrTZ6LYolVfGdWVWPg7Z/Jjtk6tUwkmI6W8ld4rFyBsa5TnpeLQzm5PSFy66yU
bxFhy6p4kzMqxNzmnkysuqP4fOKjn04m2EYSFB8ZjqRYXbeAqXFAK+/cSjLUKCfI
ei2DO4Xd8L7CxS32kyMOztRe0xxoF9yuqWgl8eDlhfe8ZzguzYfv+iWxriQxLBAn
ABs3VSm/PiJv7gdiM2mDAQpTdT1BCDcJZfFqvAWFAeAYaKd5S83djO4wS3cK1Eh2
3IczEaikSdl7gJ5oTu5zWM8uD504rXCML7M45oqOnE1GWhVJT9PR58ACOi9Id34v
8FaWxdYGEjgqvaVVHcZz460VCo6/ztxqsl6AXQF80OrrwIVfFRT1Q8JBzY9uENy1
gd8x0/HXRYXVJdOIoGvOfQWQ71vhzP5t4rCVq39NQMrlukDWq3GJlPgaCpF8e+Ro
ls/UMPKkwr50SrvzEH+2
=zMog
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list