Use router as DNS for pihole?

Hi All,
I've setup pihole and configured it to use only my router as dns (the router also provides dhcp). The client I tested cant resolve any internet addresses. Is this even possible? I want to maintain as much configuration on the router as I'm using dnscrypt etc on ddwrt. The theory is:

Client 192.168.1.xxx, using assigned DHCP IP address, gateway [PIHOLE IP], DNS [PIHOLE IP] -----> PIhole [configured to use router IP 192.168.1.1 as custom dns] -----> Router using DNSCRYPT

The PIHOLE can resolve DNS fine when I login via ssh but the clients cant resolve any internet address.

Am I missing something on why this wont work?

edit - debug token - mo02c6d3h6

Thanks!

I also use my router's DHCP server and have also set my router as only upstream-DNS-server in Pi-hole. This configuration works fine for me.

Please check the Gateway-Setting on your client. It should point to the router, but not to Pi-Hole.

From your log it looks like Pi-hole is getting back answers from the router. Do you see queries from your client in the query log?

Thanks but I tried that - no dns resolution on the client. IP is working fine for machines on the local network on the client. I think the difference between what you describe (using DHCP) is in addition I'm telling pihole to use the router as it's DNS source in custom DNS which should then go get DNS using the routers DNS settings, using dnscrypt and the custom DNS i have setup on the router (which btw is working well).

nothing in the pihole log from clients that I can see. I have a default raspbian implementation and also a new install of pihole - should I be applying some iptables rules to open some ports to the clients? I haven't turned on any firewall

You shouldn't have to manually configure a firewall as long as you haven't set up one yet. DNS requires port 53 though. If you run pihole -t and try to visit some addresses on the client, do you see any queries coming from the client?

nothing coming in from the client at all. It's like pihole is not listening for DNS at all. A tracert on the client:

C:\Users#####>tracert www.google.com
Unable to resolve target system name www.google.com.

I have a second network adaptor on the pi for wifi - could this be causing an issue with the pihole listening?

Ok - checked using nmap from another server and it looks ok:

Starting Nmap 6.47 ( http://nmap.org ) at 2017-12-21 18:36 GMT
Nmap scan report for 192.168.1.165
Host is up (0.0039s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
80/tcp open http
MAC Address: (Raspberry Pi Foundation)

It may be that you have two interfaces, yes. Check the Pi-hole settings page and tell it to listen to all local queries.

ok thanks - but how do I do that? there's no option I can see on the settings page to add anything more than the eth0 interface which is already there.

Under DNS -> Interface listening behavior -> First option

Thanks!! did it - I don't want it to listen on the wifi interface, I just want to to listen on the ethernet interface, however that got it working as it's now blocking adds and resolving dns (no idea why this worked?).

off-topic ---> One other thing I did once this was confirmed working on the ddwrt router was disable dnsmasq for dns only (left it on for dhcp). This means name resolution for local machines is working as well ;o)

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