Firefox DNS resolution order

0

Do you know what is the DNS resolution process order of domain names in Firefox?

Has the hosts file proprity over DNS server? Has the hosts file proprity over mDNS names in the network or mDNS is completely ignored?

Thanks.

Tobia

Posted 2018-09-21T09:28:06.153

Reputation: 2 022

In... which operating system? Linux? macOS? FreeBSD? Windows? – user1686 – 2018-09-21T09:40:25.463

I guessed Firefox solves names in a platform-indipendend way, if it is not, I'm interested in Windows and Linux – Tobia – 2018-09-21T09:48:14.270

While browsers are indeed somewhat more involved in the name resolution process than a typical app, they still rely on the OS-provided services that all other apps use. Firefox certainly doesn't bundle a mDNS or NBNS implementation, for example. – user1686 – 2018-09-21T10:18:55.540

Answers

0

Almost universally on all operating systems, the resolve order is as follows :

  1. Check if the name queried is our own.
  2. Search the local Hosts file
  3. Search the Domain Name System (DNS) server
  4. Windows might continue to do NetBIOS name resolution, with similar actions on other OS.

harrymc

Posted 2018-09-21T09:28:06.153

Reputation: 306 093

Does not it seach with multicast? – Tobia – 2018-09-21T09:49:37.143

Some do query in parallel multiple network adapters, if they exist. Apart from that, only one DNS server is contacted at any one time on a given network adapter. – harrymc – 2018-09-21T09:54:46.233

I meant multicast-DNS, I'm triyng to point firefox the specific local server using a webapp name, but I cannot set records or change the DNS server in the network. For example http://mywebapppage for now I'm usign hosts file in every computer in the network but it is not very handy in case of DHCP network. I know that zeroconfig or mdns was made for something like this

– Tobia – 2018-09-21T10:03:42.973

You may assign the DNS server computer a static IP, but ensure that the DHCP allocation range does not include it. – harrymc – 2018-09-21T10:05:52.753

I'm not the sysadmin of the networks, i cannot use dns resolution... as I said, I cannot set records or change the DNS server in the network. This is a distributed software that should works in the local network using browsers, but I canno ask to change dns, many times dns is the dns of the internet provider. – Tobia – 2018-09-21T10:09:13.023

If the computer has a name inside the local network, it should be findable by some form of my 4th point. – harrymc – 2018-09-21T10:12:19.050

@Tobia: Both mDNS and NetBIOS (NBNS) have to be provided by the OS – Firefox doesn't bundle its own implementation. – user1686 – 2018-09-21T10:19:54.153

Ok, let's say my OS has mDNS. How shoud I publish the service name _http._tcp? – Tobia – 2018-09-21T10:22:07.253

@Tobia: Firefox won't do SRV or DNS-SD service lookup at all. It only performs direct "hostname ⇒ address" (e.g. "foo.local") resolution. – user1686 – 2018-09-21T10:23:40.253

I don't know the Mac - on Windows this is a parameter of the IPv4 settings. HTTP, TCP aren't used for DNS queries. – harrymc – 2018-09-21T10:33:13.817

I think some NAS devices (Synology) with web-interface control resolved this problem in some-way without using Netbios or network dns. I could login just with http://mynasname and the only service I found is mdns... but maybe I'm missing something. I cannot understand if is there a tool or some way to know the name resolution source (hosts/dns server/mdns ...) of a query name. – Tobia – 2018-09-21T10:33:41.570

There's surely a way to achieve this. Without any knowledge of the Mac, perhaps this link might be useful.

– harrymc – 2018-09-21T10:36:19.247