*.local DNS resolves, but no applications use it.

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mrwud

*.local DNS resolves, but no applications use it.

Post by mrwud »

Hello,
I recently started using mint, but I am not new to linux or networking. This issue that has me thoroughly confused. At work we have a domain that ends in .local I'll call it something.local from now on. Using firefox, telnet, ping, ssh, or putty (probably others) I am unable to connect by name to any of the A records or CNAMEs in something.local. I am however able to connect just fine using the IP addresses. So I assumed my dns settings were off, or for some reason I was just not resolving that domain. Here is the kicker though, when I use the host command it resolves the correct address.

Here is an example:

Code: Select all

Computer user # host server.something.local
server.something.local has address 10.9.8.7
Computer user # ping server.something.local
ping: unknown host server.something.local
The only thing I can think is that the applications are somehow using a differant means of resolving DNS then the host command.


I tried static addressing, and DHCP
currently using DHCP, /etc/resolv.conf has the correct DNS servers
I can resolve something.local addresses when I use dig, and nslookup to those DNS servers
I checked /etc/hosts and it is clear
I also made sure that I did not have a proxy set.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mrwud

Re: *.local DNS resolves, but no applications use it.

Post by mrwud »

I did a packet capture, and when I ping server.something.local im sending out mDNS queries that get no responses. When I ping google.com, it does a standard DNS query to my DNS servers. I am going to look into why it would choose one over the other.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: *.local DNS resolves, but no applications use it.

Post by altair4 »

You are above my pay grade on this question but maybe it's something simple like the service is not running:

Code: Select all

sudo service avahi-daemon status
If it's not running start it:

Code: Select all

sudo service avahi-daemon start
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
mrwud

Re: *.local DNS resolves, but no applications use it.

Post by mrwud »

Actually, I looked around a bit and it is the exact opposite. If I stop the avahi-daemon everything works as expected. I've been trying to find a way to get avahi to ignore .local, but I don't think I need it for anything anyway so I'm just going to disable it for now. If I find a way to have it run, and still use .local domains I'll post it.
skought

Re: *.local DNS resolves, but no applications use it.

Post by skought »

I ran into this same thing. Very frustrating, but a simple fix without disabling avahi-daemon.

in /etc/nsswitch.conf, find the line:

Code: Select all

hosts:     files mdns4_minimal [NOTFOUND=return] dns mdns4
You can either remove [NOTFOUND=return], which will tell it not to fail after MDNS fails, or you can reorder so that it just uses DNS first by removing mdns4_minimal as well. Here's mine:

Code: Select all

hosts:     files dns mdns4
Locked

Return to “Networking”