2

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?

top 3 comments
sorted by: hot top controversial new old

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”

[-] edvauler@alien.top 1 points 1 year ago

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
[-] astutesnoot@alien.top 1 points 1 year ago

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).

https://www.isc.org/docs/BIND_RPZ.pdf

this post was submitted on 12 Nov 2023
2 points (100.0% liked)

Self-Hosted Main

504 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS