NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.79k stars 13.9k forks source link

unifi module doesn't open port 6789 #55377

Closed lilyball closed 5 years ago

lilyball commented 5 years ago

Issue description

nixos/modules/services/networking/unifi.nix opens most of the ports required for the Unifi controller, except it's missing port 6789, which is used for the UniFi mobile speed test.

/cc @erictapen

erictapen commented 5 years ago

Hey @lilyball, I took the maintainership for unifi only recently, so could you elaborate on what the UniFi mobile speed test is? I can't find good info about that on UBNT's support site.

services.unifi.openPorts includes only the minimum required ports. Depending on wether 6789 is strictly required for operation, I'd add it there or if not, it could be mentioned in the doc of openPorts, as 8443 is.

lilyball commented 5 years ago

The UniFi iOS app has 2 features that rely on this port. The first is the WiFi Throughput test and the second is the Heatmap overlay.

IMO all L3 ports should be opened except for 8443, and the only reason to exclude 8443 by default is because the operator may wish to configure a server on port 443 to proxy the unifi controller (which is exactly what I’m doing, using caddy), which would make port 8443 redundant. But the other ports (including 6789) don’t have the potential for being proxied like the web GUI does.

erictapen commented 5 years ago

Thanks for elaborating, I think that makes sense.

Would you mind to provide a PR to add 6789 to the open ports? If yes I can do it as well.

lilyball commented 5 years ago

PR submitted as #55416. Untested, but this change is pretty safe.