2

I want to show a friend something I wrote in Node.js. In order to do so I must run a local machine but I can't get it to work out of 127.0.0.1.

I am trying to run: server.listen(8000, '123.123.123.123'); (with my real IP of course) and I get "Error: listen EADDRNOTAVAIL".

It does work via 127.0.0.1:8000 when I execute: server.listen(8000);. When I try to access 123.123.123.123:8000 after doing that firefox is "unable to connect".

Any ideas?

2
  • You need to set up port forwarding. port 80 is forwarded automatically you can listen on that instead (use sudo to bind to it) Commented Jul 24, 2011 at 20:24
  • I forgot to mention I am on windows. Any way I don't think port 80 would work either. Commented Jul 24, 2011 at 20:26

1 Answer 1

4

One simple solution is to use a port forwarding tool. Here are three:

  • proxylocal is free and open source.
  • showoff.io has a nice design and really cheap day passes.
  • pagekite bills based on data usage and has a generous trial.

To make your above example work with showoff.io, you would need to have a ruby environment and a showoff.io account and type:

> gem install showoff-io
> show 8000

share this URL: 
https://youraccountname.showoff.io

(It would ask for your password after typing show 8000.)

Then your friend could visit the URL showoff gives you.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you! proxylocal did the job :)
Ben: I met the same problem, but What's the reason we need port forwarding in a localmachine?
Kit: To get around firewalls that block incoming traffic.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.