详情页

wordpress 异常访问 wp-login.php?action=lostpassword 导致站点流量异常无法访问

时间:2024年04月27日

编辑:佚名

今早起来看了下博客的内容,发现站点打不开了,想想不对,昨天刚换好的服务器,怎么忽然就打不开了?ping 了一下服务器地址是通的,但是延迟非常高。随后 ssh 登录到服务器后查看站点的日志,发现有一个上海的 IP 大量的请求地址 wp-login.php?action=lostpassword,对 wordpress 的代码不是很了解,但看这个地址应该是一些暴力破解用着相关漏洞利用。
 
 通过日志可以看到是一个 210.52.224.* 的 IP 段,查了一些资料,在 /etc/rc.local 中添加整个 210.52.224.* 的 IP 段屏蔽他们的请求,随后站点恢复正常:
代码语言:javascript
复制
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
iptables -I INPUT -s 210.52.224.0/24 -j DROP
如果你也遇到类似问题,在文件末尾像我一样增加这个 IP 段,然后重启服务器就可以屏蔽他的连接了。
相关文章
猜你需要