DDWRT router not replying to reverse DNS lookups (PTR)

Expected Behavior:

Router: Archer C8 (DD-WRT v3.0-r50146 std 09/10/22) >> DHCP server
Pihole: Pihole for windows (GitHub - DesktopECHO/Pi-Hole-for-WSL1: Ad-blocking DNS server for Windows • Unbound pre-configured • Deployment ready in minutes • Does not require hypervisor/docker) v5.12.2 (conditional forwarder.)

Conditional forwarding: pihole wants to know the hostname of an IP address, pihole sends a reverese DNS lookup (PTR record), DHCP server (router) replies with a hostname.

Actual Behaviour:

Pihole sends the PTR record to the router, the router doesnt reply with a hostname.

No replies (N/A):

Pihole settings:

ddwrt settings:


to be routed through pihole*

I tried setting up the local domain to 'lan' or 'local' and tried to disable "forced DNS direction" and didnt work. I am not sure what DDWRT setting would make the DHCP server reply to the request. Sorry if this is more suitable for DDWRT forums

I don't use DDWRT, but have you tried to put the Pi-hole IP on the "Static DNS 1", under DHCP?

Note that Pi-hole for Windows is neither developed, endorsed or supported by the original Pi-hole team. Any issues with that deployment should be addressed by the respective maintainers of Pi-hole for Windows.

It would seem that your router doesn't supply an answer.

You may verify this by forcing a (reverse) lookup through your router at 192.168.1.1 , e.g.

nslookup 192.168.1.163 192.168.1.1
nslookup <some.host> 192.168.1.1

Substitute <some.host> by the expected hostname of your 192.168.1.163.

Please provide the full output of those statements, including the commands themselves, preferably as text.

rdwebdesign. I have tried putting piHole IP under static DNS but no avail. The only way I can get the hostnames to appear momentarily and the forwarded PTR (from pihole to router) to work is when I enable 'DNSmasq' in ddwrt. HOWEVER, when dnsmasq is enabled on the router, the router acts as the dns resolver and starts sending all other clients' requests to pihole under the router's IP. So, all my requests appear as if they came from the router.

Bucking_Horn
I think pihole is working fine (sorry, I shouldve probably posted this in ddwrt forums). For the ns lookup, I hope I am doing this correctly:

nslookup 192.168.1.167 192.168.1.1

C:\Users\Administrator>nslookup 192.168.1.167 192.168.1.1
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  192.168.1.1

nslookup SF315-52 192.168.1.1

C:\Users\Administrator>nslookup SF315-52 192.168.1.1
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  192.168.1.1

Performing google dns lookup and reverse dns:
image

Your nslookup results confirm that your router does not provide DNS replies.

For local host name lookups and private range IP reverse lookups, your router's DNS server should have replied correctly if it knew the answer, or NXDOMAIN if it didn't.

A time-out as you observe it may suggest inability of your router's DNS server to contact its upstream (though it shouldn't have forwarded any of your requests upstream if it had known the answer), or perhaps a DNS loop. You could have closed such a loop by using your router as one of your Pi-hole's upstreams, or by enabling Pi-hole's Conditional Forwarding to your router.

Also consider that DDWRT has got a Forced DNS redirection option that could close a loop:

https://wiki.dd-wrt.com/wiki/index.php/Additional_DNSMasq_Options

I found the solution. Following instructions from this thread, I set the following DNSmasq options on the ddwrt router:

server=piholeIP
cache-size=2048
log-async=5
#strict-order
dhcp-option = 6,PiholeIP

On the pihole, I kept these settings as usual


image

What solved the problem is to enable the DNSmasq ("use DNSmasq for DNS") on the dd-wrt. However, when that's enabled, the forced DNS direction doesn't work.

So, every month or so, I will enable DNSmasq on the router main page, let pihole get the hostnames for all clients, then disable "use DNSmasq for DNS". I'm happy having the list update once month. I don't have that many new clients anyway.

Thanks!

If that's the case, you could consider to add the respective Local DNS Records for your clients to Pi-hole. That's a one-time effort, provided your router would be configured to assign a fixed IP to each of your clients.

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