Allow ssh on port 2222

This commit is contained in:
Greg Hellings
2024-05-04 01:55:44 +00:00
parent 4cd66ec1b5
commit 86a909a0ae
+6 -6
View File
@@ -2,6 +2,7 @@
let let
srcDomain = "src.thehellings.com"; srcDomain = "src.thehellings.com";
sshPort = 2222;
in { in {
greg.proxies."${srcDomain}" = { greg.proxies."${srcDomain}" = {
target = "http://git.thehellings.lan"; target = "http://git.thehellings.lan";
@@ -19,6 +20,8 @@ in {
extraConfig = "client_max_body_size 250m;"; extraConfig = "client_max_body_size 250m;";
}; };
networking.firewall.allowedTCPPorts = [ sshPort ];
services.haproxy = { services.haproxy = {
enable = true; enable = true;
config = builtins.concatStringsSep "\n" [ config = builtins.concatStringsSep "\n" [
@@ -31,14 +34,11 @@ in {
" timeout client 500s" " timeout client 500s"
" timeout server 1h" " timeout server 1h"
"frontend gitsshd" "listen gitsshd"
" bind *:2222" " bind *:${toString sshPort}"
" default_backend gitssh"
" timeout client 1h" " timeout client 1h"
"backend gitssh"
" mode tcp" " mode tcp"
" server git-thehellings-lan git.thehellings.lan:2222" " server git-thehellings-lan git.thehellings.lan:22"
]; ];
}; };
} }