tailscale: MagicDNS domains don't get registered as expected in WSL /etc/resolv.conf
Version: 1.1.424 (Windows)
Steps:
- Install WSL1 (Windows Subsystem for Linux, version 1. I haven’t tested version 2 but I suspect it might be the same)
- Enable MagicDNS
- From the cmd.exe prompt, try
ping <node1>(a valid nodename in MagicDNS) - Notice that the lookup works as expected
- Enter a WSL1 console
- Try
ping <node1>
Expected:
- The name lookup works like it did in cmd.exe
Actual:
- No such hostname
In /etc/resolv.conf, I found this:
# This file was automatically generated by WSL. To stop automatic generation of
this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <my router's DNS server>
nameserver 100.100.100.100
nameserver fec0:0:0:ffff::1
search <my router's DNS domain> <the first search domain set in the tailscale admin panel> ts.tailscale.com
The search list should also contain the MagicDNS domain. Adding it by hand makes the name lookup work, but slowly.
The <my router’s DNS server> entry also should not be present. Commenting it out fixes the slowness. If that’s not possible, another option might be to have the global tailscale.net domain respond with NS records pointing at 100.100.100.100 I guess? But that wouldn’t work well for non-tailscale.net magicdns domains that we want to support eventually.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 20 (18 by maintainers)
Commits related to this issue
- net/dns: set WSL /etc/resolv.conf We also have to make a one-off change to /etc/wsl.conf to stop every invocation of wsl.exe clobbering the /etc/resolv.conf. This appears to be a safe change to make ... — committed to tailscale/tailscale by crawshaw 3 years ago
- net/dns: set WSL /etc/resolv.conf We also have to make a one-off change to /etc/wsl.conf to stop every invocation of wsl.exe clobbering the /etc/resolv.conf. This appears to be a safe change to make ... — committed to tailscale/tailscale by crawshaw 3 years ago
- net/dns: set WSL /etc/resolv.conf We also have to make a one-off change to /etc/wsl.conf to stop every invocation of wsl.exe clobbering the /etc/resolv.conf. This appears to be a safe change to make ... — committed to tailscale/tailscale by crawshaw 3 years ago
- net/dns: set WSL /etc/resolv.conf We also have to make a one-off change to /etc/wsl.conf to stop every invocation of wsl.exe clobbering the /etc/resolv.conf. This appears to be a safe change to make ... — committed to tailscale/tailscale by crawshaw 3 years ago
- net/dns: set WSL /etc/resolv.conf We also have to make a one-off change to /etc/wsl.conf to stop every invocation of wsl.exe clobbering the /etc/resolv.conf. This appears to be a safe change to make ... — committed to tailscale/tailscale by crawshaw 3 years ago
Same issue with WSL2.