I want to connect to website which i host on virtualbox. On Virtualbox is installed Windows server 2012. I don't know how can I connect to that site outside VB.
问题:
回答1:
It depends on how your network is setup within the Virtual Box environment. Check under the Network section of the settings page of your Virtual machine. There should be a set of tabs for adapters. One of them should be "enabled". Below that checkbox is a dropdown marked "Attached To:" The default setting is NAT. In NAT mode your virtual Box will be assigned its own IP address on a Private network that can't be seen by your "real" network. The Virtual Machine will be able to browse the web and whatnot but not interact with other machines. NAT mode also prevents the machine from being visible from the outside internet.
If you set it to "Bridged Networking", this will allow the VM to act as any other computer on your network. Once you have set this up your VM will have an IP address that can be reached by other local computers.
If you then want that machine to be visible from the internet you will need to setup Port Forwarding.
See the following Documentation for more detailed instructions. https://www.virtualbox.org/manual/ch06.html http://catlingmindswipe.blogspot.com/2012/06/how-to-virtualbox-networking-part-two.html