nixos-config/nixos/system/desktop/sshd.nix
2021-09-25 20:28:25 +02:00

6 lines
256 B
Nix

{ config, ... }: {
# make sure ssh is only available trough the tinc
networking.firewall.extraCommands = ''
iptables --table nat --append PREROUTING ! --in-interface tinc.+ --protocol tcp --match tcp --dport 22 --jump REDIRECT --to-ports 0
'';
}