The server had been sporadic over the weekend because of the attacks. I had not been able to load the forum since around 5pm (sunday night) others said it was working fine.. It had been taking 30 seconds or more to load sporadically before that . So as to who and who could not get on I have no idea.. I could not do anything until I got home about 7pm.. Just spent almost 4 hours solving the issues.
I had trouble even logging into the server terminal as I kept getting connection timed out.. Even when I did eventually login it was taking about two minutes for every keypress to register in the terminal.. I could not connect via FTP to download the logs.. So it took an incredibly long time to shut down services and get the logs to figure out what was going on.
It seems there was a lot of unfortunate sequence of events in all this.. fail2ban had such a large list of blocked IPs, that the blocked time had elapsed and it was trying to unban them all.. While at the same time trying to add hundreds of thousands of IP's from the abuse database, while also trying to block hundreds of thousands of IP is attacking the server at the same time..
The abuse block list generally gives around 300 ips every 3 hours, and it was jumping to more like 200,000 , so it wasn't just us being hit as those IPs would have had to be hitting 100's of other servers as well...
Now I know that iptables sucks. I timed it and it was only processing five IPs per second :roll: apparently it rebuilds the entire lot every time something is changed which was starting to cause a huge slowdown server. Basically the whole lot ground to halt :roll:
So GPT to the rescue in figuring out how to solve all these problems and writing new scripts and code for me to implement. Now instead of things taking literally hours to update they are done in literally seconds now.
Things should run a lot quicker and be more responsive now in general. I have seen a massive speedbump here.
Fail2ban is currently catching up with itself and should settle down over the next few hours.. There is basically...
Capture.PNG
187,604 IPs which were hitting us.. Actually a lot more as they were being reported and removed from the list in real time. But it was fighting a losing battle at that point. They will be reported to abuseipdb but I can only report a few thousand a day.. So could take a while for all that to clear out.
I think what might have happened is China have realised everyone is blocking them now when they are using proxies all over the world... I have been getting huge traffic from like Brazil, India mobile networks, Pakistan, Iraq.. and well you get the idea..
Should now be solved anyway :hide: Will have a look at it all again in the morning to make sure everything is functioning as expected.. We shall be a lot faster processing all the IPs now..So hopefully this problem will not happen again...