Globe

Kratos
专注于用户阅读体验的响应式博客主题
  1. 首页
  2. 随手记录
  3. 正文

Windows Wireguard 流量无法接收

2024年1月18日 39点热度 0人点赞 0条评论

Wireguard客户端在Windows的流量只有发送,没有接收,打开网页显示DNS解析错误。
查看Wireguard客户端日志,会发现有条Warning
[TUN] [warp+] Warning: the "以太网" interface has Forwarding/WeakHostSend enabled, which will cause routing loops

解决方法如下:
1.快捷键Win+X选择终端管理或者cmd右键选择管理员运行
2.输入netsh interface ipv4 show interfaces
找到你连接网络的索引Idx
3.输入netsh interface ipv4 show interface 12
看到转发是开启的状态
注意:12要替换为你的Idx
4.输入Set-NetIPInterface -ifindex 12 -Forwarding Disabled
关闭抓发
注意:12要替换为你的Idx
5.再次输入netsh interface ipv4 show interface 12
可以看到转发已经关闭
注意:12要替换为你的Idx
再次连接WireGuard,可以正常访问,接收与发送流量正常了,可以正常使用了。
OK问题解决.

有些遇到重连之后又恢复成enable状态,提供一个bat批处理,方便使用。
创建一个文本文件,后缀改为.bat
在文本中输入一下内容,注意12要改为你之前查到的Idx
<# : @powershell "icm ([scriptblock]::Create((gc '%~f0' -Raw -Encoding UTF8)))" exit #>
Set-NetIPInterface -ifindex 12 -Forwarding Disabled
netsh interface ipv4 show interface 12
pause
# powershell script

OK,每次遇到问题,右键管理员运行下该批处理就好了。

标签: 暂无
最后更新:2024年1月18日

free

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2024 EverythingIThink. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang