VMware 僅主機網路 Internet 存取

VMware 僅主機網路 Internet 存取

我正在 Windows 7 主機上使用 VMware Player 執行 Ubuntu Linux VM。

我不想直接連接到網路或使用 NAT;我需要僅主機網絡,但也需要互聯網訪問。我怎樣才能做到這一點?

答案1

最終您將不得不使用某種形式的 NAT 或 Bridge。如果您無法/不想讓 VMWare 為您執行此操作,您可以透過在主機連線上啟用 Internet 連線共用 (ICS) 來讓 Windows 執行此操作。

1. Go to Control Panel -> Network and Internet ->Network and Sharing Center
2. Click on 'Change adapter settings'
3. Right click the connection you wish to share (the one which does have access to the net)
4. Click properties
5. Go to the sharing tab at the top of the window
6. Check the first checkbox
7.(optional) select the VMWare adapter responsible for the host only connection with the guest from the drop down box.

答案2

「僅主機網路使用主機作業系統可見的虛擬乙太網路介面卡在虛擬機器和主機電腦之間提供網路連線。如果您需要設定隔離的虛擬網絡.”-僅主機網路

答案3

如果您的主機是 Linux 機器,您可以為僅主機 vmware 設定您自己的 NAT

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 172.16.60.150 -o eth0 -j MASQUERADE

在哪裡172.16.60.150是您的 vmware 映像的 IP,乙太網路0是存取Internet的介面

相關內容