On my host machine (dev pc) is a copy of IIS express hosting a load of sites. Is there a way I can forward localhost:28101 to localhost:28101 on the host.

For example if I visit localhost:28101 within the vm it will work as if it was done on the host.

It just saves me having to reconfiguring the app.

2 Answers 2


You've done your dev all wrong if you're testing with "localhost" rather than a named-based virtual host setup where you can create your own (real) dummy domain and you can then configure your guests/LAN machines to point your dummy domain to the webserver IP via the HOSTS or DNS which will mean no matter what machine you use whenever you go to your dummy domain it'll open your app the right way...

An existing answer (How to set-up my webserver properly on my local network?) shows you how to configure the HOSTS file (and if you wanted to use your own internal DNS server - always useful for these scenarios!) to achieve what you want. Note that you have to edit the HOSTS file on each client computer so it knows where to find your domain name.


from localhost:28101 to localhost:28101 on the host.

Local host means local.

If you want to access it from another host then bind the aplication to an external IP. Either abridged one (easiest on almost all points when using VMs) or some NAtted translation one.

You must log in to answer this question.

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