Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I have the ip address for ubuntu machine, and I want to access the application running on localhost in ubuntu from my virtual windows box. Is there a way to do it? Typing the [inet address]:8080 doesn't work.

share|improve this question

Windows has its "own" localhost, so you have to "help" it find Ubuntu's one.

In your virtual machine, go to this ip and it should work. You can edit windows host file to make localhost point to that ip so you don't have to remember it.

In: C:\Windows\System32\drivers\etc\hosts

Add: localhost
share|improve this answer

First, make sure the web server process is running. Type localhost:8080 in a browser window on your Ubuntu machine. If you get the page you were expecting proceed to next step, otherwise start the webserver process and retry.

Second, make sure that both machines are on the same sub-network. i.e. something like 192.168.x.y/ and 192.168.x.z/ If not, make necessary adjustments and proceed to next step.

Third, check if a firewall is running on your ubuntu server. If so, check if the desired port is open (8080 in your case). If you do not want to open the port to public access you can configure a rule to accept only traffic from the local sub-net.

Edit: Step 0. Make the settings suggested in the answer by @Eeroz

share|improve this answer

You could set the virtual machine to use a bridged connection. That way the virtual machine will get its own IP-address, and you should be able to connect to the host machine.

  1. Right click on the host machine (while it is not running)
  2. Choose 'Settings'
  3. Choose 'Network'
  4. Under the 'Adapter 1' tab, set 'Attached to' to 'Bridged Adapter'.
share|improve this answer

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.