What's new

DHCP - DNS Server per Client

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

atlantex

Occasional Visitor
Hi there,

I got 2 instances of pihole running, with different block lists. I want to set some clients to the first pihole and another clients to the second one. When I use the DNSFilter option then it works but in pihole I always see the Asus router IP as the request system. I want to see the real client ip, therefor the only way I see is to set DHCP options in order to control which clients gets which dns ip.

Has anyone experience how to do this with an Asus router?

thx

atlantex
 
You'd have to use Merlin's firmware and a custom dnsmasq file.

Off the top of my head I'd suggest you experiment with something like this:
Code:
dhcp-option=tag:pihole1,option:dns-server,192.168.1.10
dhcp-option=tag:pihole2,option:dns-server,192.168.1.11

dhcp-host=11:22:33:44:55:11,set:pihole1
dhcp-host=11:22:33:44:55:22,set:pihole1
dhcp-host=11:22:33:44:55:33,set:pihole1
dhcp-host=11:22:33:44:55:44,set:pihole1

dhcp-host=11:22:33:44:55:55,set:pihole2
dhcp-host=11:22:33:44:55:66,set:pihole2
dhcp-host=11:22:33:44:55:77,set:pihole2
dhcp-host=11:22:33:44:55:88,set:pihole2

If the two PiHoles are the only DNS servers on your network it would be less cumbersome to set the router's LAN DNS server to the address of the PiHole with the most clients. Then you only need to create custom entries for the other PiHole's clients.
 
DNS parameter has been available on the DHCP reservation page for quite some time already, just enter it there for each client.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top