ssh nixdesk on public port 2050 prob doesnt work
This commit is contained in:
parent
d9b2f62abc
commit
829630944f
2 changed files with 18 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
./profiles/wireguard.nix
|
./profiles/wireguard.nix
|
||||||
./profiles/restic-server.nix
|
./profiles/restic-server.nix
|
||||||
./profiles/autologin.nix
|
./profiles/autologin.nix
|
||||||
|
./profiles/ssh-public-port-2050.nix
|
||||||
|
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
|
|
|
||||||
17
hosts/nixdesk/profiles/ssh-public-port-2050.nix
Normal file
17
hosts/nixdesk/profiles/ssh-public-port-2050.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
# services.openssh.ports = [22 2050];
|
||||||
|
systemd.services.port2050-natpmp = {
|
||||||
|
bindsTo = ["sshd"]; # might not work
|
||||||
|
confinement = {
|
||||||
|
enable = true;
|
||||||
|
mode = "chroot-only";
|
||||||
|
};
|
||||||
|
serviceConfig.ExecStart = ''
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
${pkgs.libnatpmp}/bin/natpmpc -a 2050 22 tcp 60
|
||||||
|
sleep 30
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue