Closed clochix closed 8 years ago
Hi @clochix,
NB: the title is misleading. Your text doesn't cover the port number but the fact it is binded to localhost.
Hi @frankrousseau,
oups, fixed the title of the ticket. I opened this issue as a follow-up of a discussion we started with @nono, after a user asked why was our proxy listening on public interface. Seems like there are two legit use case:
The binding interface is set in the controller and in the controller.json
configuration file. Maybe could we use this file to have different default values for self-hosted users.
If it's already an option, properly documenting it should be enough. Self-hosted users probably prefer to deploy Cozy in a dedicated container or virtual machine. So the current default value is ok.
For specific cases, like the Raspberry Pi image, we could change this value.
Another user is asking how to make the proxy listen on the local interface. @nono can you confirm that the corresponding syntax in /etc/cozy/controller.json
is:
"env": {
"proxy": {
"HOST": "127.0.0.1"
}
}
No, it is:
{
"bind_ip_proxy": "127.0.0.1"
}
And the configuration file is described here: https://github.com/cozy/cozy-controller/blob/master/doc/config.md
Thanks @nono.
I think we can now close this issue, feel free to re-open it if you think it needs more work.
For now, broxy listen by default on public interface: https://github.com/cozy/cozy-controller/blob/master/server/lib/conf.coffee#L14
This allows to use a reverse proxy hosted on another server.
But this means this port stay open for self-hosted users that don't use a firewall (Is this really a security issue? I don't think so. But it allows to connect to cozy-proxy without TLS). See for example this thread.
Should we update the default to the local interface?
Ping @nledez @nono @poupotte