DNS Request Timeout

Expected Behaviour:

DNS should be resolving

Actual Behaviour:

DNS request is timing out

Additional Info

Been having some odd issues lately. Pi-hole also recently changed the nameserver to an IPV6 address which caused an issue where I could not update gravity, found the solution to that here but not sure what the cause was.

Debug Token:

https://tricorder.pi-hole.net/xBykMHPk/

Updated Debug Token:

https://tricorder.pi-hole.net/1wLKkCrk/

Updating in case someone is able to get to this thread in the next 48 hours. Will keep updating, I understand there are lots of help threads to get too.

You're running nslookup interactively:

$ man nslookup
[..]
DESCRIPTION
       nslookup  is a program to query Internet domain name servers.
       nslookup has two modes: interactive and non-interactive.  In‐
       teractive  mode allows the user to query name servers for in‐
       formation about various hosts and domains or to print a  list
       of  hosts  in a domain.  Non-interactive mode prints just the
       name and requested information for a host or domain.

ARGUMENTS
       Interactive mode is entered in the following cases:

       a. when no arguments are given (the default  name  server  is
          used);

       b. when the first argument is a hyphen (-) and the second ar‐
          gument is the host name or  Internet  address  of  a  name
          server.

       Non-interactive  mode  is  used when the name or Internet ad‐
       dress of the host to be looked up is given as the first argu‐
       ment. The optional second argument specifies the host name or
       address of a name server.

If do so, you should drop the nslookup part and only enter test.com instead eg:

$ nslookup
> test.com
Server:         10.0.0.2
Address:        10.0.0.2#53

Non-authoritative answer:
Name:   test.com
Address: 34.224.149.186
Name:   test.com
Address: 3.18.255.247
>

Non-interactive you would do below:

$ nslookup test.com
Server:         10.0.0.2
Address:        10.0.0.2#53

Non-authoritative answer:
Name:   test.com
Address: 3.18.255.247
Name:   test.com
Address: 34.224.149.186

It does seem to produce the correct results if I use non-interactive mode.

I am a bit confused as to why that happens. My understanding was that both modes use the same underlying DNS querying mechanism.

Not sure if you have time to explain it a bit more?

When entering interactive mode like you did in the OP, you entered nslookup on the > prompt.
But nslookup is not a valid interactive command.
Check the man page with below one to check which are (the INTERACTIVE COMMANDS section):

man nslookup

What happened was that you instructed nslookup to lookup the nslookup domainname against DNS server test.com.
Similar as below non-interactively:

$ nslookup nslookup test.com
;; communications error to 3.18.255.247#53: timed out
;; communications error to 3.18.255.247#53: timed out
;; communications error to 3.18.255.247#53: timed out
;; communications error to 34.224.149.186#53: timed out
;; no servers could be reached

Or below:

$ dig nslookup @test.com
;; communications error to 3.18.255.247#53: timed out
;; communications error to 3.18.255.247#53: timed out
;; communications error to 3.18.255.247#53: timed out
;; communications error to 34.224.149.186#53: timed out

; <<>> DiG 9.18.24-1-Debian <<>> nslookup @test.com
;; global options: +cmd
;; no servers could be reached

There is no DNS server listening (ports 53 UDP/TCP) on the resolved IP 3.18.255.247:

$ sudo nmap -sS pi.hole
Starting Nmap 7.93 ( https://nmap.org ) at 2025-01-17 21:23 CET
Nmap scan report for pi.hole (10.0.0.2)
Host is up (0.0052s latency).
rDNS record for 10.0.0.2: ph5a.home.dehakkelaar.nl
Not shown: 997 closed tcp ports (reset)
PORT   STATE SERVICE
22/tcp open  ssh
53/tcp open  domain
80/tcp open  http
MAC Address: B8:27:EB:xx:xx:xx (Raspberry Pi Foundation)

Nmap done: 1 IP address (1 host up) scanned in 0.45 seconds
$ sudo nmap -sS 3.18.255.247
Starting Nmap 7.93 ( https://nmap.org ) at 2025-01-17 21:25 CET
Nmap scan report for ec2-3-18-255-247.us-east-2.compute.amazonaws.com (3.18.255.247)
Host is up (0.11s latency).
All 1000 scanned ports on ec2-3-18-255-247.us-east-2.compute.amazonaws.com (3.18.255.247) are in ignored states.
Not shown: 1000 filtered tcp ports (no-response)

Nmap done: 1 IP address (1 host up) scanned in 11.33 seconds

To get a better understanding what you can do with nslookup, I'd suggest to check out that man page!
Those man pages are a treasure of information:

man man

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.