如何阻止和识别针对 MySQL 的 DDoS 攻击?

问题描述 投票:0回答:0

几天以来我的服务器上一直在进行暴力攻击,我遇到了问题。发生的事情是,大约一周前,mariadb 开始占用 100% 的 cpu 几分钟,直到它崩溃。崩溃后我无法用

systemctl restart mariadb
重启它,我需要重启服务器。

在 /var/log/mysql 中,我看到了数百个此类错误,这些错误可追溯到 c.a.一周前:

2022-06-11 16:30:46 225427 [Warning] Access denied for user 'shopdb'@'localhost' (using password: YES)
2022-06-11 16:30:47 225429 [Warning] Access denied for user 'dbs'@'localhost' (using password: YES)
2022-06-11 16:30:47 225432 [Warning] Access denied for user 'root'@'localhost'

大部分是root用户Access denied,但也有少数其他用户如“username_here”等

几天后的日志停止显示

Access denied
错误,而仅在崩溃后显示这些错误:

2022-08-04 13:33:28 2453 [Warning] Aborted connection 2453 to db: 'real_database_name' user: 'real_username' host: 'localhost' (Got an error reading communication packets)

因此我预计每天都会发生 DDoS 攻击,可能针对服务器上托管的几个 Wordpress 网站。

我想问几个问题: a) 我不再看到

Access denied
错误的事实是否意味着数据库已被破坏? b) 如何识别和阻止这些 DDoS 攻击?有没有我可以使用的开源软件? c) 我如何识别它是什么类型的攻击以及查询来自何处?

非常感谢!

mysql mariadb ddos
© www.soinside.com 2019 - 2024. All rights reserved.