11

I am running Ubuntu 12.04 and VirtualBox 4.1.12. I have created a Debian server under VirtualBox.

For reasons I don't understand, DHCP grants my Ubuntu box 192.168.20.50 and my Debian VM 10.0.2.15. When I run traceroute from my Ubuntu box, it gets lost trying to find 10.0.2.15 on the Internet.

How do I instruct Ubuntu so that it can find my Debian VM?

1
  • 10.0.2.15 isn't a valid internet ip address. Its only valid within an intranet. In this specific cases its not actually part of your intranet network. You will have to change the configuration of the NAT device on the virtual machine so its on the same intranet sub-address ( 192.168 instead of 10.0 ).
    – Ramhound
    Commented Dec 30, 2013 at 19:17

1 Answer 1

14

The default configuration of VirtualBox for a network adapter is NAT. In that case your virtual machine is not getting a real IP from your DHCP server, but one provided by Virtualbox (i.e. 10.0.x.x).

If you change the network-adapter (in the virtual machine-settings) to "Bridged Adapter" it will get a real IP-address in the range of your host-machine (i.e. 192.168.x.x) and assigned by your DHCP-server in your real network and you can access it as such.

(I don't have a Ubuntu host-system so the screenshot below is from Windows
but under Ubuntu it should be similar)

enter image description here

1
  • 1
    You pretty much put a screenshot to my comment I salute you.
    – Ramhound
    Commented Dec 30, 2013 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .