Internal Network As Well As Internet Access in Virtual Box

So, a lot of users running Linux in a Virtual Box face the problem that they either have access to the internal network (like other VMs, the host and so on) OR the internet. If you want to test a webserver or in my case ROS, it is necessary to have both.

The solution for this issue is rather simple:

1. To communicate in the internal network, one commonly uses the host-only adapter in the network preferences.
2. To get easy access to the internet, NAT is the first choice.

-> To have both options, internal network access as well as internet access, simply enable TWO network adapters. The first as an NAT, the second host-only.

After starting your VM, do an ifconfig in your console. Now you should see two different IPs. One probably looks like This is the IP of the NAT  adapter. The other one, 192.168.xx.xx, is the one from the host-only adapter and can be used to ping the VM from the host system.

Pretty easy, huh?


Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )


Verbinde mit %s