› VitalPBX Community Support › General Discussion › Fail to ban › Reply To: RE: Fail to ban
-
- April 24, 2019 at 12:52 pm
Posted by: dsmagghewell, 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”Thank you for this tip. Fixed issue I was having with one of my VPS’s…. fail2ban was consuming 95-100% cpu for no reason. I’ll keep eye on it for next few days.
0