Hi, I am a total newcomer when it comes to DNS.
I know what it is and what it does, and the fundamentals (What is A,AAAA,TXT,MX-Record, etc.)
Now I want to try to setup my own dns on my local network.
What do I want to achieve?
I have a public TLD (example.com). I have a service like “myservice.example.com” which resolves to my routers public IP.
I want clients from my local network to get a different/local IP address (like 192.168.2.5) for myservice.example.com instead of my routers WAN Address, so I can access the local service without sending traffic out over the WAN. (And it also works in case of internet outage)
For every (locally) unknown domain (like google.com), I want that DNS server to upstream to a global one like 8.8.8.8
Any Ideas on where to start?
I use pihole and added a custom config to dnsmasq to resolve some domains to a local IP. This is then known as split DNS. Network devices inside my network using pihole as a dns server and gets the local ip.
my_custom_dnsmaq.conf
address=/myservice.example.com/192.168.2.5
Sounds like you may want something like PiHole. You can set your local dns using either the web interface or by editing the config at: “/etc/pihole/custom.list”
PiHole is probably the easier option, but if you’re cool like me and end up going the Bind route, then the option you are looking for is called Response Policy Zones (or RPZ).