Last Updated: March 16, 2017
· mbillard
Michel funny square

Access your VirtualBox guest localhost from your host OS

So you want to test your application from you host OS? There are plenty of tips for accessing the host localhost, but finding the information for the other way around has proven difficult, so here it is!

In your VM settings, go to Network and change the "Attached to" property from NAT to Bridged.


Now, all you need to do is find the IP address on the network that your Guest OS is using. So switch to your VM and find out its IP address.

Then open a browser in your host OS and type in the IP address (plus the port if needed). For example, 192.168.1.###:3000 for a typical Linux guest VM).

Say Thanks

1 Response
Add your response


Hmmm... but what if my server rewrites the URL to 127,0.0.1? Example. I navigate to the IP of 192.168.0.xxx:8080 and then it takes me to an outside server that logs me in, then redirects me back to my server (this part changes the url from 192.xxx... to and prevents me from navigating the website. When I use Chrome on my phone along with Chrome://inpsect on my computer I can port forward my localhost and the port. so My phone can then use localhost:8080 without any problems. I am trying to achieve the same thing with my virtualbox. so far I still have yet to find a solution. :(

over 1 year ago ·