Windows 7: Internet Connection detection
September 12, 2012
Posted by on
Problem: If you use a proxy to connect to Internet you may see an annoying exclamation point on your Network connection icon in Task bar.
Basically it says you do not have Internet connection.
The matter in fact Windows 7 tries to
1. Resolve FQDN of www.msftncsi.com. It should be resolved into 18.104.22.168
2. sends HTTP request to get a plain text file at URL: http://www.msftncsi.com/ncsi.txt
This technique is called Network Connectivity Status Indicator(NCSI) service and was introduced in Vista. It is described here.
Wireshark shows that NCSI goes directly to MS site (bypassing proxy) even though proxy is properly set in Internet Explorer.
Resolution: Kyle pointed to an NETSH command to force NCSI use proxy:
netsh winhttp set proxy <your_proxy:port>
you can verify settings using
netsh winhttp show proxy
After that on Wireshark trace you see traffic from NCSI goes to proxy and preperly replied. Indication in task bar is ok.