Over the last few days, we've experienced nearly 100% CPU load on a daily basis. Throughout the day there are hundreds of
LF_MODSEC Log
top (there are hundreds of these processes/commands)
csf
and lfd
processes running, all of which are to block IP addresses from brute force attempts to our website's admin page. There are also hundreds of mysqld
and httpd
processes which are related to the login/database attempts. What can we do to bring down the CPU load? The number of tasks running has never been this high. It's now anywhere from 200 - 600 tasks. CSF and cPhulk are configured to block these attacks, but there are far too many that it's overloading the server and regular tasks (e.g. sending/receiving email from server) are nearly impossible.LF_MODSEC Log
Code:
[Tue Apr 26 07:25:21.273168 2022] [:error] [pid 11162] [client 173.249.19.246:59052] [client 173.249.19.246] ModSecurity: Access denied with code 406 (phase 1).
Pattern match "Mozilla/5.0 \\\\(X11; Ubuntu; Linux x86_64; rv:62\\\\.0\\\\) Gecko\\\\/20100101 Firefox\\\\/62\\\\.0" at REQUEST_HEADERS:User-Agent.
[file "/etc/apache2/conf.d/modsec/modsec2.user.conf"] [line "1"] [id "91996789"] [msg "BAD UA BLOCK"] [hostname "mydomain.com"]
[uri "/admin/"] [unique_id "YmfWoRM2Fjtq6jMg5hEDNgAAAAw"]
Code:
Tasks: 329 total, 2 running, 323 sleeping, 1 stopped, 3 zombie
%Cpu(s): 70.8 us, 18.4 sy, 0.0 ni, 0.0 id, 9.5 wa, 0.0 hi, 1.3 si, 0.0 st
KiB Mem : 3880140 total, 545588 free, 1364884 used, 1969668 buff/cache
KiB Swap: 4194300 total, 3958600 free, 235700 used. 2191960 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30930 root 20 0 179440 30608 2824 S 14.6 0.8 0:00.43 csf
30926 root 20 0 179280 30420 2820 S 14.2 0.8 0:00.42 csf
30931 root 20 0 179284 30412 2820 S 14.2 0.8 0:00.42 csf
30932 root 20 0 179280 30484 2820 S 14.2 0.8 0:00.42 csf
30925 root 20 0 179132 30388 2820 S 13.9 0.8 0:00.41 csf
30928 root 20 0 179132 30408 2820 S 13.6 0.8 0:00.40 csf
30929 root 20 0 179136 30420 2820 S 13.6 0.8 0:00.40 csf
30934 root 20 0 179136 30392 2820 R 13.6 0.8 0:00.40 csf
30935 root 20 0 179136 30420 2820 R 13.6 0.8 0:00.40 csf
30927 root 20 0 179000 30052 2820 R 13.2 0.8 0:00.39 csf
30936 root 20 0 178212 29304 2816 R 12.9 0.8 0:00.38 csf
30937 root 20 0 178340 29528 2820 R 12.9 0.8 0:00.38 csf
30933 root 20 0 173964 27292 2800 R 11.9 0.7 0:00.35 csf
22275 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 148.202.167.75
23194 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 38.135.34.49
23196 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 138.97.220.166
23198 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 212.47.227.85
23356 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 163.172.53.199
23473 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 189.254.45.110
23930 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 91.238.161.177
24066 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 62.173.139.188
24181 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 178.32.202.97
24182 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 128.199.241.20
24185 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 178.128.151.87
24190 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 79.175.127.171
24340 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 45.80.153.73
24342 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 12.12.141.226
24344 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 212.7.211.113
24345 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 217.115.118.126
24348 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 79.172.201.113
24351 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 76.245.195.148
24434 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 51.178.185.66
24437 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 141.94.32.98
24438 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 178.128.55.40
24535 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 138.97.220.166
24699 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 202.29.148.67
24875 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 159.203.28.59
24877 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 31.173.68.7
24878 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 188.40.33.77
24879 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 203.23.49.192
24880 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 162.214.104.98
25106 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 43.229.77.90
25107 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 38.135.34.49
25109 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 178.62.213.36
25110 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 103.144.82.1
25111 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 207.180.213.165
25446 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 45.79.68.53
25447 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 47.88.23.114
25448 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 139.59.68.9
25449 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 46.101.188.174
25450 root 20 0 188452 35236 896 S 0.0 0.9 0:00.01 lfd - (child) blocking 207.180.236.152
25451 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 203.210.87.64
25837 root 20 0 188452 35236 896 S 0.0 0.9 0:00.02 lfd - (child) blocking 76.103.114.159
25935 root 20 0 188452 35236 896 S 0.7 0.9 0:00.02 lfd - (child) blocking 180.242.130.79
25939 root 20 0 188452 35236 896 S 0.3 0.9 0:00.01 lfd - (child) blocking 103.41.204.29
25940 root 20 0 188452 35236 896 S 0.3 0.9 0:00.01 lfd - (child) blocking 138.201.142.73
25941 root 20 0 188452 35236 896 S 0.3 0.9 0:00.01 lfd - (child) blocking 182.70.248.147
25944 root 20 0 188452 35236 896 S 0.3 0.9 0:00.01 lfd - (child) blocking 178.128.155.255
25946 root 20 0 188452 35236 896 S 0.3 0.9 0:00.01 lfd - (child) blocking 51.79.248.189
25948 root 20 0 188452 35236 896 S 0.3 0.9 0:00.01 lfd - (child) blocking 92.205.25.196
21206 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 178.128.150.247
23352 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 213.187.11.93
23688 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 185.21.217.56
23694 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 51.77.214.27
23923 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 185.148.3.93
24064 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 51.15.181.37
24697 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 145.131.25.246
24874 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 83.137.145.154
25103 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 12.12.141.226
25258 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 219.153.110.7
25259 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 68.183.175.58
25261 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 185.149.103.55
25445 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 196.41.123.124
25452 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 51.77.214.27
25639 root 20 0 188452 35232 892 S 0.0 0.9 0:00.02 lfd - (child) blocking 185.116.215.125
25727 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 190.105.205.100
25728 root 20 0 188452 35232 892 S 0.0 0.9 0:00.01 lfd - (child) blocking 51.178.136.52
1351 nobody 20 0 547088 22652 3624 S 0.3 0.6 0:00.13 httpd
3111 nobody 20 0 546820 21616 2900 S 0.3 0.6 0:00.09 httpd
3157 nobody 20 0 546820 21616 2900 S 0.3 0.6 0:00.09 httpd
Last edited by a moderator: