[Solved] No names in pihole of devices of network conected to openwrt [HELP] [Solved]

hi pals I am trying to understand this pihole server with unbound in my proxmox and I have already mounted my 1st test and it has worked for me as it says, very well

so i want to use pihole for more than ads blocking, i wan to use it as my local dns server

Now I have just installed another instance one that will be the one I use throughout my network through my openwrt router, as a local dns server.

but despite the fact that I configure the Conditional forwarding in DNS of setting of pihole, I do not get the names of the devices of my network, I wish someone could tell me what I am doing wrong and how can i fix it thanks

I put some captures of the 1st pihole with some devices added manually and screenshots of my 2nd pihole (the final one) in addition to the configuration of my dns server config´s openwrt router

I must say that when I added the ip of my local dns server (pihole ip's) in NETWORKS > DHCP and DNS > dns forwards, the openwrt didnt take the configuration and the network didnt see any change.

only when I add the ip of my local dns server in INTERFACES > WAN > EDIT > ADVANCE CONFIGURATION > Use custom DNS servers, the openwrt does take the configuration and all the changes in the network devices are seen.


uci add_list dhcp.lan.dhcp_option='6,'
uci commit
/etc/init.d/dnsmasq restart

Or go to Network / Interfaces / LAN / DHCP Server / Advanced Settings -> DHCP-Options and add 6, in the box.

That option makes dnsmasq tell DHCP clients to send their DNS queries directly to the Pi-Hole IP.


@dave14305 beat me to it...

however, the explanation for what you were seeing is this:

  • all of the DNS lookups to the Pihole were actually originating from the OpenWrt router itself, on behalf of the clients behind it. In other words, the hosts on your network would ask the router for name resolution and the router will then ask the PiHole. By setting option 6, you ensure that the hosts directly ask the pihole for DNS.

Pihole has a fully functioning DHCP service, so why aren't you using pihole for dhcp and dns?

@stmtpr - are you a fan of the department of the redundancy department? :laughing:

emphasis added...

Did you mean to ask why the OP is using OpenWrt as the DHCP server when the PiHole could do this task? Fair question, but it's not uncommon for users to prefer the router as the DHCP server even if they offload the DNS.

1 Like

ok i added

i will notice if something change and i will tell it here

looks good. Keep in mind that the hosts on your network need to renew their DHCP leases before you will see them making direct DNS requests to the pinhole.

yeeah it work thanks bro!now i got my recursive DNS server in-sync with my 2nd bakcup dns local server with gravity sync and statistics all working smoothly

this therad can be closed thanks!

Awesome! Glad it is working!

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

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