irc-slack-echo icon indicating copy to clipboard operation
irc-slack-echo copied to clipboard

Default bind interface and port

Open gboudreau opened this issue 10 years ago • 3 comments

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.)

gboudreau avatar May 28 '14 17:05 gboudreau

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

rknLA avatar May 28 '14 18:05 rknLA

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 avatar May 28 '14 18:05 gboudreau

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.

gboudreau avatar May 28 '14 18:05 gboudreau