Comment on How to harden against SSH brute-forcing?

sugar_in_your_tea@sh.itjust.works ⁨1⁩ ⁨week⁩ ago

One of the simplest is geoip blocks. Here’s an article using iptables, and there may be a nicer way w/ whatever firewall you’re using.

For reference, here are the areas I see in your logs (using this service):

If you don’t expect valid users to come from those areas, block them. A lot of those in the US are probably from VPN users, so be careful if people are using a VPN to connect to your services.

If you can do it w/ iptables, it’ll be a lot more efficient than doing it at the application layer. I also recommend using something like fail2ban to block individual IPs within regions you care about to get any stragglers that make it through the first tier of blocks.

source
Sort:hotnewtop