Accessing localhost on a host machine inside a guest in VirtulaBox

ie. Host(ubuntu) and Guest(Win8) in VirtualBox

  • Host is where I am developing and writing code
    • Host has been set up with a webserver and edited '/etc/hosts' file for local testing (ie.
  • Guest needs access to to test it in IE11


To access something like on the Guest, need to edit the hosts file in the guest (Win8), so that '' points to the IP of the host.

ie. Host's IP is, so in the guest, need to set a line in 'hosts' like:

so that going to in the IE11 Guest browser, routes to

The Host machine receives the request for serves it.


Was deploying every minor change to a staging machine, so that I could test stuff from IE11 on Win8.

Instead of having to commit changes, pushing and deploying all the small changes, can just get access to the dev machine from a VirtualBox (or pretty much any machine on the intranet).

Posted by JB Uy on November 21, 2013 at 07:00 PM UTC
Edited on December 13, 2013 at 08:42 PM UTC