Need help with guest networking please

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Bedlore
Posts: 14
Joined: 11. Sep 2007, 04:02

Need help with guest networking please

Post by Bedlore »

Hello, I'm quite new to using virtualbox but love the concept. I have installed 1.5.2 on XP and installed a Ubuntu 7.04 guest. It all works well and the guest is able to access the internet via NAT but what I really want is to be able to setup the guest as a LAMP box and be able to see apache webpages from the HOST machine, once it works I will establish a second guest with the only difference been php4 instead of php5.

I have tried many things without sucess can someone please give me some easy to follow instructions on how to achieve this.

very appreciated.
Zebulon
Posts: 27
Joined: 5. Oct 2007, 00:30
Location: Netherlands
Contact:

Post by Zebulon »

Hi

Don't use NAT but Host Interface Networking. See the documentation help about Virtual Networking.
6.2. Network Address Translation (NAT)
Two limitations of NAT mode should be mentioned. First, finding Windows shares by browsing is not possible in the default configuration (although they can still be accessed if you know the name or the IP address of the machine that is sharing them). Second, the ping utility will not get a response from the host or other machines outside of the private network. Browsing Windows shares requires the guest to receive incoming TCP and UDP connections on ports 135, 137 and 139, so you can enable this by forwarding those ports to the guest, but this will then prevent the host from using them to browse shares. And the ping utility uses ICMP network packages, which can only be sent by an application with administrator privileges. Since VirtualBox runs as a user application it can not proxy these in NAT mode.

6.3. Introduction to Host Interface Networking (HIF)
With Host Interface Networking, VirtualBox creates a new networking interface in software on the host computer. This new software interface will then exist in parallel to your regular interfaces (e.g., on a Linux host vbox0 will exist alongside eth0). When a guest is using the new software interface, it looks to the host system as though the guest were physically connected to the interface using a network cable: the host can send data to the guest through that interface and receive data from it. This means that you can set up routing or bridging between the guest and the rest of your network.

You can create several VirtualBox host interfaces on the host system (see the following subsections for instructions on how to do so), but each of them can only be connected to a single virtual network card in a single guest at one time. In other words, for each virtual network card that is supposed to use Host Interface Networking, you will need to set up a new interface on the host.


Warning
Setting up Host Interface Networking requires changes to your host's network configuration, which will cause the host to lose its network connection. Do not change network settings on remote or production systems unless you know what you are doing.


There are few limits on the number of setups which can be created using Host Interface Networking. For the sake of simplicity, we will only describe a simple setup using network bridging for the different host operating systems that VirtualBox supports. For more advanced networking needs, we recommend that you consult general documentation about networking on your host operating system.

Network bridging is one of the simplest ways to use Host Interface Networking. Bridging allows you to connect several network devices together in software, so that data sent to one of the devices will be sent to all of them. For our purposes, this means that virtual machines can send packages through the host's network card, using their own network hardware address, and receive packages sent to it. Other computers on your network will see your guests as though they were physically connected to the network. You will need wired (Ethernet) network hardware on the host for this as most current wireless network devices do not support bridging.

In some network environments (often company networks), measures are taken to prevent several MAC addresses being used on a single network interface by temporarily blocking communication to that interface. This is intended to prevent certain types of network attacks, but will also prevent bridging setups from working correctly.

Zebulon
Post Reply