Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

66%
+2 −0
Q&A How do I set up my own DNS on my LAN, with delegation of public domains?

I want to have a local DNS server on my home LAN, say at 192.168.1.123. All of my machines will use 192.168.1.123 as their only DNS server when connected to my home network. By default, my DNS ser...

1 answer  ·  posted 10mo ago by matthewsnyder‭  ·  last activity 10mo ago by Canina‭

Question dns
#3: Post edited by user avatar matthewsnyder‭ · 2023-07-20T21:18:31Z (10 months ago)
  • I want to have a local DNS server on my home LAN, say at `192.168.1.123`. All of my machines will use `192.168.1.123` as their only DNS server when connected to my home network.
  • By default, my DNS server will process requests by checking them with a public DNS service on the internet. I am planning to also add caching to this (eg. dnsmasq) and use a secure DNS query method (eg. dnscrypt). These will only be set up on one machine (the DNS server) so by pointing all other clients (laptops, phones) to the server I will avoid having to configure dnsmasq and dnscrypt on each one.
  • My DNS server will also have its own configuration file with some arbitrary domain-IP mappings (or perhaps I can just use `/etc/hosts` on that machine). When processing a DNS query, the server will first check that file and if it finds a match, return that. If not, it will then try the public DNS servers on the internet. I am planning to use this to assign user-friendly domains to various machines in my LAN, such as printers, so that I don't have to type in their IP address every time.
  • I have access to a regular Linux server on the network which is always on. I would prefer to set up the DNS service on this server, because it's easier to maintain.
  • I also have an open source firmware running on my router (OpenWRT). I'd prefer not to set up DNS there because the hardware and software is more limited than the server, but it's an option.
  • What is a practical way to set up a local DNS service like I describe?
  • I want to have a local DNS server on my home LAN, say at `192.168.1.123`. All of my machines will use `192.168.1.123` as their only DNS server when connected to my home network.
  • By default, my DNS server will process requests by checking them with a public DNS service on the internet. I am planning to also add caching to this (eg. dnsmasq) and use a secure DNS query method (eg. dnscrypt). These will only be set up on one machine (the DNS server) so by pointing all other clients (laptops, phones) to the server I will avoid having to configure dnsmasq and dnscrypt on each one.
  • My DNS server will also have its own configuration file with some arbitrary domain-IP mappings (or perhaps I can just use `/etc/hosts` on that machine). When processing a DNS query, the server will first check that file and if it finds a match, return that. If not, it will then try the public DNS servers on the internet. I am planning to use this to assign user-friendly domains to various machines in my LAN, such as printers, so that I don't have to type in their IP address every time. I can also use this to assign non-functional IPs to real domains that I don't want to resolve (like ad servers).
  • I have access to a regular Linux server on the network which is always on. I would prefer to set up the DNS service on this server, because it's easier to maintain.
  • I also have an open source firmware running on my router (OpenWRT). I'd prefer not to set up DNS there because the hardware and software is more limited than the server, but it's an option.
  • What is a practical way to set up a local DNS service like I describe?
#2: Post edited by user avatar matthewsnyder‭ · 2023-07-20T21:17:44Z (10 months ago)
  • How do I use setup a local DNS?
  • How do I set up my own DNS on my LAN, with delegation of public domains?
#1: Initial revision by user avatar matthewsnyder‭ · 2023-07-20T21:17:15Z (10 months ago)
How do I use setup a local DNS?
I want to have a local DNS server on my home LAN, say at `192.168.1.123`. All of my machines will use `192.168.1.123` as their only DNS server when connected to my home network.

By default, my DNS server will process requests by checking them with a public DNS service on the internet. I am planning to also add caching to this (eg. dnsmasq) and use a secure DNS query method (eg. dnscrypt). These will only be set up on one machine (the DNS server) so by pointing all other clients (laptops, phones) to the server I will avoid having to configure dnsmasq and dnscrypt on each one.

My DNS server will also have its own configuration file with some arbitrary domain-IP mappings (or perhaps I can just use `/etc/hosts` on that machine). When processing a DNS query, the server will first check that file and if it finds a match, return that. If not, it will then try the public DNS servers on the internet. I am planning to use this to assign user-friendly domains to various machines in my LAN, such as printers, so that I don't have to type in their IP address every time.

I have access to a regular Linux server on the network which is always on. I would prefer to set up the DNS service on this server, because it's easier to maintain.

I also have an open source firmware running on my router (OpenWRT). I'd prefer not to set up DNS there because the hardware and software is more limited than the server, but it's an option.

What is a practical way to set up a local DNS service like I describe?
dns