Set Cloudflare WAF rules with Fail2Ban actions

Cloudflare offers API access to it’s WAF IP access rules, which can be a great tool to ban bots on a “edge” level, reducing load on each instance. So once a server bans an IP for repeatedly failing auth, it will be blocked on the CF level, unable to bother other servers. My old script…

Get an Email notification for successful SSH logins

This is an email alert that is triggered once a SSH login succeeds First we will create the script itself in the ssh folder /etc/ssh/login-notify.sh: Make the file executable, then add the following line to the end of the sshd pam file in /etc/pam.d/sshd It’s set to optional for testing, as it would prevent login…