refactor(firewall): Make services responsible for opening ports
This commit is contained in:
parent
f2ef91672b
commit
86a8df5004
9 changed files with 63 additions and 39 deletions
|
|
@ -17,6 +17,36 @@ in
|
|||
./matrix-hookshot.nix
|
||||
];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
# These are for "normal" clients
|
||||
80
|
||||
443
|
||||
|
||||
# Federation happens on 8448
|
||||
8448
|
||||
|
||||
config.services.coturn.listening-port
|
||||
config.services.coturn.tls-listening-port
|
||||
config.services.coturn.alt-listening-port
|
||||
config.services.coturn.alt-tls-listening-port
|
||||
];
|
||||
|
||||
allowedUDPPorts = [
|
||||
config.services.coturn.listening-port
|
||||
config.services.coturn.tls-listening-port
|
||||
config.services.coturn.alt-listening-port
|
||||
config.services.coturn.alt-tls-listening-port
|
||||
];
|
||||
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = config.services.coturn.min-port;
|
||||
to = config.services.coturn.max-port;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
matrix-conduit = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue