piHole with Netgear R6400 using Tomato

Hey fellas,

I just wanted to say thanks for everybody's hard work, the install went flawless and I just love it. The only problem is I would love it more if it was filtering my traffic....

I logged into my router which is running Tomato and set a static DNS to where my piHole lives (192.168.1.50) and removed the backup DNS (that was set to 1.1.1.1). As soon as I save the settings I start getting lookup errors.

Now my network is kind of strange... I have a NAT from my cable modem into my apartment so I have to set that into bridged mode. From there I have to set my R6400 into gateway mode for anything to work. I think there are additional settings I should be changing but I figure instead of just randomly doing "what should work" I would pick the brains of some of you guys and see.

I dont want to but I feel like it may be easier to switch back to the netgear firmware. I would put my money on somebody has a Tomato router with piHole running...

Googling around I found some stuff that may help, I will post them here in case somebody runs into the same issue I have:

  • Additional DNSMasq Options:
    dhcp-option=6,[pi hole IP]
  • DISABLE dns rebind protection
  • Setup dhcp forwarding

Try setup network to assign Pi-hole's IP address for DNS to the clients through DHCP like described in below FAQ instead of configuring the upstream WAN or Internet DNS servers on the router:

If thats done, you can test connectivity on a Linux/Windows/Mac client PC with below one:

nslookup pi.hole <PIHOLE_IP_ADDRESS>

If that works, below one should resemble on a client if you leave out the "<PIHOLE_IP_ADDRESS>" bit:

nslookup pi.hole

If that works, you can try access the admin page in a browser:

http://pi.hole/admin

Thats what I have done, it fails. I dont follow why you wouldnt want to do it statically. Everytime you add a new device you need to edit, if a stranger brings in a device, you need to edit. A lot of ads have payloads I dont want in my network, which is why I am trying to statically set it this way...

I dont get it.
Every time a device connects to the network the DHCP way,
it should automatically receive all the IP details through DHCP like its IP address,
the gateway or default route, subnet mask and most importantly,
the DNS server (preferably Pi-hole's IP).
No manual labor involved.
You can even create static reservation in the web GUI if use Pi-hole as a DHCP server.

Yeah, I wasnt able to pass dhcp or dns to the pi.

The Pi-hole system doesnt need DHCP as it should already be configured with a static IP address (not acquired through DHCP).
It can however function as a DHCP server to replace the one running on your router if for example your router doesnt allow you to set a DNS server in the "DHCP server" section.
For that have a read here:

Alright lets back up here... I think we are both confused.

I told the my home router to not use itself as the dhcp, I gave it the pi-hole address and told it to forward there, the same with dns. My understanding is you wanted me to tell each device to use the pi for dhcp and dns instead of the router (even if the router was setup).

i followed that guide to use my pi for my dhcp and dns, as soon as I remove functionality from my home router, nothing can get out. I didnt let it fail long enough to see if my boxes would give me an invalid ip.

Try run the nslookup commands I posted before on a client PC as well as on the Pi-hole box and post results here?
That will at least test connectivity and maybe the router is blocking something.

Will do, I am leaving class in about 20 minutes....

For me its :zzz::zzz::zzz: time.
Good luck.

Well I finally got it working, but its showing its forwarding a lot of traffic to 1.1.1.1 (my "down wind" DNS) which the more I think about it the more I think its alright.

I need to beef up my "hole" list, 122k hits isnt enough. I have some issues that I will research, I dont wan to post them in a random thread (this one).

I should also mention that the solution is / was that Tomato has hidden DHCP services within the router. First I disabled the main DHCP, nothing happened. I think I went down to networking or routing (for sure in the "advanced" tab) and saw that wifi still had some statements in it about dhcp, I had to edit those and remove the settings then reload the router. After that, bam, routing traffic through the pi.

Like in below examples:

pi@noads:~ $ nslookup pi.hole 10.0.0.2
Server:         10.0.0.2
Address:        10.0.0.2#53

Name:   pi.hole
Address: 10.0.0.2

C:\>nslookup pi.hole 10.0.0.2
Server:  noads.dehakkelaar.nl
Address:  10.0.0.2

Name:    pi.hole
Address:  10.0.0.2

Look two posts up. I hit submit before I thought out a good response. I flagged it as a solution and confirmed it with the nslookup you suggested.

Yeah our postings crossed paths.

1 Like

Thanks for your help.

1 Like

Ohw one remark, its only the DNS queries that go through PI-hole.
Normal network traffic goes throught the regular routes (your router if needs to go to internet).

Maybe that is one of my issues. I tested every device I could find in my place (couple different switches, iphone, android, two laptops, two smart tvs, and some more) and it seems like the android is the only one that is running into issues. It will load websites fine but it thinks the wifi has no internet connection when it clearly does from all of my other 8 devices (or so).

When run below ones in an Android terminal window, it will display the DNS servers that its using:

getprop net.dns1

getprop net.dns2

getprop net.dns3

Make sure you disconnect the Android client from network and reconnect so it can receive fresh DHCP details.
Or maybe even reboot the Android client.

I rebooted the device, tried connecting to the 2.4ghz instead of 5, all three ideas came with the same result.

I am at work and then class so I wont be home for ~8 more hours.