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 opensuse.org                
ping: opensuse.org: Name or service not known

However, pinging IP addresses works.

Also nslookup google.com or any other domain works.

**
#** nslookup google.com  
Server:         192.168.42.129 
Address:        192.168.42.129#53 

Non-authoritative answer: 
Name:   google.com 
Address: 142.250.186.110 
Name:   google.com 
Address: 2a00:1450:4001:831::200e

This also works.


# host 158.255.46.17
17.46.255.158.in-addr.arpa domain name pointer server.guildmedia.net.

strace fails


# strace -e trace=open -f resolveip google.com
resolveip: Unable to find hostid for 'google.com': 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 127.0.0.1/8 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 192.168.43.175/24 brd 192.168.43.255 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
NETCONFIG_DNS_POLICY="auto"
NETCONFIG_DNS_FORWARDER="resolver"
NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
NETCONFIG_DNS_STATIC_SEARCHLIST=""
# When the NETCONFIG_DNS_FORWARDER variable is set to "resolver",
NETCONFIG_DNS_STATIC_SERVERS=""
NETCONFIG_DNS_RANKING="auto"
NETCONFIG_DNS_RESOLVER_OPTIONS=""
NETCONFIG_DNS_RESOLVER_SORTLIST=""


# netconfig -v update                                                                     
<13>May 19 13:08:51 netconfig: Executing '-v update' for pid 4232
debug: lockfile created (/var/run/netconfig.pid) 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='192.168.43.1'
debug: exit get_dns_settings: /var/run/netconfig/NetworkManager.netconfig
debug: write_resolv_conf: '   ' ' 192.168.43.1 '
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:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
### Call "netconfig update -f" to force adjusting of /etc/resolv.conf.
nameserver 192.168.43.1

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 192.168.43.1

192.168.43.1 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 1.1.1.1 (Couldfare), 8.8.8.8 (Google), 9.9.9.9 (Quad9)

I guess there is something more.

nslookup uses 192.168.42.129 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 192.168.43.1 only. This is in the same network 192.168.43.0/24 as the system.

That nameserver was automaticly generated.

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

but that made no difference.

I can can ping both 192.168.42.129 and 192.168.43.1

I manually added the following nameservers, 1.1.1.1 (Couldfare), 8.8.8.8 (Google), 1.0.0.1 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: 192.168.43.1
Post:

ls -al /etc/sysconfig/network/config
/etc/resolv.conf

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: Network Management With Systemd - openSUSE Wiki

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

To gain a better understanding of your network:

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

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

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

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

Regards

susejunky

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?