Tailscale Part 3: Make Remote Access Easier With MagicDNS
Tired of remembering IP addresses? Learn how Tailscale MagicDNS lets you access your homelab using simple device names instead.
If you've been following along with our Tailscale series, you should now have a working remote connection to your homelab. In Part 2, we covered subnet routing, which allows you to reach devices on your home network without installing Tailscale on every machine.
But there's something about managing a homelab that gets old pretty quickly, and that's remembering IP addresses. I have enough services running that keeping track of every address and port isn't exactly enjoyable. Fortunately, Tailscale has another useful feature called MagicDNS, and there's a good chance it's already enabled on your tailnet.
What is MagicDNS? #
MagicDNS is a built-in Tailscale feature that lets you connect to devices using readable names instead of their assigned Tailscale IP addresses. Rather than remembering something like 100.101.102.103, you could simply use homelab-server to reach the same machine.
Behind the scenes, MagicDNS automatically creates DNS records for devices connected to your tailnet. Whenever you enter one of those names, Tailscale resolves it to the correct address, allowing your devices to communicate without requiring you to remember the numbers.
It's a relatively small convenience, but when you're regularly connecting to different machines, it makes managing everything a little more pleasant.
Enabling MagicDNS #
Tailscale enables MagicDNS automatically on tailnets created after October 20, 2022, so you probably won't need to configure anything. However, it's worth checking before we continue.
Open the Tailscale administration dashboard and navigate to the DNS section. Look for the MagicDNS setting and make sure it's enabled. You'll also see your tailnet's DNS name, which typically ends in .ts.net.
Every device running Tailscale receives a fully qualified domain name based on its machine name and your tailnet's DNS name. For example, a server named homelab-server might have an address like:
homelab-server.example-name.ts.net
You can usually use the shorter homelab-server name when connecting from another device on the same tailnet.
Giving your devices better names #
Tailscale generally uses your machine's existing hostname, which isn't always particularly descriptive. If you've got several Linux machines running, you might want something a little more recognizable.
Head to the Machines section of your Tailscale dashboard and find the device you'd like to rename. Open its menu and select the option to edit its machine name.
Once you've saved the new name, MagicDNS automatically updates its DNS record. There's no need to manually configure a DNS server or create individual records.
Testing MagicDNS #
With MagicDNS enabled, connect your laptop to Tailscale and open a terminal. Try pinging one of your connected machines using its name:
ping homelab-server
Replace homelab-server with the actual name shown in your dashboard. If everything is working, your system should resolve that name to its Tailscale address.
You can also use MagicDNS to access web applications. For example, if your server has a dashboard running on port 3000, you could open:
http://homelab-server:3000
Keep in mind that MagicDNS automatically names devices running Tailscale. It doesn't automatically create names for every service running in Docker or for devices accessible only through subnet routing. Those setups may require additional DNS configuration.
What's next? #
MagicDNS makes accessing your connected machines more convenient, but Tailscale has another feature that takes remote networking further.
In Part 4, we'll explore exit nodes, which allow you to route your internet traffic through a device running Tailscale at home. It's particularly useful when you're away from your own network and want your traffic to pass through your home internet connection.

Comments 0
Join the conversation.
No comments yet. Be the first to comment.