Broken DNS

My stupid, I think I broke something with the DNS while trying to set up directory sharing over the network.

Browser access to websites fails.

# ping                
ping: Name or service not known

However, pinging IP addresses works.

Also nslookup or any other domain works.

#** nslookup  

Non-authoritative answer: 
Address: 2a00:1450:4001:831::200e

This also works.

# host domain name pointer

strace fails

# strace -e trace=open -f resolveip
resolveip: Unable to find hostid for '': host not found
+++ exited with 2 +++

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether e4:11:5b:2c:75:19 brd ff:ff:ff:ff:ff:ff
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 10:0b:a9:1b:0f:b8 brd ff:ff:ff:ff:ff:ff
    altname wlp37s0
    inet brd scope global dynamic noprefixroute wlo1
       valid_lft 6035sec preferred_lft 6035sec
    inet6 fe80::62a5:2aa4:c920:51bb/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

# grep "NETCONFIG_DNS" /etc/sysconfig/network/config
# When the NETCONFIG_DNS_FORWARDER variable is set to "resolver",

# netconfig -v update                                                                     
<13>May 19 13:08:51 netconfig: Executing '-v update' for pid 4232
debug: lockfile created (/var/run/ for PID 21632
debug: lockfile created
debug: Module order: dns-resolver dns-bind dns-dnsmasq nis ntp-runtime
debug: dns-resolver module called
debug: Resolved dns-policy 'auto' for service 'NetworkManager' to 'STATIC_FALLBACK * NetworkManager'
debug: Static Fallback
debug: Other: *
debug: Use NetworkManager policy merged settings
debug: exec get_dns_settings: /var/run/netconfig/NetworkManager.netconfig
debug:      get_dns_settings: service 'NetworkManager' => rank '1'
debug:      get_dns_settings: DNS_SEARCHLIST_1=''
debug:      get_dns_settings: DNS_SERVERS_1=''
debug: exit get_dns_settings: /var/run/netconfig/NetworkManager.netconfig
debug: write_resolv_conf: '   ' ' '
debug: dns settings written to /var/run/netconfig/resolv.conf
debug: /etc/resolv.conf is already a link to /var/run/netconfig/resolv.conf
debug: dns-bind Module called
debug: dns-dnsmasq Module called
debug: nis Module called
debug: Resolved nis-policy 'auto' for service 'NetworkManager' to 'STATIC_FALLBACK * NetworkManager'
debug: Static Fallback
debug: Other: *
debug: Use NetworkManager policy merged settings
debug: exec get_nis_settings: /var/run/netconfig/NetworkManager.netconfig
debug: exit get_nis_settings: /var/run/netconfig/NetworkManager.netconfig
debug: set_nisdomainname:   176
debug: set_nisdomainname: => yes
debug: set_nisdomainname: old]=, new[176]=
debug: format_yp_conf called with :
debug: Using static fallback
debug: format_static[0] called
debug: write_yp_conf
debug: nis settings written to /var/run/netconfig/yp.conf
debug: /etc/yp.conf is already a link to /var/run/netconfig/yp.conf
debug: nis domainname '' is up to date
debug: ntp-runtime Module called
debug: Resolved ntp-policy 'auto' for service 'NetworkManager' to 'STATIC_FALLBACK * NetworkManager'
debug: Static Fallback
debug: Other: *
debug: Use NetworkManager policy merged settings
debug: exec get_ntp_settings: /var/run/netconfig/NetworkManager.netconfig
debug:      get_ntp_settings: NTP_SERVER_LIST=''
debug: exit get_ntp_settings: /var/run/netconfig/NetworkManager.netconfig
debug: write_chrony_servers: 
debug: ntp servers written to /var/run/netconfig/chrony.servers

I did the following to recreate teh resolv.conf, but that makes no difference to the DNS issue

# rm /etc/resolv.conf && systemctl restart NetworkManager.service

### /etc/resolv.conf is a symlink to /var/run/netconfig/resolv.conf
### autogenerated by netconfig!
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# or disable DNS configuration updates via netconfig by setting:
# See also the netconfig(8) manual page and other documentation.
### Call "netconfig update -f" to force adjusting of /etc/resolv.conf.

If there is any more information you’d like me to provide, please let me know.

Any help would be greatly appreciated. I know enough to get myself into trouble with networking, but not enough to fix it.

DNS uses a nameserver and your nameserver is set to is a private network address and I am not sure that machine is acting as a good DNS server.
Probably your computer got that address through DHCP and it is your router.

See here for a way to add another DNS server, as server you can for example try (Couldfare), (Google), (Quad9)

I guess there is something more.

nslookup uses as DNS server. It is in another network then the system, but that should not matter (as long as it can be reached).

in /etc/resolv.conf there is only. This is in the same network as the system.

That nameserver was automaticly generated.

I have also manually the following name servers (Couldfare), (Google),

but that made no difference.

I can can ping both and

I manually added the following nameservers, (Couldfare), (Google), to /etc/resolv.conf

with the internet still being inaccessible.

Do you use dhcp?
Did you try to set the nameserver in your Networkmanager?
Is this the IP of your Router:

ls -al /etc/sysconfig/network/config

Thats a symlink to /var/run/netconfig/resolv.conf
See your first post.

I reread your replay and followed the instructions you linked to.

Still no success.

This IP is auto-generated, not sure, what it is.

My laptop connects to the inernet via wifi over my mobile phone.

I’ve also tried tethering the laptop to phone via USB cable, but the issue still persists.

So your Phone is the “Router”.
Try to set the DNS in the Networkmanager Apllett.

I already did so, following the instructions that @marel directed me to.

This still did not work.

Handy is only for telephone and sms, so not my prefered choice…

Here I am out.

It doesn’t matter if it is a mobile phone or USB dongle, they both do the same thing. It is simpler for me to share the wifi to multiple devices via the phone.

I’m starting to consider using a live install / recovery USB stick image to zypper dup and see if that sorts things out. The laptop needs an update anyway.

What works for me and never failed since making the switch:

As far as i can see you mentioned two devices so far: a laptop and a mobile phone. Your laptop receives its IP-address ( via DHCP from your mobile phone.

To gain a better understanding of your network:

What is the internal IP-address of your mobile phone - ?

How does your mobile phone connect to the internet (mobile data, wifi, …)?

Your laptop OS uses as nameserver. Which device has this IP - your mobile phone?

However nslookup used as nameserver which is an address in a different internal network. Which device acts as gateway between these two internal networks?



Post: as root:

ls -al /etc/NetworkManager/
systemctl status network.service

Please post also the output of “cat /etc/resolv.conf” after you added one of the DNS servers I gave. Does it show that DNS server?