-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Portunus doesn't just listen on localhost in NixOS #221678
Comments
Here is the proposed new documentation for that change:
|
Not in the NixOS default configuration where the firewall closes the port. Nevertheless we should change it to localohost as done in #221684
and afaik they need to listen on everything because we don't proxy them. |
is it bad practice to have a central nginx server that handles tls traffic? Right now it seems I need to have nginx listening on the local portunus machine and forward the traffic from my central tls termination proxy. Is double layer nginx the best way to go here? is there a way to allow portunus to listen on its LAN interface instead of just localhost? |
I guess it would depend on how well you trusted that LAN. I'm no longer trying to use Portunus, but I believe you will need to adjust:
to setup the environment to launch Portunus as you see fit for your architecture. It is currently hardcoded as:
See portunus.nix. We had different PRs on how to fix this issue, and there wasn't really any discussion on the fix, so I don't know if anyone objects to exposing the option. Perhaps you should lobby for exposing a configuration option or create a PR. |
The option
services.portunus.port
is described as:Declared in: nixos/modules/services/misc/portunus.nix
But this is inaccurate, it listens on *:8080, which is a potential security issue.
NOTE: I haven't looked at the ldap sockets in this issue, but there they are too.
I've patched the module to try
[::]:8080
,[::1]:8080
,localhost:8080
, and127.0.0.1:8080
for the value ofPORTUNUS_SERVER_HTTP_LISTEN
. Here are the results tested with an http client and with ss:My /etc/hosts maps both127.0.0.1 and ::1 to localhost, so the documented behavior seems impossible. Unless there is a valid notation which captures both loopbacks (please advise), I'll use
::1
in the PR, which is the unique IPv6 loopback, and change the documentation to suit.Notify maintainers
@majewsky, @SuperSandro2000, take a look. I'll close the issue on the Portunus site, since the problem is here in nixpkgs.
The text was updated successfully, but these errors were encountered: