Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 23H2 - Client does not uninstall clearly for DNS #9948

Closed
penguinpages opened this issue Oct 24, 2023 · 8 comments
Closed

Windows 11 23H2 - Client does not uninstall clearly for DNS #9948

penguinpages opened this issue Oct 24, 2023 · 8 comments
Labels

Comments

@penguinpages
Copy link

What is the issue?

I have local DNS segment "penguinpages.local" as well as via VPN a few domains and subdomains. I installed to test tailscale and never really got that far and shelfed the product plan. I uninstalled client and seemed simple. A few days / week later I noticed a sub zone in remote lab was not responding to DNS. Lookups would with NSLookup but not in shell.

Long Posting here and various other MS forums... assuming it was WSL or HyperV etc on my system

https://www.elevenforum.com/t/windows-dns-subdomain-blackhole.19082/

Turns out.. it was some aspects of tailscale that are not uninstalling correctly. I reinstalled the client and tried to "deactivate" DNS redirect.. No change. No my home domain is blackholed. I need DNS back !! It has been three weeks now of tearing my Windows system apart to root cause this DNS issue

Steps to reproduce

Install tailscale
Uninstall windows client

Try to use DNS.

Are there any recent changes that introduced the issue?

No response

OS

Windows

OS version

11 23H2

Tailscale version

1.50.1

Other software

No response

Bug report

No response

@DentonGentry
Copy link
Contributor

DNS configuration is written to HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\DnsPolicyConfig\

5abe529b-675b-4486-8459-25a634dacc23 is the key used by older Tailscale releases which used only a single entry. If you installed it some time ago, this might still be present.

Newer Tailscale releases create multiple entries depending on other GPO settings already present, those names are dynamically generated.

@penguinpages
Copy link
Author

penguinpages commented Oct 24, 2023 via email

@bradfitz
Copy link
Member

Did it leave entries in c:\Windows\System32\Drivers\etc\hosts ?

@penguinpages
Copy link
Author

penguinpages commented Oct 24, 2023 via email

@DentonGentry
Copy link
Contributor

If there were other GPO policies present when Tailscale wrote the DNS config, it would write to HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\DnsPolicyConfig


If something else on the system read in the DNS config and incorporated it, like OpenDNS, then the 100.100.100.100 may now be a part of that software's config.

@penguinpages
Copy link
Author

Your corect on it being policy

image

And what is curious is that I wanted to compare what other Windows 11 hosts had to "restore" against.... That entire hive "DNSClient" does not exist. Checked three other systems....

image

So question is.

  1. How do I properly revert it "back to normal"
  2. Why was the install of tailscale using policy on this computer ??? WSL , Version of Windows 11?? etc...

@penguinpages
Copy link
Author

I backed up hive "DNSClient" then deleted.. required a reboot (my guess is Windows "dnsclient" service reads in on boot, and that service is blocked to restart...

`Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient]
"DoHPolicy"=dword:00000001`

Now DNS is back "normal"

This was a bit "taxing" ... so having the TailScale "uninstall" work through this cleanup ... I would request it have some TLC.

Thanks for posting and help

@DentonGentry
Copy link
Contributor

DentonGentry commented Oct 24, 2023

Why was the install of tailscale using policy on this computer ??? WSL , Version of Windows 11?? etc...

If there are any policies present in HKLM\SOFTWARE\...\DnsPolicyConfig, then HKLM\SYSTEM\...\DnsPolicyConfig is ignored. At the time Tailscale was installed there was likely at least one other entry in HKLM\SOFTWARE\...


Back in the day we weren't doing this right because service shutdown would just terminate tailscaled, so it never had a chance to clean anything up. Newer versions close the pipe to trigger a proper cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants