TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.21k stars 415 forks source link

Technitium Local causes windows to report no internet connection #127

Closed necrogami closed 4 years ago

necrogami commented 4 years ago

I use Technitium as an alternative to dnsmasq for windows. When using technitium windows tells me that i don't have an internet connection. However if i use the client to request www.msftconnecttest.com url eventually windows will then return saying i have a connection now.

While this doesn't affect most things. Some software like spotify uses the status of that to determine if their client will work or not.

bkpearson commented 4 years ago

I too am experiencing this. Not sure what's up with it. Whitelisted www.msftncsi.com but that has no effect. I tried hitting www.msftconnecttest.com from the client and Windows 10 still thinks I have no internet.

bkpearson commented 4 years ago

I found a fix from this link: https://community.webroot.com/troubleshooting-116/network-icon-showing-yellow-with-the-webroot-dns-protection-agent-installed-339903

Obviously a different product, but describes Windows exhibiting the same behavior as with Technitium DNS.

Specifically, I ran this from the command line: reg add "HKEY_LOCAL_MACHINE\SOFTWARE\POLICIES\MICROSOFT\Windows\NetworkConnectivityStatusIndicator" /v UseGlobalDNS /t REG_DWORD /d 1

ShreyasZare commented 4 years ago

I found a fix from this link: https://community.webroot.com/troubleshooting-116/network-icon-showing-yellow-with-the-webroot-dns-protection-agent-installed-339903

Obviously a different product, but describes Windows exhibiting the same behavior as with Technitium DNS.

Specifically, I ran this from the command line: reg add "HKEY_LOCAL_MACHINE\SOFTWARE\POLICIES\MICROSOFT\Windows\NetworkConnectivityStatusIndicator" /v UseGlobalDNS /t REG_DWORD /d 1

@bkpearson Thanks for finding a fix for this issue. I have however not experienced this issue on my Windows 10 test setup here. The only thing that happens here is that when the computer reboots, the network connectivity indicator says no internet available for a couple of minutes and then it goes away when it retries to check for connectivity. I concluded that the connectivity check is being done before the DNS service in the background is ready and thus initial probes fail.

glafarge commented 2 years ago

In fact, @bkpearson answer solves the problem, as it disables interface binding when doing DNS lookups in NCSI. This can enable NCSI to work better with special network configurations, like a DNS server running on localhost :

Registry Hive:   HKEY_LOCAL_MACHINE
Registry Path:   Software\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator
Value Name:      UseGlobalDns
Value Type:      REG_DWORD
Value:           0

(*) don't forget to restart for the change to take effect

You could also use Local Group Policy Editor :

ncsi

More context on Windows NCSI :

Before marking a network interface as available for applications, Windows tries to resolve hard-coded domain names, as well as retrieve the content of http://www.msftncsi.com/ncsi.txt.

If these names resolve or if the HTTP connection fails, the interface becomes visible to applications, and NCSI reports it as up and running.

If they don't resolve, Windows interprets this event either as a captive portal (hijacking DNS responses) or as an invalid DNS configuration, and the network status indicator doesn't become green.

Source : https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Windows-NCSI