Can't directly forward DNS server to clients

Hello everybody. Running an OpenWrt server as the main router in my house on 192.168.1.1. Running a pi-hole adblock server on a Raspberry Pi on 192.168.1.53.

I set up OpenWrt to use pi-hole on the Raspberry Pi as its DNS server. That worked; ads are blocked properly on all connected devices.

I want to have more insight in domain blocking on pi-hole. Right now, all blocked domain requests seem to come from 'gateway', which is obviously my router. I set up 192.168.1.13 to use a static IP and specified the DNS server directly, so that device gets specified properly in pi-hole.

I want to have more insight in what domain requests are blocked from which devices. I think that the problem right now is that OpenWrt does not explicitly send the DNS server IP address to the device:

screenshot-21-08-48

I know that it's possible to have the pi-hole IP address listed here for DHCP-connected devices, but I forgot on how to do so. How can I get that done? This will surely fix the problem I'm encountering.

Use dhcp option 6.

https://openwrt.org/docs/guide-user/base-system/dhcp

1 Like

@mikma

Thanks; adding

list dhcp_option '6,192.168.1.53'

to

config dhcp 'lan'

in

/etc/config/dhcp

worked.

If your problem is solved, please consider marking this topic as [Solved]. (Click the pencil behind the topic...)

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