WSL2 IP地址范围与我的公司VPN发生冲突

发布于 2025-01-17 12:03:35 字数 300 浏览 2 评论 0原文

我最近开始使用 WSL2 而不是 Virtual Box 在我的 PC 上运行 Linux。有时我需要连接到公司 VPN 内部网络上存在的 git 存储库。但最近 WSL2 开始为虚拟机提供与我的公司 VPN 冲突的地址范围,因此当未连接 VPN 时,Linux 系统可以与互联网正常通信,但一旦我进入 VPN,Linux 系统就无法再通信与内部网络上的互联网或主机的连接,因为它使用的范围(例如 172.18.230.215/20 )也由 VPN 作为内部网络上的范围进行通告。

有没有办法强制 WSL2 仅使用特定的私有范围,以便我可以找到与公司内部网络不冲突的范围?

I recently started using WSL2 instead of Virtual Box to run Linux on my PC. Sometimes I need to connect to git repositories that exist on my corporate VPN internal network. But recently WSL2 started giving the VM an address range that conflicts with my corporate VPN, so when the VPN is not connected the Linux system can communicate fine with the internet, but as soon as I go onto the VPN the Linux system can no longer communicate with the internet or host on the internal network because the range it is using (e.g. 172.18.230.215/20 ) is also advertised by the VPN as a range on the internal network.

Is there a way to force WSL2 to use only specific private ranges so I can find a range that does not conflict with the corp internal network?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文