Can't resolve dns names

I’m running Tumbleweed and Network Manager. I can connect to IP addresses, but I cannot resolve any names. For example, I can’t ping “google.com”, but “8.8.8.8” pings just fine. Changing DNS server from automatic (which points to my local Pi-Hole, that works fine on this network) to the cloudflare DNS servers, or google DNS servers, doesn’t change anything. BTW, I have verified /etc/resolv.conf matches with DNS set to automatic, as well as when I specify the DNS servers. My hosts file is pretty bare with just loopback addresses and a couple of IPv6 addresses (I turned off IPv6 in Network Manager though).

Can anybody help me troubleshoot this problem?

BTW, my firewall is disable while this is going on.

I don’t have “Other DNS Servers” as an option. I just have it set to Automatic. As I said, I have IPv6 disabled. I also am wired, not wireless, so those setting don’t apply.

Here’s the contents of my /etc/resolv.conf:

## Generated by NetworkManager
#nameserver 10.6.2.67

As I mentioned above, that’s the IP address of my Pi-Hole.

It contains only comments which explains why DNS resolution does not work.

No. It doesn’t really. I added the extra hash mark “#” to each line when trying to get it formatted correctly. Sorry. It really just has this:

# Generated by NetworkManager
nameserver 10.6.2.67

Instead of stories about when it works or not, better show what it does with e.g.

host forums.opensuse.org

This apparently is a DNS server inside your private network. When this does not function better contact the manager of that server.

When you want that people trust your copy-paste, then always post including the prompt/command line, all output and the next prompt line, unabridged, unaltered. Like on my system

henk@boven:~> cat /etc/resolv.conf 
search xs4all.nl
nameserver 195.121.1.66
nameserver 195.121.1.34
henk@boven:~> 

Sorry again about the formatting. Let’s see if I can get it right this time.

I should have known that my local DNS server would be called into question. Sorry about that. Here’s something better (I hope):

pinball@localhost:~$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 1.1.1.1
nameserver 1.0.0.1
pinball@localhost:~$ 

Ok. No more “stories”. Here’s the output of ping:

pinball@localhost:/$ ping forums.opensuse.org
ping: forums.opensuse.org: Name or service not known
pinball@localhost:/$
pinball@localhost:/$ ping 195.135.221.140 -c 4
PING 195.135.221.140 (195.135.221.140) 56(84) bytes of data.
64 bytes from 195.135.221.140: icmp_seq=1 ttl=53 time=124 ms
64 bytes from 195.135.221.140: icmp_seq=2 ttl=53 time=123 ms
64 bytes from 195.135.221.140: icmp_seq=3 ttl=53 time=127 ms
64 bytes from 195.135.221.140: icmp_seq=4 ttl=53 time=122 ms

--- 195.135.221.140 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 121.753/124.149/126.934/1.875 ms
pinball@localhost:/$ 

Host command outputs:

pinball@localhost:~$ host forums.opensuse.org
forums.opensuse.org has address 195.135.221.140
forums.opensuse.org has IPv6 address 2001:67c:2178:8::16
forums.opensuse.org mail is handled by 0 mx1.opensuse.org.
forums.opensuse.org mail is handled by 0 mx2.opensuse.org.
pinball@localhost:~$
pinball@localhost:~$ host 195.135.221.140
140.221.135.195.in-addr.arpa domain name pointer proxy-nue.opensuse.org.
pinball@localhost:~$ 

And I’ll throw in dig too, in case that provides any additional info:

pinball@localhost:~$ dig forums.opensuse.org

; <<>> DiG 9.18.18 <<>> forums.opensuse.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9761
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;forums.opensuse.org.		IN	A

;; ANSWER SECTION:
forums.opensuse.org.	3600	IN	A	195.135.221.140

;; Query time: 113 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Wed Sep 20 11:13:57 CDT 2023
;; MSG SIZE  rcvd: 64

pinball@localhost:~$ 
pinball@localhost:~$ dig 195.135.221.140

; <<>> DiG 9.18.18 <<>> 195.135.221.140
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52671
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;195.135.221.140.		IN	A

;; AUTHORITY SECTION:
.			86400	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2023092000 1800 900 604800 86400

;; Query time: 16 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Wed Sep 20 11:14:24 CDT 2023
;; MSG SIZE  rcvd: 119

pinball@localhost:~$ 

Show

grep hosts /etc/nsswitch.conf
grep hosts /usr/etc/nsswitch.conf
1 Like
pinball@localhost:~$ grep hosts /etc/nsswitch.conf
# Valid databases are: aliases, ethers, group, gshadow, hosts,
hosts:  	[NOTFOUND=return] files mdns_minimal dns
pinball@localhost:~$ 
pinball@localhost:~$ grep hosts /usr/etc/nsswitch.conf
# Valid databases are: aliases, ethers, group, gshadow, hosts,
hosts:  	files dns
pinball@localhost:~$ 

Remove [NOTFOUND=return] from this line.

1 Like

Great! Thank you!

I can tell if this will fix it though. For some reason NetworkManager now crashes every time I try to start it. I’m going to have to create a new thread to try to find a fix for that.

That did, in fact, solve my problem. Thank you!