I have a problem with Fritzbox 7560 and OpenWrt (Fritzbox 4040) and Pihole. The Fritzbox has static routes to the Openwrt router, in the Openwrt there are 2 subnets, one for Lan and one for Wifi. The clients in the subnets get the DNS IP from the Pihole via DHCP option 6.
This also works, but Pihole cannot resolve the clients, the WAN interface of Openwrt is always shown in the Pihole.
Fritzbox 192.168.11.1 (connection to provider)
Pihole 192.168.11.100 (2 upstream servers via unbound)
CIDR is 192.168.0.0/16 Notation, Ip of the DHCP is 192.168.11.1 and the Domain is Motorbike in Pihole
Fritzbox static route 192.168.150.0 to 192.168.11.50 Openwrt Wanport
Fritzbox static route 192.168.200.0 to 192.168.11.50 Openwrt Wanport
Openwrt Wanport 192.168.11.50
Two subnets in Openwrt
Lan 192.168.200.1 (DHCP Option: 6,192.168.11.100)
Wifi 192.168.150.1 (DHCP Option: 6,192.168.11.100)
Internet only works but the clients are not displayed in the Pihole, only "motorbike.fritz.box". Motorbike is the openwrt.
I suspect that it is due to the firewall in Openwrt that the clients are not passed through. What do I have to do that the Clients name are displayed in Pihole?
It is called NAT, like normal people connect their home full of smart toasters to the internet.
Is there any gain isolating wifi and eth in different subnets?
Use DHCP option 6 to advertise the PiHole's IP address as the DNS server. Then add a firewall rule that accepts:
TCP and UDP destination port port 53
source < other networks/zones >
destination zone < that contains the PiHole >
destination address < of the pihole> .
On the pihole, you then need to "permit all origins" so that it will accept traffic from different subnets.
This doesn't guarantee that all client devices will use the PiHole, since the devices themselves might use hardcoded or user-override values for the DNS server. You can also hijack DNS to prevent them from successfuly using other DNS servers, but that only works for traditional DNS (not DoH/DoT).
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall
The config raises a bunch of questions, but also I see a few things that need to be addressed:
Is the gateway of 192.168.11.50 correct on the upstream network? It is inconsistent with the wlan network which uses 192.168.11.1.
Typically, the gateway is omitted since it is upstream. Are both networks functioning properly?
Remove the boradcast line. It's not necessary as it is automatically calculated.
Same comments as above.
Remove the device line. the radios should never be included in this file.
Remove the device line. Only the network should be there.
Same here, the device line should not be here.
If you have masquerading enabled here, that will cause all clients on this router's lan and wlan network to appear as the router's wan address. Disable this (but keep in mind, the static routes upstream must be working properly).
I see a bunch of rules that should be removed (unless there is some specific reason they are there; if so, please explain):
I've made all the changes and it looks like it's all working correctly. Thank you very much!!!
In Wlan i set the Gateway also to 192.168.11.50
I had created some rules for testing, but they didn't help and they were also switched off and now deleted.
One more question: If I disable masquerading, will the firewall still work properly?