【问题标题】:Linux@Virtualbox: Access from Host (pingable) and ability to access Internet (outside)Linux@Virtualbox:从主机访问(可ping)和访问Internet(外部)的能力
【发布时间】:2018-07-25 11:41:11
【问题描述】:

我在 Virtualbox 上安装了 Ubuntu,然后我想通过 url 从主机访问我的应用程序,例如 192.168.50.100,我设法通过

vmsettings -> 网络 -> 仅限主机

但我无法从 VM 访问 Internet(例如 Google.com 之外) - 我想要两者兼有,可以吗?

操作系统主机:Windows10

操作系统访客:Debian

编辑:

解决方案如下。

【问题讨论】:

    标签: networking virtual-machine virtualbox


    【解决方案1】:

    您可以在您的访客中使用第二个网络接口并将其设置为 NAT 或桥接。 当你这样做时,确保你已经通过编辑这个文件在你的 debian 客户机中配置了第二个网络接口:/etc/network/interfaces

    How to Setup Network Interfaces of Virtualbox Guest

    How to Config /etc/network/interfaces

    【讨论】:

      【解决方案2】:

      解决方案:

      • 在 vbox 设置中使用 NAT

      • 添加端口转发例如

      主机 IP:10.1.14.10

      主机端口:44444

      访客 IP:10.0.2.5

      客人港口:80

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-04-12
        • 2016-06-09
        • 2016-08-04
        • 2013-06-23
        • 2013-10-20
        • 2011-02-12
        • 2014-11-02
        相关资源
        最近更新 更多