AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1777920
Accepted
Ξένη Γήινος
Ξένη Γήινος
Asked: 2023-04-07 23:06:24 +0800 CST2023-04-07 23:06:24 +0800 CST 2023-04-07 23:06:24 +0800 CST

Windows 10 错误报告没有互联网

  • 772

我知道这个问题已经被问过很多次了,但我还没有找到任何能真正解决它的方法。

我使用 VPN 访问国际互联网,信息自由是一项基本人权,不幸的是我住在中国,所以我必须使用 VPN 来行使这项权利。

现在 Windows 10 在连接 VPN 时错误地报告“无互联网”,尽管事实上我可以很好地访问任何被阻止的网站(例如www.google.com)。Windows 在 VPN 过去处于活动状态时正确报告了“Internet 访问”,但不知何故现在却没有。

您可能认为这没什么大不了的,但我的 ISP 不断尝试断开我的 VPN,有时他们会成功,而当我实际断开连接时,网络连接状态指示器将无法告诉我。

我当然用谷歌搜索了这个,一些结果建议进行以下注册表编辑并重新启动路由器:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"ActiveDnsProbeContent"="8.8.8.8"
"ActiveDnsProbeContentV6"="2001:4860:4860::8844"
"ActiveDnsProbeHost"="dns.google"
"ActiveDnsProbeHostV6"="dns.google"
"ActiveWebProbeContent"="success"
"ActiveWebProbeContentV6"="success"
"ActiveWebProbeHost"="detectportal.firefox.com"
"ActiveWebProbeHostV6"="detectportal.firefox.com"
"ActiveWebProbePath"="success.txt"
"ActiveWebProbePathV6"="success.txt"
"CaptivePortalTimer"=dword:00000000
"CaptivePortalTimerBackOffIncrementsInSeconds"=dword:00000005
"CaptivePortalTimerMaxInSeconds"=dword:0000001e
"EnableActiveProbing"=dword:00000001
"PassivePollPeriod"=dword:0000000f
"StaleThreshold"=dword:0000001e
"WebTimeout"=dword:00000023

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\ManualProxies]


[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator]
@=""

我试过了,但没有用。

我可以很好地 ping 测试中使用的服务器:

PS C:\Users\Xeni> ping detectportal.firefox.com

Pinging prod.detectportal.prod.cloudops.mozgcp.net [34.107.221.82] with 32 bytes of data:
Reply from 34.107.221.82: bytes=32 time=203ms TTL=120
Reply from 34.107.221.82: bytes=32 time=203ms TTL=120
Reply from 34.107.221.82: bytes=32 time=203ms TTL=120
Reply from 34.107.221.82: bytes=32 time=204ms TTL=120

Ping statistics for 34.107.221.82:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 203ms, Maximum = 204ms, Average = 203ms
PS C:\Users\Xeni> ping 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=203ms TTL=120
Reply from 8.8.8.8: bytes=32 time=203ms TTL=120
Reply from 8.8.8.8: bytes=32 time=203ms TTL=120
Reply from 8.8.8.8: bytes=32 time=200ms TTL=120

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 200ms, Maximum = 203ms, Average = 202ms

我已禁用并重新启用网络适配器...

什么都不管用。

但是我知道如果我断开 VPN,NCSI 会立即正确报告我可以访问互联网,我已经成功地重现了很多次而没有失败,但是当然这不是解决方案,原因很明显。

我的设置 -> 网络和互联网 -> 状态 -> 网络状态说:

不能访问网络

您的设备已连接,但您可能无法访问

网络上的任何东西。如果您的数据计划有限,您可以

使此网络成为按流量计费的连接或更改其他

特性。

我该如何解决这个问题?

PS 这些细节无关紧要,但我会在这里添加它们以防有人提到它们:

我的操作系统是 Windows 10 Pro 22H2 x64,我使用的是有线以太网连接,但它们对问题的影响不大;不,dism /online /cleanup-image /restorehealth绝对sfc scannow不解决这个问题,所以不重装操作系统;而且我之前已经使用 Snappy Driver Installer 更新了网络驱动程序,并且我已经重新启动了我的电脑......

