Relevant hardware:
Laptop with ethernet cable plugged in, dual boot win 10 and ubuntu 16.04

There's an url I need to be able to access that I assume points to a server on the local network. The url is like tool.mycompany.local. This url works on my windows boot but not on my linux boot (ERR_NAME_NOT_RESOLVED in chrome).

The biggest issue is that I have no idea what to google (".local" searches for "local") and https://en.wikipedia.org/wiki/.local doesn't seem to have the info I need (or I don't understand it).

I've tried tracing the ip for that url from windows, which works, but if I try to access that ip from linux I get redirected to the url upon which I get the same ERR_NAME_NOT_RESOLVED as I did before.

The servicedesk here is no help as everyone is expected to work with windows and I'm an external consultant with my own laptop.

Worst case I reboot to windows so it's not that big of an issue, I'd mostly want to know why this happens and whether I can fix this on my end.


EDIT: I'm a retard and completely missed the second part of the redirect: it not only redirects to the url, but more specifically to a login page along the lines of tool.mycompany.local/login. replacing the base url with the ip address again shows me the login page again.

That aside, not having to manually replace that each time would be nice.

EDIT2: Like I said in a comment: I tried with wget and curl too, and no difference. I've also tried with nslookup on linux and it DOES work!

Why don't chrome / wget / curl use that nameserver then?

EDIT3: to answer a question from the comments:

# /etc/nsswitch.conf
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
  • You need to use a DNS server that is able to resolve the address. Windows might be picking it up by using the DHCP configuration. For Linux I'm not sure what you might have to look into. The static configuration should be in resolv.conf if I'm not mistaken. – Seth Mar 22 '18 at 13:08
  • Could you add the content of your /etc/nsswitch.conf file to your question? Particularly the line starting with hosts:? – user2313067 Mar 22 '18 at 16:40
  • @user2313067 done, but from the comments at the top of that file I get the feeling this isn't being used? – Joran Dox Mar 23 '18 at 7:03
  • Try to remove [NOT FOUND=return] from the hosts line. I don't know why that comment is there but unless Ubuntu does strange patches to glibc, this should be used. – user2313067 Mar 23 '18 at 15:26
  • @user2313067 .local is often a poor choice for an intranet DNS: it should be reserved for multicast DNS (the mdns4_minimal entry). Depending on settings this can slow down or make DNS requests fail (notwithtanding a wrong DNS server), precisely because it's before "dns" in the lookup order, probably to implement rfc 6762 efficiently: en.wikipedia.org/wiki/Multicast_DNS#Protocol_overview – A.B Mar 24 '18 at 22:28

This is happening because your Linux OS is not using the same DNS server as your Windows OS. So, first figure out what DNS server(s) your Windows install is using. To do this, open a command prompt and run the ipconfig /all and looks the DNS server(s). Take note of their IP addresses. Then in your Linux OS, edit the /etc/resolv.conf file and add the following lines to the top of the file:

nameserver dns.1.ip.addr
nameserver dns.2.ip.addr

Where you of course replace dns.1.ip.addr with their actual IP addresses.

Now your linux OS should use the same DNS servers. Note that this is really a temporary solution. In reality, you should configure your linux box to use DHCP to pull the DNS settings.

  • Right, that makes sense, I'll check that out when I boot to windows again, thanks! – Joran Dox Mar 22 '18 at 13:51
  • wait, plot twist: nslookup works fine on linux too, why can't chrome/wget/curl find the right ip then? – Joran Dox Mar 22 '18 at 14:02
  • 1
    See @user2313067 comment and mine after. If you're not using mdns at all, you should completely remove the mdns4_minimal entry in /etc/nsswitch.conf . That's because .local has been reserved for mdns (too bad if your intranet domain ending in .local existed before this RFC in standard track.). – A.B Mar 24 '18 at 22:32

You could also try it with a command line tool like wget or curl instead of a full fledged web browser.

This sounds like a DNS problem to me.

What happens if you find out the IP address of that site on your Windows box, e.g. use

nslookup tool.mycompany.local

from a command line (e.g. cmd.exe) and then try to fetch the page with your browser or tool trough on the Linux box?

This would show if you are blocked by some firewall or not or whatever other network issue. And then you could continue to fix your DNS setup.

  • I did find the address with nslookup on windows; though I used chrome (see 4th paragraph), wget and curl get the same redirect. You did help me realize part of a workaround though, thanks! – Joran Dox Mar 22 '18 at 13:20
  • The quickest hack is resolving that address by a line in your /etc/hosts file. If you want to configure your DNS some important files are /etc/network/interfaces, /etc/resolv.conf and /etc/nsswitch.conf, you can consult your favourite search engine for more information on them, or old school, read their man pages. – mvw Mar 22 '18 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.