Assign specific DNS server to a specific host using Dnsmasq?

Started by sos_opnsense, May 17, 2026, 08:03:50 AM

Previous topic - Next topic
I'm sure under the previous ISC DHCP server you could assign specific DNS servers to specific hosts.

I'm running OPNsense 26.1.8 and Dnsmasq as the DHCP server (Unbound and Technitium as my main DNS servers), but I'd like to assign a specific, separate DNS server to my Nintendo Switch 2 and there doesn't seem to be an easy way to do this under Dnsmasq (or KEA).

Am I missing something obvious?
Alder Lake N100
4 x 2.5GbE Intel NIC
16GB, 500GB nvme
OPNsense 26.1.8_5-amd64

In dnsmasq: Create a new DHCP Tag, set it inside the host reservation of the Switch. Then create a DHCP option with the DNS server you want and the same Tag assigned.

In KEA: Create a new dns server option and set it in a reservation.
Hardware:
DEC740

Thanks - I couldn't figure out how get it working / where to enter what in dnsmasq - too confusing for me!

But did get it working in KEA, thanks. Actually, in KEA you can directly set the "DNS servers" by editing the particular reservation - no need to create a new dns server option (although that's helpful to know as an additional tool/choice!). Not sure how I missed that the first time I looked.

Unfortunately it didn't solve the reason for my efforts - trying to get the Switch 2 to connect to a custom minecraft server unstead of the limited "approved" ones (https://github.com/Pugmatt/BedrockConnect). But at least I now know how to set a DNS for any given client :)

And I'd been oscillating between dnsmasq and KEA as my DHCP (I use technitium and unbound as my network DNS servers), and had been using dnsmasq....but will run with KEA for a bit to see how it stacks up now that it's becoming more mature, and I don't need the dns features of dnsmasq.

EDIT: It's a bit strange - sometimes the "DNS Servers" field appears in the GUI under "KEA DHCP > Kea DHCPv4 > Reservations > Edit", and sometimes it's missing. I haven't worked out what triggers it to appear / disappear - but fascinated if someone can!
Alder Lake N100
4 x 2.5GbE Intel NIC
16GB, 500GB nvme
OPNsense 26.1.8_5-amd64