Add Gitea container configuration and update firewall rules for access
This commit is contained in:
@@ -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";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user