I got over 3k fail2ban emails

Posted June 8, 2016 3.5k views

Please advice on what to do next? all the attempting IPs are from different .
Should I just keep watching or what can i do to kill their attempts?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Well, fail2ban is killing their attempts. CSF would similarly block them as well.

For the sake of reducing log entires and emails, you may want to have SSH listen on a port other than 22.

You could edit your /etc/ssh/sshd_config file and change the Port line to be a different port, say like 9022. Most importantly, you’ll need to make sure your software firewall has this port open. Then you’ll want to restart the ssh process.

This will not make you more secure or make it impossible for someone to attempt to log into your server. It’s going to reduce the attempts making it easier to read through logs and email alerts.

@jschwenn thanks for the tip. I m still learning linux command.I have tried changing it on /etc/ssh/sshd_config but , many request like apache2 came up with error. likewise i dont know how many services do require that port. i had to turn off my ufw because eachtim its on, the website goes offline.
is there something I am actually supposed to watch for?

  • You’ll want to read more about ufw here (note that web/http would require port 80 to be open). You also want to use a text editor like nano or vi to change the config file. You can find more details about file management and editing with this article.

    by Justin Ellingwood
    If you are new to working with Linux systems, you may be overwhelmed by the prospect of controlling an operating system from the command line. In this guide, we will attempt to get you up to speed with the basics. This guide will not cover everything you need to know to effectively use a Linux system. However, it should give you a good jumping-off point for future exploration.