[Dnsmasq-discuss] local-service feature not working as expected
T o n g
mlist4suntong at yahoo.com
Mon Feb 2 05:26:19 GMT 2015
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
More information about the Dnsmasq-discuss
mailing list