[Dnsmasq-discuss] Resolving .local names

Nicolas Cavallari nicolas.cavallari at green-communications.fr
Thu Nov 5 11:48:10 GMT 2020


On 05/11/2020 11:33, Mukuntha rajaa wrote:
> Hi,
> 
> I am working on a legacy application, which uses "xxxx.local" format 
> names. I have setup dnsmasq in my system.
> 
> /usr/sbin/dnsmasq -k --bind-interfaces 
> --listen-address=127.0.0.1,192.168.101.101 --dns-forward-max=1000 
> --cache-size=10000 --server 10.58.112.113
> 
> If I run my application, which does getaddrinfo on "xxxx.local" as first 
> step,I get
> 
> "Name or service not known"
> 
> Does dnsmasq not resolve ".local" names too ? How to resolve ".local" 
> names ?
> All my resolutions are only within my machine. I am not entertaining any 
> DNS resolution outside of my machine.

.local is reserved for mDNS usage and many (if not all) glibc-based 
linux distribution have basic support for mDNS, even if avahi is not 
installed.

As a result, dnsmasq is probably not even queried by your system's name 
resolver, so there is nothing dnsmasq can do.

The easiest solution is to stop using .local.
You can also hack your system to not use mDNS, by modifying 
/etc/nsswitch.conf or similar, but using .local in this way violates 
RFCs, so don't expect this to work everywhere except on your machine.



More information about the Dnsmasq-discuss mailing list