Add Gitea container configuration and update firewall rules for access

This commit is contained in:
2025-12-15 09:46:14 +01:00
parent b92ccc8360
commit cdf71a5ded
2 changed files with 49 additions and 1 deletions
+25
View File
@@ -37,6 +37,11 @@
reverse_proxy 10.202.82.30:8123
'';
};
"git.home.lindenfelser.de" = {
extraConfig = ''
reverse_proxy 10.202.82.6:3000
'';
};
};
};
@@ -49,9 +54,29 @@
22 # SSH
80 # HTTP (Caddy)
443 # HTTPS (Caddy)
2222 # External SSH to Gitea
];
networking.firewall.allowedUDPPorts = [
53 # DNS (AdGuardHome)
];
########################################
# NAT / Port Forwarding
########################################
networking.nat = {
enable = true;
externalInterface = "ens18";
# Hairpin NAT for LAN clients hitting gateway:2222 so replies go back via gateway
extraCommands = ''
iptables -t nat -A POSTROUTING -p tcp -d 10.202.82.6 --dport 2222 -j MASQUERADE
'';
forwardPorts = [
{
proto = "tcp";
sourcePort = 2222;
destination = "10.202.82.6:2222";
}
];
};
}