Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to get to route to the host computer (the one running the virtual machine, not the virtual machine itself)? I am supporting a web app that sometimes requires to be the ip address, and NOT the number I am getting for the host address at the moment.


share|improve this question
up vote 1 down vote accepted

You confused me. where are you running the web app ? Inside or outside VM ? you can forward packets with destination to host's ip but propably you 'll break something if you do that.

If you are totally sure that it's the only way, you should better change the value in /etc/hosts from localhost to localhost 10.something Which means that anything which are destined to "localhost" will go to host's ip (If something has destination it will go to the virtual machine)

share|improve this answer
The web app is running in OS X. The browser (IE8 specifically) in inside the Guest OS, XP. Some parts of the web application don't allow for "localhost" and instead of require So I can't do a usual override of localhost equaling something else. – bobber205 Aug 20 '10 at 17:17
Unfortunately i can't help with windows :< If it was linux i 'll tell you to use iptables and forward the packets to host's ip. But for windows i don't know. You could look for windows routing application ... or something like that – Nikolaidis Fotis Aug 20 '10 at 17:20
Found an app called NetworkActiv AUTAP that works well. ^_^ – bobber205 Aug 20 '10 at 17:30

That defies the very definition of localhost or the loopback IP. No, there is no way to do that.


share|improve this answer
I sure can route a specific port on localhost to another IP. – bobber205 Aug 23 '10 at 15:54
That sounds more like an ssl tunnel than redefining It probably solves the problem that you were asking about, but it's not what I thought you were asking. (my bad.) – gWaldo Aug 23 '10 at 19:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.