linux扫网站目录,Linux下CSF防火墙阻止恶意网站目录/文件扫描

78b8a7d3add80c1784c3765bcb2e8488.png

如图,有时候我们检查Apache日记的时候会发现大量这样的单IP或多IP在短时间内请求大量不存在的目录/文件,Apache返回404状态,这不仅消耗服务器资源还可能有安全隐患。我们可以通过CSF防火墙解决,CSF可以根据返回状态次数来屏蔽请求IP访问,相关设置和说明:

# This option will keep track of the number of "File does not exist" errors in

# HTACCESS_LOG. If the number of hits is more than LF_APACHE_404 in LF_INTERVAL

# seconds then the IP address will be blocked

#

# Care should be used with this option as it could generate many

# false-positives, especially Search Bots (use csf.rignore to ignore such bots)

# so only use this option if you know you are under this type of attack

#

# A sensible setting for this would be quite high, perhaps 200

#

# To disable set to "0"

LF_APACHE_404 = "200"

# If this option is set to 1 the blocks will be permanent

# If this option is > 1, the blocks will be temporary for the specified number

# of seconds

LF_APACHE_404_PERM = "3600"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值