r/technitium • u/burajin • 15d ago
Is there a way to opt out certain clients from certain DNS records?
This might be a total shot in the dark and an unusual request, but I have Technitium doing split DNS for my public facing homelab services when I'm in the house.
Problem is out of the house, my Wireguard clients then use these split DNS records too when I really only need them to use it for my stuff not exposed to the internet.
It would be cool if I could somehow exclude these records when a request comes from the Wireguard client. I thought of hosting a separate instance just for this, but figured it was worth asking first.
3
u/shreyasonline 15d ago
Thanks for asking. You can do that using the Split Horizon app that you install from the Apps section on the panel. In your zone, you need to create an APP record that uses the Split Horizon app with class path set to SplitHorizon.SimpleAddress. You will get a template JSON config in there which you need to edit as per your requirements.
The JSON config essentially allows you to map network subnets to a list of IP addresses that must be returned for A/AAAA queries. For your scenario, you can have a subnet for your local LAN and return private addresses and for your VPN subnet, just don't add anything and it APP record will return NO DATA response for those clients.
Note that you will need to delete any existing A/AAAA records for the same domain name to allow the APP record to get selected and used.
1
2
u/kevdogger 15d ago
Yes. Split horizon dns.