fail2ban apachefakegooglebot failregex位置

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

我将failregex过滤器放在fail2ban中的什么位置?是否将其放在jail.local或其他地方?我正在运行ubuntu 18.04

    [apache-fakegooglebot]
enabled=true
filter=apache-fakegooglebot
port=http,https
logpath=%(apache_access_log)s
maxretry=1
banTime=360000
failregex=<whatever>
ignorecommand=%(ignorecommands_dir)s/apache-fakegooglebot <ip>
action_=%(banaction)s[name=%(__name__)s,bantime="%(bantime)s",port="%(port)s",protocol="%(protocol)s",chain="%(chain)s"]
ubuntu fail2ban
1个回答
0
投票

您需要在/etc/fail2ban/filter.d中创建apache-fakegooglebot.conf文件

# go to filter.d directory
cd /etc/fail2ban/filter.d

# create filter
sudo nano apache-fakegooglebot.conf

# add fail & ignore regex into the filter
failregex=<whatever>
ignoreregex=<whatever>

© www.soinside.com 2019 - 2024. All rights reserved.