LAN-to-WAN - Second router dns question OpenWRT (WR2100)

Hi guys!

I need help to fix my problem with Pi-Hole DNS settings on my second router (OpenWRT)

I have 2 routers connected together. OS is Ubuntu.

Main router is a FritzBox.
Second router is a WR2100 (OpenWRT)

My 'host machine' is using first router with Pi-Hole enabled and it's working great on the FritzBox router.

Enabled: 'dns-rebind-protection'

/etc/dnsmasq.d/01-pihole.conf

Setting on FritzBox router:
rebind-domain-ok=pi.hole

On both machines Pi-Hole DHCP is off.

My VM machine is using second router.

Both machines, only local.

On my 'VM machine' with enabled Pi-Hole, internet is only working, when on WAN section (second router) DNS 1.1.1.1 (example) is set.

Once I set WAN DNS (second router) to my 'Pi-Hole ip' which I have set in SetupVars.conf my name resolution does not work anymore.

"LAN TO WAN connection" is working when I set DNS setting at WAN section on my second router to example 1.1.1.1.

Then internet/name resolution is working.

On my second router 'dns-rebind-protection' is enabled.

Do I need 'dns-rebind-protection' on second router enabled?

My 'host machine' and my 'VM machine' have the same settings only the ips are set differently.

It must be the second router for dns settings I guess.

DNS-settings router Pi-Hole:
On my main router:
Internet DNS server is set to: Pi-Hole ip (ipv4) - Host machine
DHCP Local DNS server is set to: Pi-Hole ip (ipv4) - Host machine

On my second router:
WAN DNS server when set to: Pi-Hole ip (ipv4) - vm machine = internet/name resolution not working
DHCP Local DNS server is set to: Pi-Hole ip (ipv4) - vm machine = internet/name resolution not working

WAN DNS server when set to: 1.1.1.1 - vm machine = internet/name resolution is working

Does anyone know what I have to set under OpenWRT (dns) in the second router?

I have now moved to LAN-to-LAN.

Disabled DHCP on second router. Set second router ip for LAN.

Added main router ip (gateway) in: "/etc/dhcpcd.conf" (VM machine)

interface eth0
static ip_address=pi.hole-ip-here/24
static routers=main-router-ip-here
static domain_name_servers=127.0.0.1

Edited resolv.conf:
from:

search pi.hole
domain pi.hole
nameserver 127.0.0.1

to:

search fritz.box
domain fritz.box
nameserver 127.0.0.1

Removed from: "/etc/dnsmasq.d/01-pihole.conf" (VM machine)
rebind-domain-ok=pi.hole

Rebooted and now it works on my VM machine.

SOLVED! :slight_smile:

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