ASUS routers (newer firmware): using WAN instead of LAN DNS settings to configure Pihole

I just stumbled on this Support FAQ from Asus: https://www.asus.com/support/FAQ/1046062

Again, this is from Asus, not the Pihole team. And this applies to the stock Asus firmware, not Merlin. Basically what it says is:

  • If you have firmware >= 3.0.0.4.386.45898: configure the Pihole connection using the WAN DNS settings.
  • If you have firmware < 3.0.0.4.386.45898: configure the Pihole connection using the LAN DNS settings.

Further down on the FAQ it states:

  1. What's the difference of setting up Pi-hole DNS in WAN and in LAN of asus router?

It actually doesn't matter for the Asus routers. The functions are the same for the connected clients. The only thing needs to be checked is the Firmware Version of your router due to it will decide if the Pi-hole DNS server should be set in the LAN setting page or WAN setting page. You could only find the difference in the Pi-hole console > logs. If you want to know more about that, please kindly contact to the provider of Pi-hole.

I'm running on Merlin so I can't test this out. Curious if anyone has tried this and what the results were, if any.

Posted Dec 17, 2021, 11:22 PM UTC

7622
intellimac•

There is a difference in setting the DNS in the LAN settings vs WAN. While the FAQ is right in that there’s not “functional difference” in that setting either gets your devices protected behind the Pi-Hole, if you use the Pi-Hole web interfaces to see what devices are requesting what domains, there’s a difference based on what you set on the router:

Set only in WAN:

  • all requests in the pihole web interface will appear to come from your router only
  • this is because all devices DNS would default to using your router as the DNS server (LAN setting), which get sent to the pi-hole
  • this essentially means setting WAN only you lose visibility of which devices in your network are making which requests

Set only in LAN:

  • all devices talk directly to your pi-hole for DNS requests
  • pihole web interface will show requests per device
  • requests your router itself needs to make (NTP requests, calls to Asus for firmware check, calls to Asus/TrendMicro for intrusion detection and other logging) will go to the ISP default DNS if custom WAN dns is not set and not be visible in pihole web interface

I have setup the pihole in both LAN and WAN settings so that you are able to track both all devices on the network as well as see the requests the router itself is making. Works well (except for a couple firmware versions ago where setting the WAN to point to your pihole would break internet connectivity for the entire network), so be sure you’re on the latest available firmware version.

19
[deleted]•

[deleted]

1
mehigh•

Hm. I use my Pi-hile on my Rpi3 as my DHCP and my Dns server. In the config of my Asus router, in the LAN config I point to the IP of my Pi-hole. In the WAN config of my Asus router I point to 8.8.8.8

1
jostyee•

What’s the benefit to use Pi-hole as DHCP server other than the router?

1
alxfrizzy421•

It's not really so much a benefit as it is a mitigation, since many routers won't let you configure the DHCP settings and often times they let devices bypass the pi-hole. I had to do this for my home network

2
tklat•

Are you also using the "conditional forwarding" option?

1
deathbyburk123•

I lost internet when I changed the wan

3
cptnoblivious71•

That's because recent Asus firmware changed the behaviour, and you can't point inside.

​

I believe they acknowledged this change and will revert it in a future version.

​

Note also that with the stock firmware, the router _automatically_ adds itself as a DNS server to the LAN DNS servers, which leads to problems with pihole. In Merlin the setting for this is exposed and can be turned off.

3
[deleted]•

[deleted]

1
Matt17000•

Same for me

1
jackoff_dipshit•

It should be noted that this does not apply if you're using the pi-hole as your DHCP server, in which case you shouldn't have DNS configured in LAN or WAN on the router.

3
4x4taco•

Your WAN will always need some sort of DNS entries to rely on in order to find "outside" and perform a time sync. I've always set my WAN DNS to a non-pihole DNS like Quad9, OpenDNS or your own ISP DNS.

5
laplongejr•

I think his point was that with DHCP!Pihole, you don't need to change the defaults?

1
4x4taco•

Even with Pihole running your DHCP... your WAN should still have external DNS entries.

2
laplongejr•

Yes... but wouldn't a good router be configured by default to use those?

1
xehts•

I was wondering what was going on. This helps a lot. Thank you.

3
havenrogue•

No mention, by Asus, of the Conditional Forwarding issue that can arise if one has it enabled in the PiHole and uses PiHole in the router WAN fields. It can setup a situation where, with Conditional Forwarding enabled, a loop develops that floods the local network as the PiHole and router keep routing device lookups back and forth to each other. Some older discussion on this issue here and here.

3
kthepropogation•

I got the Asus WiFi 6 mesh system, and I've really liked it, aside from the configuration limitations.

The thing that necessitates this is that, when configuring the DHCP DNS setting, it injects itself as a second address. Which effectively means that it is not possible to control the DHCP configuration of the router.

I wound up disabling DHCP and running DHCP off of the Pi-Hole. I recommend that route - a lot less heartache.

2
deathbyburk123•

Just changed it. Will update

1
[deleted]•

Discovered this lately, it should not even use wan dns ever at all only what is set in dhcp or ipv6, those dns settings should honestly be moved as well to dhcp and ipv6 rather, while wan checks if it has internet another way, i went to merlin for now cos i can make it advertise pihole dns instead of routers own ip that way via ipv6 since i have dhcp turned off

1
Heclalava•

I run the Merlin Koolshare firmware on my router, the VPN client in my software centre has DNS hijacking so it forces all devices to use the DNS settings in the VPN, so I had to use the dnsmasq option (dhcp-option=6,<Pi-Hole IP addres>) in the VPN DNS settings to get all my devices to use Pi-Hole.

1
roowaa•

After doing a firmware update a few months ago, I couldn't access my pi anymore. Nothing, no pings, no webserver. It was set as the DNS-server in the WAN and LAN setting prior to that and worked fine.

I had to remove the Pi-hole from the WAN-setting to access it again. My Pi-hole is now only configured in the LAN->DHCP-Server setting. Everything seems to work fine again.

Just leaving this here in case anyone loses contact to his pi after configuring it the WAN setting.

1
lordfly911•

Before I switched to an Unifi UDM as my router, I had a Netgear router. I ended up flashing DD-WRT on it because it wouldn't give me any control of the DNS settings. In my situation I use my router as my DHCP and both WAN and LAN are set to my PiHoles (I have two).

The UDM was a phenomenal upgrade BTW.

1