I’ve been having an odd problem with my PC, where I cannot resolve a few domains. To be clear, most domains resolve perfectly, but a few ones that should resolve don’t. For example, www.nvidia.com doesn’t resolve, although nvidia.com does.
I’ve tried it on a few other computers on the network such as my server and router, but no joy.
A few other things I’ve tried…
Different browsers
Clearing the DNS cache in those browsers (firefox and chromium)
Trying these different DNS servers in different orders: 192.168.1.1 (my router), 8.8.8.8, 8.8.4.4 and 1.1.1.1
Restarting my PC
Ensuring firewalld is disabled whilst testing (are there other firewalls on Arch I might be unaware of?)
[sam@arch-anywhere]: ~>$ curl www.nvidia.co.uk
curl: (6) Could not resolve host: www.nvidia.co.uk
[sam@arch-anywhere]: ~>$ curl nvidia.co.uk
<head><body> This object may be found <a HREF="http://www.nvidia.uk/page/home.html">here</a> </body>
Like I mentioned above, I’ve verified that these problems don’t happen on other PCs on the network - its just this one.
Both resolve here, although oddly they point to different places (yes there are reasons for doing that). Just in case, try the following after leaving alone for an hour (which seems to be the TTL Nvidia uses) :-
for i in 8.8.8.8 8.8.4.4 1.1.1.1
do
dig www.nvidia.co.uk @$i; dig nvidia.co.uk @$i
done
And this is from the endpoint. The PC I’m on now is the one failing to resolve. The router along with my home server have no issues resolving the address. I’m sure this has happened for other domains for a while, but I can’t recall what they were.
if you pass the -v flag to host, but leave the lookup server blank, host will show you the full dns lookup including the resolver to which your computer defaults, so
user@host:~$ host -v -t a nvidia.co.uk
and that will tell you the server that is returning NXDOMAIN an entry that should exist.
What happens when you run curl ‘http://www.nividia.co.uk’ Also, you could run tcpdump -vv -X -n -i eth0 port 53 while you run your curl command or browser search and see exactly where curl/the browser is querying the dns record.
Edit: single quotes around the URL are probably wrong.
[sam@arch-anywhere]: ~>$ curl http://nvidia.co.uk
<head><body> This object may be found <a HREF="http://www.nvidia.uk/page/home.html">here</a> </body>
I’ve just tried the tcpdump as well, and it looks like that I’m getting an answer back from 8.8.8.8 for www.nvidia.co.uk
cs326284.adn.phicdn.net: type A, class IN, addr 192.229.182.215
Name: cs326284.adn.phicdn.net
Type: A (Host Address) (1)
Class: IN (0x0001)
Time to live: 1547
Data length: 4
Address: 192.229.182.215
So it looks like the DNS failing to resolve may be a red herring…
Edit: I tried a traceroute to 192.229.182.215, and I can reach that no problem
Just to make sure I’ve made no changes, I’ve done “iptables -S” and “nft list uleset” to see if there are any strange rules - and it all looks normal there.
I’ve double checked, and although I do have firewalld installed, its disabled and inactive
Is it possible that you have ipv6 enabled so curl is trying to use ipv6, but your dns query is only returning A records. What happens if you pass the -4 flag to curl?
If you are using pfSense you can create rules that only allow your selected DNS servers to be used. This has helped me quite a bit, it even overrides device specific DNS settings. If you go this route it will also give you a nice log in pfSense that will help with diagnosing your issue.
[sam@arch-anywhere]: ~>$ curl -4 www.nvidia.co.uk
curl: (6) Could not resolve host: www.nvidia.co.uk
[sam@arch-anywhere]: ~>$ curl -4 nvidia.co.uk
<head><body> This object may be found <a HREF="http://www.nvidia.uk/page/home.html">here</a> </body>
I do happen to be using pfsense, so I can look into dns overriding, as it does sound interesting.
What I don’t fully understand is that the tcpdump I took did make it look like it was doing a lookup, and getting a result back. It just looks like there’s something stopping from curl seeing it.
Yep, same response with -L
Looks like I’d need to compile the debug version of curl to specify --dns-server
[sam@arch-anywhere]: ~>$ curl --dns-servers 8.8.8.8 -L www.nvidia.co.uk
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
I also setup the DNS overrides, which did seem to work nicely - although I’ve disabled it for now whilst I try to get this working