虚拟机可以访问内网但不能访问internet

发布于 2024-12-03 23:12:10 字数 1549 浏览 7 评论 0原文

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

九厘米的零° 2024-12-10 23:12:10

问题是我的公司使用代理服务器,我必须在虚拟机中定义它。不过还是谢谢你的帮助。

The problem was that my company uses a proxy server and I had to define it in the virtual machine. Thanks for the help though.

冷…雨湿花 2024-12-10 23:12:10

我也遇到过这样的问题。但就我而言,Ubuntu 11.10 位于 Windows 7 Enterprise 上的 VirtualBox 上,并且企业网络受到严格保护。但我认为问题出在主机方面。

我所做的如下:
1. 在 VirtualBox 的网络设置中,选择“NAT”,然后选中“电缆已连接”
2. 在主机的网络适配器设置中,重新检查“VirtualBox Host-Only Network”是否具有 DHCP,所有其他设置均设置为自动。
3. 在主机自带的“本地连接”中,进入“属性”>>“共享”,并勾选“允许其他网络用户...” 。然后“确定”
4. 在虚拟机上,通过“取消选中”“启用网络”来断开一次连接,然后再次“选中”。

Bingo!,然后互联网工作正常。

I also had this sort of problem. But In my case, Ubuntu 11.10 was on VirtualBox on Windows 7 Enterprise, and tightly secured corporate network. But the issue, I think, was on host side.

What I did, is as follows:
1. On VirtualBox's Network setting, choose "NAT", and check "Cable connected"
2. On host machine's network adapter settings, re-check that "VirtualBox Host-Only Network" has DHCP, all other settings are set to automatic.
3. On host machine's own "Local Area Connection", went to "Properties">>"Sharing", and check "Allow other network users ...". And "OK"
4. On virtual machine, Disconnect once by "Uncheck"ing "Enable Networking", then "check" again.

Bingo!, then Internet was working fine.

怕倦 2024-12-10 23:12:10

将您的虚拟机设置为使用 NAT,我敢打赌这可以解决您的问题。

Set your Virtual machine to use NAT, I bet that takes care of your problem.

蝶舞 2024-12-10 23:12:10

恕我直言,最好在主机上使用 CNTLM 来集中代理设置连接。
特别是如果您需要身份验证。

IMHO it's better to use CNTLM on your host to centralize your proxy settings connections.
Especially if you need an authentication.

无法回应 2024-12-10 23:12:10

就我而言,我已经用其他方式解决了这个问题。

解决代理问题

VirtualBox -> 机器 ->设置>附加到:桥接适配器(已检查电缆连接)--好的
在 Windows 中禁用 Virtual Box Autho 生成的网络适配器。

在默认 Windows 以太网中,如果您想使用安装到硬件的 Windows 来连接互联网,则可以粘贴您自己的其他 ip(但在 Virtual Box Linux ip 中不同)

,并且在 Virtual Box Linux 中,您必须适当地构建 ip 地址和代理设置

In my case I have resolved this with other way.

Solving Proxy Problem

VirtualBox ->Machine -> Settings > Attached to: Bridged Adapter (Cable connected checked) -- ok
Disable Virtual Box Autho Generated Network Adapter in Windows.

And in Default Windows Ethernet you can paste you own other ip (But not same in Virtual Box Linux ip) if you want to Connect internet also with Windows Installed to HardWare

And In Virtual Box Linux you have to construct ip adress and proxy setting appropriatelly

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文