# Fail2Ban for \[apache-botsearch\]

**URL:** <https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434>\
**Category:** Firewall\
**Created:** [November 6, 2026, 6:21pm UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434 "2026-11-06T18:21:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bosunjohnson](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/bosunjohnson/32/9581_2.png) [@bosunjohnson](https://forum.hestiacp.com/u/bosunjohnson)\
**Post date:** [November 6, 2026, 6:21pm UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434/1 "2026-11-06T18:21:55Z")

</div>

I’ve noticed the activities of some bad bots on my server in the last couple of weeks.

After doing some digging around and reading more about F2B, I added this to my jail.local file.

[apache-botsearch]  
enabled = true  
port = http,https  
logpath = %(apache\_error\_log)s  
maxretry = 2

After a few days, it does not seem to work, did I get the config wrong?

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [November 6, 2026, 11:27pm UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434/2 "2026-11-06T23:27:44Z")

</div>

> [@bosunjohnson](#):
>
> I added this to my jail.local file.
> 
> [apache-botsearch]  
> enabled = true  
> port = http,https  
> logpath = %(apache\_error\_log)s  
> maxretry = 2

If you want the correct conf to add to `jail.local` it should look like this:

```auto
[apache-botsearch]
enabled = true
filter = apache-botsearch
action = hestia[name=WEB]
logpath = /var/log/apache2/domains/*.log
maxretry = 2

```

And restart fail2ban `systemctl restart fail2ban` or reload it `fail2ban-client reload`

Anyway, I doubt that filter will work, it won’t detect anything.

> [@bosunjohnson](#):
>
> I’ve noticed the activities of some bad bots on my server in the last couple of weeks.

Could you please paste some of the logs you detected so I can see their format?

---

<div class="post-metadata">

**Author:** ![bosunjohnson](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/bosunjohnson/32/9581_2.png) [@bosunjohnson](https://forum.hestiacp.com/u/bosunjohnson)\
**Post date:** [November 7, 2026, 11:55am UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434/3 "2026-11-07T11:55:25Z")

</div>

```t
root@server:~# grep ' 404 ' /var/log/apache2/domains/domain.com.log | tail
34.24.229.227 - - [06/Nov/2026:14:01:11 +0000] "GET /key.json HTTP/1.1" 404 4653 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
34.24.229.227 - - [06/Nov/2026:14:01:11 +0000] "GET /keyfile.json HTTP/1.1" 404 4653 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
34.24.229.227 - - [06/Nov/2026:14:01:11 +0000] "GET /firebase-adminsdk.json HTTP/1.1" 404 4653 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
34.24.229.227 - - [06/Nov/2026:14:01:11 +0000] "GET /firebase-key.json HTTP/1.1" 404 4653 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
104.22.219.107 - - [06/Nov/2026:15:07:14 +0000] "GET /wp-admin/install.php?step=1 HTTP/1.1" 404 9639 "-" "http://domain.com/wp-admin/install.php?step=1"
172.71.164.74 - - [06/Nov/2026:17:15:13 +0000] "GET /wp-admin/install.php?step=1 HTTP/1.1" 404 9639 "-" "http://domain.com/wp-admin/install.php?step=1"
104.23.239.79 - - [06/Nov/2026:19:27:46 +0000] "GET /wp-admin/install.php?step=1 HTTP/1.1" 404 9639 "-" "http://domain.com/wp-admin/install.php?step=1"
221.178.143.70 - - [06/Nov/2026:20:59:31 +0000] "GET /favicon.ico HTTP/1.1" 404 9639 "-" "Dalvik/2.1.0 (Linux; U; Android 9.0; ZTE BA520 Build/MRA58K)"
104.23.217.167 - - [06/Nov/2026:21:36:35 +0000] "GET /wp-admin/install.php?step=1 HTTP/1.1" 404 9639 "-" "http://domain.com/wp-admin/install.php?step=1"
135.148.195.2 - - [06/Nov/2026:22:44:41 +0000] "GET /favicon.ico HTTP/1.1" 404 4653 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15"
root@server:~#

```

---

<div class="post-metadata">

**Author:** ![bosunjohnson](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/bosunjohnson/32/9581_2.png) [@bosunjohnson](https://forum.hestiacp.com/u/bosunjohnson)\
**Post date:** [November 7, 2026, 11:56am UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434/4 "2026-11-07T11:56:34Z")

</div>

Thanks, above is the log format.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [November 7, 2026, 1:10pm UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434/5 "2026-11-07T13:10:11Z")

</div>

You should create your own filter to handle those entries. Also, you should never ban IPs just because of a missing favicon. I can also see Cloudflare IPs in that log, so if you’re using Cloudflare for your domain and ban one of those IPs, you could end up blocking access for lots of users (including yourself).

---

<div class="post-metadata">

**Author:** ![bosunjohnson](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/bosunjohnson/32/9581_2.png) [@bosunjohnson](https://forum.hestiacp.com/u/bosunjohnson)\
**Post date:** [November 7, 2026, 1:25pm UTC](https://forum.hestiacp.com/t/fail2ban-for-apache-botsearch/22434/6 "2026-11-07T13:25:35Z")

</div>

Thanks! I don’t use Cloudflare, so it’d quite strange.
