Published 8 minutes ago
HI! I’m Elliot Alexander, a London-based Computer Scientist with a background in software engineering. I’ve worked across the security and high-performance computing space, and am experienced in all things Linux, networking, or automation related. I’ve been writing for XDA since September 2023, covering topics from user security and privacy to cool things to do with old hardware.
Outside of work, I’m normally playing guitar, tinkering with my homelab or down the pub. Sometimes a combination of all three.
Whether you’re a homelabber looking to take the next step in improving your network, interested in increasing your network speed and snappiness or concerned about your privacy, adding a custom DNS server to your network is a fun (and relatively easy) proj…
Published 8 minutes ago
HI! I’m Elliot Alexander, a London-based Computer Scientist with a background in software engineering. I’ve worked across the security and high-performance computing space, and am experienced in all things Linux, networking, or automation related. I’ve been writing for XDA since September 2023, covering topics from user security and privacy to cool things to do with old hardware.
Outside of work, I’m normally playing guitar, tinkering with my homelab or down the pub. Sometimes a combination of all three.
Whether you’re a homelabber looking to take the next step in improving your network, interested in increasing your network speed and snappiness or concerned about your privacy, adding a custom DNS server to your network is a fun (and relatively easy) project with a whole host of benefits. A DNS server is a lightweight server, so it can run on something as small as an SBC like the Raspberry Pi, and is in charge of resolving URLs to their IP addresses. Whatever your motivation, we think it’s a great addition to your network and here are our top reasons why.
You’re in charge of your privacy
You may be giving more information than you think to your ISP
Personally, one of the main reasons I like to run my own DNS server at home is to protect my privacy. DNS isn’t encrypted by default, unless you’ve got DNSSEC setup to encrypt your DNS queries. A DNS request is made at some point or another (they may be cached locally or on your router) for just about every website you visit, and while what you view on that website remains encrypted with HTTPS, the domain itself isn’t, allowing your ISP or DNS server provider to see a full list of every website you visit. This might not seem like much information, but it can be used to paint a comprehensive picture of your behavioral patterns, and can be used to target advertising or develop a profile on you or other members of your household.
Related
Setting up a DNS caching server on your Raspberry Pi is easy - here’s how it’s done
Turning your Raspberry Pi into a DNS caching server can grant a slight boost to your online browsing speed
It can make your internet snappier
Improving your DNS cache can help reduce latency when browsing the web
Another great benefit of running your own DNS cache is that it can improve performance when browsing the internet. Most home routers will have a DNS server and associated cache built in, but the performance of these is sometimes questionable. Building a custom router or DNS server can improve this performance, allowing at worst a larger cache to store more entries, and at best improving the latency and response times of your server. While this might seem minor, it’s another little thing that can help you improve your overall internet speed and performance.
You can use your own local network domains
No more remembering IP addresses for every service
Source: Tailscale
If you’re a homelabber, or just run your own services like a NAS internally, having a custom DNS server is near essential. Running your own DNS server allows you to run your own internal domains, without necessarily even needing to own the actual domain, or use a valid TLD. This makes it easy to keep track of your services internally, as you only need to update your configuration in a single place - i.e. on your DNS server, to reflect those changes on all devices on your network. For example, you could setup a custom internal domain, like xda-developers.com or even xda-developers.local (a non-existent TLD), and run your devices under that. Like nas.xda-developers.local.
Offline functionality
Keep your services running internally even if your internet is down
If you are running services internally, an often overlooked benefit of running your own DNS server is that your internal services will keep working when your internet is down. If you’re relying on an external provider to provider DNS names for your services internally, i.e. by resolving a domain to an internal IP like 10.0.0.30, these will break once your internet connection is down. If you live somewhere with spotty connection, and especially if you rely on DNS to allow your internal services to talk to each other, you’ll want to consider this.
Nothing is worse than having a great offline library of content on your home media server, only to find that none of your services can find each other once your internet is offline because they all rely on DNS names which are no longer resolvable.
There doesn’t need to be a downside
You can always fall back to another DNS server
This might be a little passive, but the real truth of running a DNS server internally is that there aren’t really any big disadvantages. One of the nice aspects of DHCP, and network configuration in general, is that most devices support specifying fallback servers, allowing your DNS to failover on a per-device basis if your server goes down or is unavailable for some reason. We’d recommend it’s good practice to failover your DNS to an external provider like 8.8.8.8. Sure, running your own server can be a little bit inconvenient, but once setup it’s a low maintenance addition to your network with few to no real disadvantages and plenty of upsides.
Block ads and trackers at the source
Bring adblocking to every device on your network with one easy change
Source: TCL
This ones been documented plenty of times, but one of the biggest reasons to set up your own DNS server is to run network-wide ad blocking with a tool like Pi-hole. What these tools do is maintain blocklists of known domains being used to serve adverts and proactively block those DNS requests, preventing any devices on your network from connecting to these advertising servers and subsequently preventing adverts being shown. This is great for things like TVs, where traditional ad-blocking software isn’t really viable to install. You won’t even need to setup each device to use this, as DHCP will provide a new DNS configuration to each device for you.
Now, this won’t work on all ads. Some providers have clued on to this trick and host their adverts on the same domains as other content, but it’ll catch most of them and is a great supplement to other ad-blocking tools you might use.
Setting up a DNS server is easy
Setting up a DNS server on your home network is a great addition, which while it doesn’t solve a particular problem outright, can improve your entire network in a number of smaller but noticeable ways. This can be as easy as setting up Pihole on a Raspberry Pi, which includes most of the tools you’ll need to get going with your own DNS. Just remember to change your router or DHCP servers setting to use your new DNS server and you’ll be up and running within minutes.