Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm attempting to set up a node.js server on my Ubuntu guest OS running on VirtualBox.

A simple "Hello World" HTTP server runs fine if I try accessing it from a browser on the Ubuntu image, but I'm struggling with opening the page on a browser in the host OS, which is Windows 7.

I'm using the "Bridged Adapter" setting in VirtualBox and am getting a 192... local IP address for the guest machine.

The server listens on port 8124, so I forwarded that port (TCP and UDP) in my router settings.

When I try opening [Ubuntu IP Address]:8124 in my browser, I get a 'could not connect' message. As I mentioned before, "localhost:8124" on an Ubuntu browser shows me the "Hello World" page I want.

Any help on this issue would be much appreciated.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

You have to open the Port on your guest system too. I had a similar error in my system and also set the firewall rules after it was suddenly

share|improve this answer
    
I did a "ufw enable," then ufw allow 8124. Doesn't look like that did it either :/ –  funseiki Jul 14 '12 at 20:55
    
Actually, it looks like I got it. I was specifying '127.0.0.1' as the address - I left it blank and it looks like it works. –  funseiki Jul 14 '12 at 21:05
add comment

It may be too late but I figured out a way to achieve it in very simple steps.

  • In Network settings of Guest OS, use Bridged Adapter.
  • Run Node.js server with IP 0.0.0.0 instead of 127.0.0.1 .

Above settings works and I can access the server from other machine in same networks as well.

I have written a small post on how to access nodejs server in guest virtualbox from host

share|improve this answer
add comment

Your Answer

 
discard

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.