Possible to firewall block port 22 while still enabling SSH on port 22

https://nixos.org/manual/nixos/stable/#sec-firewall

The manual states that port 22 will automatically open if sshd is enabled.

Because I’m using tailscale which works around the firewall, I’d like to block port 22 publicly.

How do I block port 22 without having to change the SSH port to something non-standard?

You set services.openssh.openFirewall to false

1 Like