3 ms·
I agree with the sentiment. It would be more difficult to attack an SSH port when it's only accessible through an agreed upon Wireguard tunnel. However, if you
by accrual 3y ago
I agree with the sentiment. It would be more difficult to attack an SSH port when it's only accessible through an agreed upon Wireguard tunnel.
However, if you use pubkey and not password authentication, is there still any real risk? If I post to the public internet "my <hostname> is listening on port 22" and it's pubkey auth only, is anyone ever going to get in even if I allow unlimited bruteforce attempts? You'll have to steal my laptop to get the key, by which point you have my Wireguard config and keys as well.
Not at all to say defense in depth isn't worthwhile, of course it is, but I don't think ssh with pubkey is inherently vulnerable.
I use Wireguard and already implement the suggested topology. Just food for thought.
- hello_computer 3y agoCrypto-in-crypto seems kind of wasteful... Something like fail2ban would be preferable--block assholes from the entire network for hours (or days) so they can't hammer other ports for vulnerabilities. Between LocalForward and ProxyJump, I hardly ever need my WireGuard tunnel.
- ttyprintk 3y agoNothing against fail2ban, but with its RCE a few years ago, I wonder about simpler firewall rules: - If the IP has an established port 22 connection, pass any new connections - Otherwise, meter connections from each /24 to one per 21 seconds I think ControlMaster would keep this from gumming up Ansible too much?
- hello_computer 3y ago> RCE a few years ago If it's this one (https://nvd.nist.gov/vuln/detail/CVE-2021-32749 https://nvd.nist.gov/vuln/detail/CVE-2021-32749), I think that's kind of a reach--especially for the typical use case, which uses neither mail nor whois, and only adds an ephemeral block rule to the firewall. My beef with fail2ban is that it only checks logs on a (non-configurable) 1 second interval, which allows an attacker to make several attempts (> N) from the same IP in parallel inside of that second, even when the f2b configuration is set to block at the Nth failure.