Fixing a DNS issue

5 November 2025


A couple of weeks ago I was having network issues which left me unable to use any applications that required internet access. This was a problem for me since I wanted to ssh into one of my university’s compute clusters. These are my notes from when I tried to fix the issue.


I first tried pinging google.com to see if I could reach it.

08:45:58 sam@localhost ~ → ping google.com
ping: google.com: Temporary failure in name resolution

This failed due to a “name resolution” failure which meant that the ping command was unable to find an IP address for google.com using DNS. which makes sense since the culprit is always DNS. In order to access google.com, my laptop needs to work out what IP address to use which essentially tells it and the way it does this is through DNS which maps domain names like google.com to an IP address.

To work out what’s wrong with I ran nslookup google.com which just does the domain name to IP address translation by querying name servers.

08:46:01 sam@localhost ~ → nslookup google.com
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached

The nslookup command failed which meant that it was unable to access the name server which it says is situated at ::1#53 and 127.0.0.1#53. ::1 is the IPv6 version of 127.0.0.1 or loopback address which refers to services running on my laptop.

To check it was just a DNS issue I ran a ping to an IP address that I knew would give a response. I picked 8.8.8.8 which is one of the IP addresses for Google Public DNS.

08:46:10 sam@localhost ~ → ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=7.96 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=6.72 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=6.87 ms

I was able to successfully ping the IP so the problem is most likely DNS resolution.

Next I checked /etc/resolv.conf and for some reason it was empty?

24 08:46:20 sam@localhost ~ → cat /etc/resolv.conf
25 08:46:31 sam@localhost ~ →

Since it wasn’t being generated I guessed it was an issue with DHCP which, among other things, gives a default DNS server for devices to used. I checked /etc/sysconfig/network/config but I’m not sure what I was looking for.

01:31:56 sam@dhcp-10-247-31-187 ~ → sudo cat /etc/sysconfig/network/config
## Path:        Network/General
## Description: Global network configuration
#
# Note:
# Most of the options can and should be overridden by per-interface
# settings in the ifcfg-* files.
#
# Note: The ISC dhclient started by the NetworkManager is not using any
# of these options -- NetworkManager is not using any sysconfig settings.
#
...

I then checked /run/NetworkManager/resolv.conf which contains the DNS servers that NetworkManager found. It was populated so I symlinked /run/NetworkManager/resolv.conf to /etc/resolv.conf

My notes end here so I think this fixed my issue.