The sshGeoBlocker bash script uses geoiplookup to get the location of an IP address from a MaxMind GeoLite2 database. Combining this script with a fail2ban sshd jail, IP addresses can be blocked after a certain number of unsuccessful connection attempts.
Python script to update DNS ecords managed by Digital Ocean. This might be useful for home servers with dynamic IP addresses.
An introduction on how to use fail2ban to protect nginx against bots and brute-force attacks.
DigitalOcean is an excellent service provider. Focal Fossa is an easy-to-use Linux distribution. This is a quick introduction on how to securely set up a server on Digital Ocean.