[Dnsmasq-discuss] local-service feature not working as expected
Simon Kelley
simon at thekelleys.org.uk
Tue Feb 3 22:12:39 GMT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I can't see any immediate reason for this.
If the local-service setting is the cause of this, dnsmasq should log
Ignoring query from non-local network
the first time it throws away a query. Please could you look in the
logs and see if that message is there?
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
iQIcBAEBCAAGBQJU0UfXAAoJEBXN2mrhkTWiHRkP/3eFm+FctBLGk8UmLhkkUz7Z
BVLu1xmVODGFZGS4gpnQKDka0yvxghAHdwAyujBtB7b9b6wGkx8wrkniGlpJn6Ip
UAgyw2m6MNux+Z1oXetg5PSyduP6kVLAeFpfK95aDx41wNAF00Tdy8ME+xdoe9ab
1LCo0HusjNvylZm2ORA6P7mdGJX6/Jz654Z7OVyybwQUu94PD6AzDoZJtU9oJCz6
9731sBjOvOk/T54O3ktnv0Xxp6WupVcDjaq/jWxDqB2mDbc7rtfq4oQBP6Ch+KYE
AaylC5kPJcSK9w+K9VOQD8t/k1w+YD63H1UeOmAVBQkOeOABzFIWra7dliGUceZb
0tejOLAsTEwHgtdmoRscl1pBY+qT57Y+tWWLI70E+CgcrDqlGtp1yyd8z2QDZKpe
ji+jhX8RReGTAgie/VnQtyBBh5oRX+BZ+bhBCPYv4P5fG1z22RjbvHMRziZiD+oR
PY2tTIvJtZcSgRS5oe3DJr54HXGkQikV33Oa9oQO0SjWLuC8KFEBiByqAzZ27x2E
U6BWAJ/bBJckbZer41/NUQRz/hbikx9BsVcZZg3uMEK9nCl+n5zJcRMx+LJVQqfw
J+ZiIuqeOQKekZd07cUMqaFInt3ad7NwaD7ZSv1cccHmMyb1Bk2PEfMPtcNXHqsP
HB9uIB3o0IARVzOPNvgM
=K9IU
-----END PGP SIGNATURE-----
More information about the Dnsmasq-discuss
mailing list