I am still learning linux, and so far having great trouble in the networking and DNS areas - I think due to misunderstandings.
My understanding is if we provide nameservers in /etc/resolv.conf these will be used when trying to resolv domains.
Therefore if I specify a dead nameserver such as
when running the following code, shouldn't we get a result like timed out, or couldn't find etc...
Instead we get
google.com has address 188.8.131.52 google.com has address 184.108.40.206 ...
I expected that as we have a broken DNS "phonebook", when host cmd tries to get info on google.com it shouldn't be able to get any IP. Apparently not.
Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: Name: google.com Address: 220.127.116.11 Name: google.com Address: 18.104.22.168 ....
;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43950 ;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 4, ADDITIONAL: 4 ;; QUESTION SECTION: ;google.com. IN A ;; ANSWER SECTION: google.com. 188 IN A 22.214.171.124 google.com. 188 IN A 126.96.36.199 ... ;; AUTHORITY SECTION: google.com. 170629 IN NS ns1.google.com. google.com. 170629 IN NS ns2.google.com. ... ;; ADDITIONAL SECTION: ns1.google.com. 170629 IN A 188.8.131.52 ns2.google.com. 170629 IN A 184.108.40.206 ... ;; SERVER: 127.0.0.1#53(127.0.0.1) ...
127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.1.1 raspberrypi
... dns-nameservers 4220.127.116.11 (dead dns) dns-search home.lan dns-domain home.lan ...