Pi-hole and ddwrt settings

A post was split to a new topic: Individual clients not shown using DD-WRT router

This worked great for me thank you! Many hours of frustration solved :slight_smile:

Trying to document all the setup I did recently so I can reproduce it later lol.
In your guide I realized I actually missed a step, I am doing option 2 and realized I never set the upstream DNS in PiHole to point to my router, I still have quad 9 selected in there. Seems to be working without this and I see you commented above that you had found you needed this to get all three things you were after working.
Am I missing something that I am just not seeing not work - or perhaps that step is no longer needed? Just trying to figure out if I am simply not seeing something.

@bizarro252 - Are you talking about the official guide? What I wrote there was required for me to get those 3 things working. I haven't changed it since.

I think the most general and “best” method on DD-WRT is to:
Services>services>Additional DNSMasq Options:

I had this settings in my DNSMasq for quite sometime now. Is it the same as 'dhcp-option=6'?


1 Like

@graysky2 yes the one from here :How do I configure my devices to use Pi-hole as their DNS server?

However, I think I may have just not been paying close enough attention, I did not see above that the actual client hostnames were shown, not just their IPs! I will give that last step a shot and see if that pulls those in instead of just the IPs like I have now - thanks!

Correct, it is the same thing.
Thanks everyone for this thread! It saved my evening!

This doesn't work if you use vap on ddwrt though.


in that setup do you still have local dns resolving? So this: address=/test.lan/
It isnt working for me

Yes, it is resolving local dns correctly for me.

Hello and thank you for your tutorial could i ask for some extra clarification.
To see my current settings please see here
My confusion or lack of network knowledge is the loop aspect.
If i follow your guide and remove Cloudflare in the PI-Hole settings my system breaks i get unknown status or clients. Also, how do I specify Cloudflare or Google or any DNS provider if you say remove it and point to just your PiHole IP in your router this seems a loop.
My requirements if possible are as follows

  1. Select the DNS provider of my choice and if so how or where do i set that?
  2. How can I show the client name in PiHole not just the IP address?
  3. Slightly more complex I want to set up the run 2 Pi-hole servers in HA (High Availability) in DD-WRT details here

Cheers in advance

My setup is a bit different but had a lot of headaches and do not know how to address it properly due to the limited networking experience I have.

My setup is as follows:

  1. My Internet router: IP it has port forwarding for Plex

  2. DDWRT router set in "Client Mode" (or WISP as also called): IP it has port forwarding for Plex but also the following options under Services -> dnsmasq


All other options are defaults as per the wiki guide I followed to setup the router as Client Mode

  1. My home router: An ASUS RT-ACRH13 with an IP

It has port forwarding, and has set Pihole as only DHCP DNS server. I also set a custom domain name to it, after following this guide: Configuring the Pi Hole with Asus Routers (Merlin or John's Fork) | Carlos Felicio

  1. A Docker Pihole container in Windows. All defaults, except for Shared Memory size which I set to 1.5G and with custom upstream DNS (I used CleanBrowsing)

I also set Conditional Forwarding . This points to my Asus router (IP:

The things or problems I faced are several let me list some of them:

  1. A unusual amount queries answered (up to ~2000) . This happened prior to the "Conditional forwarding" in Pihole, but now it is below ~1000 which I understand is "normal"

  2. I am unable to nslookup microsoft.com or any domain in Android's Termux app. I receive a connection timed out error

  3. My Pihole goes loopty loop after several days querying same domain over and over again. When this happens, any Pihole blocking capabilities go off (no blocking at all)

I think I have determined this one and I think it was my Android phone running with Blokada and thus creating these loops when my phone is connected to my local network. I would have to investigate further, as my Pihole does not log any client other than localhost and which is problem #4

  1. Pihole not logging any client other than localhost or

To summarize my network setup should go as follows:

A device connected to the network -> local router -> Pihole -> DDWRT router -> Internet router

Any help or guidance is greatly appreciated.

Thank you!

I had similar problems. This is how I fixed it without compromising on my requirements.

Mine goes device > Pihole > DD-WRT router so it's a bit simpler.

Thank you. I came a similar post where in DDWRT dnsmasq settings apply some of the parameters you listed with the exception of dhcp-option=option:dns-server.

What difference does it have versus dhcp-option=6,IP address ?

I will try connecting my Pihole to the DDWRT router and set those parameters if I still have this problem. One thing I forgot to mention is that I had static routing in my Asus router blocking Google DNS servers: /

Not sure if it would make any difference, but I removed them for now, and see if it makes any difference

It's literally the same thing. 6 is the dhcp-option for dnsmasq which means dns-server.

I just like to use full commands if I don't know them well enough to remember specifically what the shortcuts are for as it makes reading them immediately easier at a later date and helps me learn what the shortcuts actually do.

Except for ffmpeg. If you ever use that on the command line for video editing, you might as well just print out the entire website for it and keep it handy.

I'm using an old version of dd-wrt and never got the dhcp-option=6, option working.
But I got it working by following this topic.

What I did was unchecking "Use DNSMasq for DNS" (under Setup) and "Local DNS" (under Services).
Then I put the pihole IP under Network Setup -> Local DNS, and not under Static DNS 1.

Many thanks for this simple and effective solution. Put in the settings:

dhcp-option=6, <<< my pihole LAN IP

Saved and rebooted router. Worked OOTB! Brill.

1 Like

ahahha im surprised that 5 years after i opened the initial thread, moved to another country, made family, changed jobs...i'm still getting notifications ! Moral of the story? People grow old but a piece of software made with love stays forever ! I'm still using it btw in a slightly different setup. Two pihole instances in HA with gravity sync.One instance runs in docker in my nuc linux server and the other instance on a dietpi raspi along with some Ubiquiti hardware instead of the legendary Linksys router. Long live pihole !


This solution works great -- thank you!
I want to follow this approach but add a second pi-hole as failover in case the first one fails.

Was running my initial pi-hole instance in a container on my NAS and occasionally had issues with it when I was updating and rebooting it where my home network went down and the famsquad wasn't too happy.

Anyhow -- I saw elsewhere the recommendation that you do the following under DNSMaxq Options:
dchp-option=6,first pihole IP address,backup pihole IP address

Is this the best way to do it?

Most likely below also works and is independent of what IP's are configured for the host:


pi@ph5b:~ $ man dnsmasq
       -O,     --dhcp-option=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-en‐
       The  special address is taken to mean "the address of the
       machine running dnsmasq".
1 Like