summaryrefslogtreecommitdiff
path: root/nixos/hosts/apocalypse/firewall.nix
diff options
context:
space:
mode:
authorJakub Stachurski <j.stachurski@student.utwente.nl>2025-05-08 23:29:41 +0200
committerJakub Stachurski <j.stachurski@student.utwente.nl>2025-05-08 23:32:32 +0200
commitb97209171ce216d3f31ed42856c5d5d95c808025 (patch)
tree68d6064967e4d5fb2244b4072c7e0b39d11e1cf3 /nixos/hosts/apocalypse/firewall.nix
parent40f6e567cd1c8bd893d92b40487571847799c647 (diff)
openssh and firewall changes
Diffstat (limited to 'nixos/hosts/apocalypse/firewall.nix')
-rw-r--r--nixos/hosts/apocalypse/firewall.nix31
1 files changed, 17 insertions, 14 deletions
diff --git a/nixos/hosts/apocalypse/firewall.nix b/nixos/hosts/apocalypse/firewall.nix
index 2068d55..b2c17af 100644
--- a/nixos/hosts/apocalypse/firewall.nix
+++ b/nixos/hosts/apocalypse/firewall.nix
@@ -1,9 +1,11 @@
{pkgs, config, ...}:
let
baseTCP = [
-
+ 22000 # Syncthng
];
baseUDP = [
+ 22000 # Syncthing
+ 22027 # Syncthing
16555 # Wireguard
];
baseTCPRanges = [
@@ -14,34 +16,35 @@ let
];
secureTCP = [
- 22 80 433 5900
- ] ++ baseTCP;
+ 22 80 433 5900 # SSH HTTP VNC
+ ];
secureUDP = [
-
- ] ++ baseUDP;
+ 5900
+ ];
secureTCPRanges = [
- ] ++ baseTCPRanges ;
+ ];
secureUDPRanges = [
- ] ++ baseUDPRanges;
+ ];
in
{
- networking.firewall {
+ networking.firewall = {
enable = true;
allowedTCPPorts = baseTCP;
allowedUDPPorts = baseUDP;
allowedUDPPortRanges = baseUDPRanges;
allowedTCPPortRanges = baseTCPRanges;
interfaces = {
- "wg0" = {
- allowedTCPPorts = secureTCP;
- allowedUDPorts = secureUDP;
- allowedUDPPortRanges = secureUDPRanges;
- allowedTCPPortRanges = secureTCPRanges;
- };
+ "nix-laptop" = {
+ allowedTCPPorts = secureTCP;
+ allowedUDPPorts = secureUDP;
+ allowedUDPPortRanges = secureUDPRanges;
+ allowedTCPPortRanges = secureTCPRanges;
+ };
+ };
};
}