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

does not respect host argument to forkServer #11

Closed
zsol opened this issue Jan 11, 2013 · 6 comments
Closed

does not respect host argument to forkServer #11

zsol opened this issue Jan 11, 2013 · 6 comments

Comments

@zsol
Copy link

zsol commented Jan 11, 2013

When I tell it to listen on localhost like here, it still listens on all available interfaces:

tcp        0      0 0.0.0.0:1030            0.0.0.0:*               LISTEN      4222/hlogster 

(output of netstat -tnpl)

I do realize this is probably a bug in Snap, just thought you should know.

@tibbe
Copy link
Collaborator

tibbe commented Jan 14, 2013

Reported upstream: snapframework/snap-server#32

@tibbe tibbe closed this as completed Jan 14, 2013
@gregorycollins
Copy link

Upstream helpfully writes:

The function you're looking for is called setBind (http://hackage.haskell.org/packages/archive/snap-server/0.9.2.4/doc/html/Snap-Http-Server-Config.html#v:setBind) which sets the bind address for the socket. The setHostname function just tells Snap what to use for the local hostname in the event that an HTTP/1.0 request comes in without a Host: header.

@tibbe
Copy link
Collaborator

tibbe commented Jan 15, 2013

@gregorycollins I tried setBind "localhost" and that fails with:

Error on startup: 
getAddrInfo: does not exist (nodename nor servname provided, or not known)
Basic: getAddrInfo: does not exist (nodename nor servname provided, or not known)

setBind is not documented. What does it accept?

@gregorycollins
Copy link

IP address or "*".

@tibbe
Copy link
Collaborator

tibbe commented Jan 15, 2013

This makes this a bit more complicated. We could try to do a name lookup in ekg and then pass the IP-address to Snap. I wonder if it's the right place to handle the issue though.

@tibbe
Copy link
Collaborator

tibbe commented Feb 22, 2013

I intend to work around the Snap issue in ekg, as it's important for security to be able to only listen on localhost.

@tibbe tibbe reopened this Feb 22, 2013
@tibbe tibbe closed this as completed in 050c472 Feb 22, 2013
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

3 participants