10

My networking is clearly bollixed, but I can't figure out how:

derek@vinka:~$ nslookup google.com
;; connection timed out; no servers could be reached

derek@vinka:~$ curl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

Surely, if I can't look up a domain, I shouldn't be able to browse to it. Can anybody explain what's going on here?

tracepath is also just a long series of either ??? or no reply responses.

(fwiw, everything was working, but I'm trying to change my secondary router—on a 50' ethernet cable—connected to the cable modem/router to become an AP on the same subnet, instead of being a router on its own subnet)

derek@vinka:~$ env | grep -i proxy
derek@vinka:~$ cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       vinka

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

derek@vinka:~$ 

derek@vinka:~$ nslookup
> server
Default server: 127.0.1.1
Address: 127.0.1.1#53

Interestingly, I get the same result from a system running NetworkManager and another running Connmand.

If I lookup through my router (nslookup host 192.168.0.1), I still can't get any resolutions, but browsers/curl/wget always work on my laptop, my raspberry Pi media server, and my phone—all of them running different OSes.

What about /etc/nsswitch?

derek@vinka:~$ grep hosts /etc/nsswitch.conf
hosts:          files mdns4_minimal dns [NOTFOUND=return] resolve [!UNAVAIL=return] dns

Clearly that last dns is redundant, but it looks right, otherwise.

derek@vinka:~$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 127.0.1.1

On my media server:

derek@nas ~ $ cat /etc/resolv.conf
# Generated by Connection Manager
nameserver 127.0.0.1
25
  • 2
    It looks like the website or DNS mapping are cached somewhere on your network, can you ping a website by IP?
    – flerb
    Commented Apr 23, 2018 at 22:43
  • Does havahi deamon is instaleld on your distro ? Also no you basically cant browse the Web without dns on few site you could if you know the ip but most of thé time it wont work
    – Kiwy
    Commented Apr 23, 2018 at 23:02
  • 2
    You’re probably using a proxy, which is taking care of the DNS lookups for you. Check the output of env | grep -i proxy. Commented Apr 24, 2018 at 5:10
  • 4
    @ajeh systemd strikes again. This time it's systemd-resolve. Commented Apr 26, 2018 at 20:34
  • 1
    @Auspex "effectively", yes certainly. But "technically" they are different addresses for loopback. Some software uses this to differentiate between normal loopback and a private internal-only address. Commented Apr 28, 2018 at 7:29

1 Answer 1

1

Not sure what you mean by "browse the web", but firefox is using it's own resolver - https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/privacy-policy/firefox/

And pretty much any application can ignore your DNS settings and use it's own resolver. SO the fact that you don't have DNS setup correctly won't stop them.

1
  • 2
    Well, as you can see from the question, what I mean by "browse the web" included using curl. I'm pretty sure curl isn't smart enough to have its own resolver. In fact I used multiple browsers all with the same result, but curl is best for presenting the results here. Still, this is as close an answer as I've had!
    – Auspex
    Commented Mar 23, 2019 at 9:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .