configurations for my servers and desktops
nix nixos flake dots dotfiles

fix: forward ssh

+15 -1
+15 -1
hosts/bluepill-proxy/modules/socat.nix
··· 1 1 {pkgs, ...}: { 2 2 networking.firewall = { 3 3 enable = true; 4 - allowedTCPPorts = [25565 23343]; 4 + allowedTCPPorts = [22 25565 23343]; 5 5 allowedUDPPorts = [25565 23343 24454 22232]; 6 6 }; 7 7 ··· 83 83 after = ["network-online.target"]; 84 84 serviceConfig = { 85 85 ExecStart = "${pkgs.socat}/bin/socat UDP-LISTEN:22232,reuseaddr,fork UDP:100.108.47.83:22232"; 86 + Restart = "always"; 87 + User = "nobody"; 88 + StandardOutput = "journal"; 89 + StandardError = "journal"; 90 + }; 91 + wantedBy = ["multi-user.target"]; 92 + }; 93 + 94 + systemd.services.ssh-tcp-22 = { 95 + description = "SSH TCP 22 forward"; 96 + wants = ["network-online.target"]; 97 + after = ["network-online.target"]; 98 + serviceConfig = { 99 + ExecStart = "${pkgs.socat}/bin/socat TCP-LISTEN:22,reuseaddr,fork TCP:100.108.47.83:22"; 86 100 Restart = "always"; 87 101 User = "nobody"; 88 102 StandardOutput = "journal";