一个WordPress搭建的虚拟主机网站被持续攻击,估计是某个菜鸟拿我的网站练手。
利用.htaccess文件屏蔽指定IP:
Order Deny,Allow
deny from 122.114.50.213
deny from 122.152.248.24
deny from 198.11.173.103
deny from 108.161.136.70
deny from 180.159.87.0
deny from 49.64.248.119
deny from 132.232.138.144
deny from 117.136.38.47
deny from 121.237.232.98
deny from 42.236.10.105
deny from 42.236.10.104
deny from 223.255.127.32
deny from 182.200.123.33
deny from 42.236.10.70
deny from 42.236.10.74
deny from 39.176.7.68
deny from 47.75.173.133
deny from 113.23.33.239
deny from 180.159.87.0
deny from 49.64.248.119
deny from 132.232.138.144
deny from 117.136.38.47
deny from 121.237.232.98
deny from 42.236.10.105
deny from 42.236.10.104
deny from 223.255.127.32
deny from 182.200.123.33
deny from 42.236.10.70
deny from 42.236.10.74
deny from 39.176.7.68
deny from 223.104.1.19
deny from 117.136.61.17
deny from 117.136.61
deny from 182.97.29.127
deny from 117.136.85.91
deny from 39.130.33.141
deny from 39.176.7.68
deny from 180.159.87.0
deny from 117.136.95.159
deny from 121.42.138.121
deny from 114.239.15.76
deny from 180.159.87.0
deny from 183.240.196.82
deny from 223.99.20.6
deny from 220.243.136.41
Allow from all
攻击的IP来源是腾讯云、阿里云机房。
屏蔽某个IP段,可使用:
deny from 42.236.10.0/24
或
deny from 42.236
请注意Order Deny,Allow 所以先写deny的部分,再写allow才可以。