› VitalPBX Community Support › General Discussion › Fail to ban › Reply To: RE: Fail to ban
-
- January 11, 2019 at 10:49 am
well, struggling with this issue since ombutel, following script helps out, I know it is not the best solution, but I cronjob it every 6 hours and it helps. Since it is mostly the fail2ban database getting corrupted.
F2Blog=”/var/log/fail2ban.log”
F2Bdb=”/var/lib/fail2ban/fail2ban.sqlite3″# Now let us clean up
echo “Stopping Fail2Ban Service”
sudo service fail2ban stop
echo “Truncating Fail2Ban Log File”
sudo truncate -s 0 $F2Blog
echo “Deleting Fail2Ban SQLite Database”
sudo rm $F2Bdb
echo “Restarting Fail2Ban Service”
sudo service fail2ban restart
echo “All Done”0