0

after installing ubuntu in virtualbox using NAT the guest system has the IP 10.0.2.15. its possible browse and to ping the host

in the global settings i found a virtual host-only interface with an IP 169.254.203.239. this seems to be the IP of the virtualbox "router" - ping is possible what i know what works is using an forwarding to some ports get access to the guest system.

but - as i remember of vmware - i want to have access to the guest, as its like a physical one. so i tried to give the guest (ubuntu) an ip from my host net (192.168.178.x)

as a result a can no more browse and no ping is possible

i only added:

auto eth0 iface eth0 inet static address 192.168.178.155 netmask 255.255.255.0 gateway 192.168.178.1

to etc/network/interfaces - nameserver is in etc/resolv.conf

any ideas?!

0

2 Answers 2

2

There are several ways you can approach this:

  • Don't use a NAT adapter. I realize this may not be possible/desirable, but if you can select "Bridged" adapter and get an IP from that same subnet, all these problems (both gust->host and host->guest) go away.

  • Use two virtual adapters, the regular NAT one for internet access, and a second "loopback" adapter in bridged mode on your own private subnet. The loopback will be used for communication between the host and guest(s), while the NAT adapter will handle the traffic outside of the host.

  • There are a number of tricks to do port forwarding to the hosts, as well as open up guests to see the host. By default, I believe, both of these are blocked as to provide a better sandbox. There are plenty of questions here on Server Fault (tagged with VirtualBox) that talk about punching holes as described.

0

it is not possible. VBox does not allow access from host/external to the guest system.

however, i'm looking myself for a solution how to dig a hole into that.

in the user-manual it says:


The disadvantage of NAT mode is that, much like a private network behind a router, the virtual machine is invisible and unreachable from the outside internet, you cannot run a server this way unless you set up port forwarding (described below). (Page 92)


so to handle the scenario without port forwarding the solution with 2 virtual adapters would be the best if NAT is required.

You must log in to answer this question.