tangled
alpha
login
or
join now
devins.page
/
flake
0
fork
atom
configurations for my servers and desktops
nix
nixos
flake
dots
dotfiles
0
fork
atom
overview
issues
pulls
pipelines
fix: forward ssh
devins.page
1 month ago
fbf51eb2
906b8528
+15
-1
1 changed file
expand all
collapse all
unified
split
hosts
bluepill-proxy
modules
socat.nix
+15
-1
hosts/bluepill-proxy/modules/socat.nix
···
1
1
{pkgs, ...}: {
2
2
networking.firewall = {
3
3
enable = true;
4
4
-
allowedTCPPorts = [25565 23343];
4
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
86
+
Restart = "always";
87
87
+
User = "nobody";
88
88
+
StandardOutput = "journal";
89
89
+
StandardError = "journal";
90
90
+
};
91
91
+
wantedBy = ["multi-user.target"];
92
92
+
};
93
93
+
94
94
+
systemd.services.ssh-tcp-22 = {
95
95
+
description = "SSH TCP 22 forward";
96
96
+
wants = ["network-online.target"];
97
97
+
after = ["network-online.target"];
98
98
+
serviceConfig = {
99
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";