Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default bind interface and port #10

Open
gboudreau opened this issue May 28, 2014 · 3 comments
Open

Default bind interface and port #10

gboudreau opened this issue May 28, 2014 · 3 comments

Comments

@gboudreau
Copy link

The default config is using 666 as the port; doesn't that require root/sudo privilege? I suggest using another example port instead.

Also, why is Hapi.Server binding to localhost? I had to change that to 0.0.0.0 in slack.js in order to be able to access that web server from outside.

(I can submit a pull request; just wanted to discuss those before I did.)

@rknLA
Copy link
Owner

rknLA commented May 28, 2014

The default config is using 666 as the port; doesn't that require root/sudo privilege? I suggest using another example port instead.

I suppose that's fair. I was intending that to be a comically obvious "change me" value, but using something that actually works probably makes more sense.

Also, why is Hapi.Server binding to localhost? I had to change that to 0.0.0.0 in slack.js in order to be able to access that web server from outside.

Can you elaborate a bit on this? Maybe you're experiencing the same thing mentioned in #4? I was running this on a digital ocean box, so running the Hapi server on localhost worked for me... which, maybe says something about the security of the box I'm running on? :X

@gboudreau
Copy link
Author

Hapi.Server('localhost', ...) actually binds to the specified port, but only on the localhost interface. That means this node HTTP server will not be accessible to remote hosts on most servers. Using 0.0.0.0 instead of localhost will actually bind to all network interfaces, and thus work for everyone.

@gboudreau
Copy link
Author

And yes, this is actually the same issue as #4. The interface used to access an Heroku server is not localhost, thus why using 0.0.0.0 fixes this issue on Heroku too.

dannon pushed a commit to dannon/irc-slack-echo-fork that referenced this issue Aug 31, 2014
dannon pushed a commit to dannon/irc-slack-echo-fork that referenced this issue Sep 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants