I run my weblog on my server, both out of hobby and because it gives me complete control over the underlying operating system, available software and security mechanisms. As a result, I see all that goes on with this machine, both good and bad.
Since October 24th, the server has been on the receiving end of repeated SSH brute force attacks, meaning an automated process attempting to guess the password of often existing user accounts on servers. Think accounts like “staff”, “root”, or “postmaster”.
Since none of the mentioned accounts exist and/or are not able to login through SSH, these attacks are doomed to fail. The attacks are also rather noisy, meaning they are easy to detect and ward off. They fill up the logs rather quickly with lines like this:
Oct 28 10:10:58 beris sshd: Failed password for invalid user soporte from 220.127.116.11 port 28568 ssh2
The server is set up to detect and automatically drop connections from hosts after a series of failed logins so SSH brute force attacks are not a cause of much concern. Since the hosts seem to come from a fairly limited set of networks, I got tired of seeing them though. I’ve added the following repeat offenders to the site-wide blacklist, meaning all connection attempts coming from these networks will be unsuccessful:
18.104.22.168/19 22.214.171.124/24 126.96.36.199/14 188.8.131.52/24 184.108.40.206/24 220.127.116.11/29 18.104.22.168/17 22.214.171.124/16 126.96.36.199/24 188.8.131.52/23 190.95.160/19 184.108.40.206/16 220.127.116.11/29 18.104.22.168/12 177.22.192/20 22.214.171.124/11 126.96.36.199/16 188.8.131.52/16 184.108.40.206/12 220.127.116.11/22
I apologize to legitimate users of these networks who may wish to use resources on this server but please do not complain to me, complain to your ISP so they get their act together and tackle the people abusing their infrastructure.
As always, the full blacklist, compiled from various sources and updated every 24 hours, can be downloaded here. Using the list in your firewall or other defence mechanism can help you defend against various attacks, not just SSH brute force attacks but also spam runs, etc.