windows
  • 2 2 个回答
  • 56 Views

2 个回答

  • Voted
  1. Best Answer
    Cpt.Whale
    2023-04-08T00:59:45+08:002023-04-08T00:59:45+08:00

    Windows 网络连接状态指示器 (ncsi) 至少进行 DNS 和 HTTP 测试。您通常可以自己测试这些,看看哪个失败了。默认情况下,它会检查:

    • nslookup dns.msftncsi.com对于 DNS(应该解析为131.107.255.255)
    • 在浏览器中打开http://www.msftconnecttest.com/connecttest.txt,确认内容是否正确Microsoft Connect Test

    如果 DNS 失败,您可以通过编辑主机文件强制它成功


    也就是说,我相信它依赖于您更改的那些注册表设置。当您遇到问题时,您可能希望将它们重置为默认值或验证它们是否为您提供了对上述测试的正确响应。

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
    "ActiveDnsProbeContent"="131.107.255.255"
    "ActiveDnsProbeContentV6"="fd3e:4f5a:5b81::1"
    "ActiveDnsProbeHost"="dns.msftncsi.com"
    "ActiveDnsProbeHostV6"="dns.msftncsi.com"
    "ActiveWebProbeContent"="Microsoft Connect Test"
    "ActiveWebProbeContentV6"="Microsoft Connect Test"
    "ActiveWebProbeHost"="www.msftconnecttest.com"
    "ActiveWebProbeHostV6"="ipv6.msftconnecttest.com"
    "ActiveWebProbePath"="connecttest.txt"
    "ActiveWebProbePathV6"="connecttest.txt"
    "CaptivePortalTimer"=dword:00000000
    "CaptivePortalTimerBackOffIncrementsInSeconds"=dword:00000005
    "CaptivePortalTimerMaxInSeconds"=dword:0000001e
    "EnableActiveProbing"=dword:00000001
    "PassivePollPeriod"=dword:0000000f
    "StaleThreshold"=dword:0000001e
    "WebTimeout"=dword:00000023
    

    如果您的 vpn 涉及网络代理,则 ncsi 会尝试自动检测您的代理设置。如果失败,您可以尝试通过手动设置 winHTTP 代理设置来帮助 ncsi:

    netsh winhttp set proxy [proxy-server=]<server name> [bypass-list=]<hosts list>
    
    • 3
  2. Ξένη Γήινος
    2023-04-08T14:51:28+08:002023-04-08T14:51:28+08:00

    我已经确定了问题的根本原因。

    显然是ISP劫持了dns.msftncsi.com到100.64.100.1,所以连接VPN时DNS查询会失败,而DNS查询失败就是NCSI误报“No Internet”的原因。

    然而,主机文件中的设置131.107.255.255 dns.msftncsi.com会导致相反的情况,当我的互联网被我的 ISP 切断时,它会使 NCSI 错误地报告“Internet 访问”。

    两者都是不需要的,我刚刚找到了一种使其正常工作的方法。

    导致DNS查询失败的原因是我的ISP的DNS中毒,所以使用已知安全的DNS会让DNS查询在应该成功的时候成功。

    我在控制面板 -> 网络和 Internet -> 网络连接 -> 以太网属性 -> IPv4 属性页面将我的适配器更改为使用 8.8.8.8 DNS,这将绕过 GFW 引起的 DNS 中毒。

    但是连接上VPN后NCSI还是会报漏报,通过以下命令解决:

    devcon disable *dev_8168*
    devcon enable *dev_8168*
    

    devcon.exe(如果要试用,需要下载并放到%windir%\system32文件夹下)

    • 0

相关问题

  • 如何在 Windows Precision 触摸板上禁用鼠标加速?

  • 批量重命名图像文件集

  • Python 的“pass”参数的批处理等价物是什么?

  • 在 Windows 上与 Docker 守护进程通信

  • 资源管理器侧面板中的桌面外壳快捷方式

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve