小编Kir*_*and的帖子

如何从主机访问在 VirtualBox 中运行的服务器?

我正在 VM 上运行 Web 应用程序。

我可以localhost:8888在 VM中通过浏览器查看应用程序。

我无法在同一 URL 上看到来自主机的应用程序。这就是目标。

我试过了,VBoxManage modifyvm "VM name" --natdnshostresolver1 on但没有影响。

我的配置是:

  • 主机: Windows 7
  • 来宾: Ubuntu 16.04.1 LTS
  • 虚拟 5.1.4r110228

访客配置

(访客)ifconfig在 NAT 上时

kirkland@GC:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:d0:fc:0e  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::4c67:70b5:c37b:8fa8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7431 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3587 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7444830 (7.4 MB)  TX bytes:731870 (731.8 KB) …
Run Code Online (Sandbox Code Playgroud)

networking dns virtualbox nat ubuntu

5
推荐指数
2
解决办法
7万
查看次数

标签 统计

dns ×1

nat ×1

networking ×1

ubuntu ×1

virtualbox ×1