DevOps Zone is brought to you in partnership with:

Graduated in computer science at the University of Oldenburg, Germany. Develops software for over 20 years now. Likes to program in Java. Wrote and contributed Maven plugins and implemented initially Maven support for IntelliJ IDEA. Ralf is a DZone MVB and is not an employee of DZone and has posted 18 posts at DZone. You can read more from them at their website. View Full User Profile

VirtualBox - Let Host-Only Mode Access the Internet

04.21.2013
| 2038 views |
  • submit to reddit

In an earlier post I described networking modes in VirtualBox. Combining those modes you'll get some kind of swiss knife in realizing somehow exotic networking modes in your VMs.
What if you want your VM that is configured for Host-Only mode access the internet?
Port forwarding using NAT is an option. But for me that sounded to complicated. I had the following requirements:

  1. The host should be able to access services like Apache or GlassFish on the guests (the virtual machine)
  2. The guests should be able to access the outside world (intranet/internet)
  3. The guests should be able to talk to each other using fixed IP adresses
  4. The host should be able to talk to the guests using fixed IP adresses
A working solution for these requirements is described in this blog article.

Published at DZone with permission of Ralf Quebbemann, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)