MagicDNS
MagicDNS is a feature provided by Tailscale that automatically registers DNS names for devices in your network, making it easier to access and communicate with them using human-readable names instead of IP addresses.
Here's a detailed explanation of how MagicDNS works and how you can use it:
Enabling MagicDNS
For tailnets created on or after October 20, 2022, MagicDNS is enabled by default.
If MagicDNS is not already enabled, you can enable it in the DNS page of the Tailscale admin console.
How MagicDNS works
When MagicDNS is enabled, it automatically generates a fully qualified domain name (FQDN) for every device on your Tailscale network.
The FQDN consists of two parts:
Machine name: This is the name assigned to the device, which you can change.
Tailnet name: This is the unique name of your Tailscale network, ending with
.ts.net
. You can view your tailnet name in the DNS page of the admin console.
For example, if you have a device named "monitoring" in a tailnet named "yak-bebop.ts.net", the FQDN for that device would be "monitoring.yak-bebop.ts.net".
Accessing devices using MagicDNS
Once MagicDNS is enabled, any device signed in to your Tailscale network can access other devices using their machine names or FQDNs.
To access a device, you can use its machine name in various scenarios:
SSH:
ssh username@monitoring
Ping:
ping monitoring
Browser: Type
monitoring
in the address bar
Tailscale automatically adds search domains to your network, allowing you to use just the machine name instead of the full FQDN.
However, when accessing devices that are shared with you, you must use the full FQDN, e.g.,
ping webserver.example2.ts.net
.
Assigning and editing machine names
MagicDNS automatically uses a device's machine name as part of the DNS entry.
If you change a device's name, the MagicDNS entry will automatically update to reflect the new name.
To assign a specific name to a device, you can edit its machine name in the Tailscale admin console.
Legacy beta.tailscale.net nameserver
Previously, Tailscale used a tailnet name ending with
.beta.tailscale.net
. If you are still using this legacy nameserver, it is recommended to migrate to the new tailnet name ending with.ts.net
.The
.beta.tailscale.net
nameserver will remain supported until at least November 1, 2023.
Disabling MagicDNS
If needed, you can disable MagicDNS for your entire network by toggling the same button used to enable it in the DNS page of the admin console.
To disable MagicDNS on a specific device, you can stop accepting network DNS settings on that device using the appropriate command or option based on your operating system.
Benefits of using MagicDNS
Simplifies access to devices by allowing the use of human-readable names instead of IP addresses.
Automatically updates DNS entries when device names change, ensuring consistent and up-to-date naming.
Eliminates the need for manual DNS configuration for devices within your Tailscale network.
Provides a convenient way to access devices across different platforms and locations.
To use MagicDNS effectively, follow these steps
Enable MagicDNS in your Tailscale network if it's not already enabled.
Assign meaningful and descriptive machine names to your devices.
Use the machine names or FQDNs to access and communicate with devices within your network.
If you have devices shared with you, remember to use their full FQDNs when accessing them.
If you encounter issues with MagicDNS on a specific device, you can disable it on that device while troubleshooting.
By leveraging MagicDNS, you can simplify the process of accessing and managing devices within your Tailscale network, making it more convenient and user-friendly for everyone involved.
Last updated
Was this helpful?