Package: fail2ban
Version: 1.1.0-6
Severity: normal

Dear Maintainer,

If I put the following info in my jail.local file

[DEFAULT]
action = cloudflare-token
cfzone = MY_CF_ZONE_ID
cftoken = MY_CF_API_TOKEN

as instructed by comments of cloudflare-token.conf file, the jails don't work.

When I tried sudo fail2ban-client set botsearch banip x.x.x.x, the log says

fail2ban.actions        [1204999]: NOTICE  [nginx-botsearch] Ban x.x.x.x
fail2ban.observer       [1204999]: DEBUG   [nginx-botsearch] Observer: ban 
found x.x.x.x, 600
fail2ban.utils          [1204999]: DEBUG   7f78eafb9fd0 -- stdout: 
'{"success":false,"errors":[{"code":7003,"message":"Could not route to 
\\/zones\\/<cfzone>\\/firewall\\/access_rules\\/rules, perhaps your object 
identifier is invalid?"},{"code":7000,"message":"No route for that 
URI"}],"messages":[],"result":null}'
fail2ban.utils          [1204999]: DEBUG   7f78eafb9fd0 -- returned 
successfully 0

Manually issuing curl command works, so MY_CF_ZONE_ID and MY_CF_API_TOKEN are 
current.

Putting MY_CF_ZONE_ID and MY_CF_API_TOKEN in cloudflare-token.local makes it 
work, but ideally those info should be taken from jail.local.

Regards,
Joongul

-- System Information:
Debian Release: 12.6
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 
'stable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-23-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fail2ban depends on:
ii  python3          3.11.2-1+b1
ii  python3-systemd  235-1+b2

Versions of packages fail2ban recommends:
ii  iptables           1.8.9-2
ii  nftables           1.0.6-2+deb12u2
ii  python3-pyinotify  0.9.6-2
ii  whois              5.5.17

Versions of packages fail2ban suggests:
ii  mailutils [mailx]  1:3.15-4
pn  monit              <none>
pn  sqlite3            <none>
pn  system-log-daemon  <none>

-- no debconf information

Reply via email to