Skip to content

Instantly share code, notes, and snippets.

@idflorin
idflorin / jail.local
Last active January 24, 2024 17:32 — forked from dale3h/jail.local
[fail2ban] Improved nginx-badbots
# Add to file: /etc/fail2ban/jail.local
[nginx-badbots]
enabled = true
port = http,https
filter = nginx-badbots
logpath = %(nginx_access_log)s
maxretry = 1
findtime = 604800
bantime = 604800
@idflorin
idflorin / aaPanel cron job for email server on Debian 10
Last active January 18, 2024 02:33
Cron job for aapanel check systemctl status dovecot rspamd postfix telegram
#!/bin/bash
SERVICE="dovecot"
if (systemctl is-active -q $SERVICE)
then
echo "$SERVICE is running"
# curl -s "https://api.telegram.org/bot5233333629:AXDDDDDDDxqVTr_SWhh8SGo/sendMessage?chat_id=17522222222208&text='$SERVICE is running'"
else
# echo "$SERVICE stopped"
curl -s "https://api.telegram.org/bot5233333629:AXDDDDDDDxqVTr_SWhh8SGo/sendMessage?chat_id=17522222222208&text='$SERVICE 193.187.129.202:31202/b066ea5s6m202 stopped!!!'"
# uncomment to start rspamd if stopped