palette/nixos/firewall.nix
George Kaklamanos e0e32ffc84
Add firewall and kanata configuration
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
2024-04-28 22:17:48 +03:00

40 lines
583 B
Nix

{
config,
lib,
pkgs,
...
}: {
networking.firewall = {
enable = true;
# https://docs.syncthing.net/users/firewall.html
allowedTCPPorts = [
# Syncthing
8384
22000
];
allowedUDPPorts = [
# Syncthing
22000
21027
];
allowedTCPPortRanges = [
# KDE Connect
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
# KDE Connect
{
from = 1714;
to = 1764;
}
# Mosh
{
from = 60000;
to = 61000;
}
];
};
}