Score:0

Fail2Ban not sending IP to iptables

br flag

Fail2Ban seems to be working fine

Status for the jail: nginx-php
|- Filter
|  |- Currently failed: 1
|  |- Total failed: 22
|  `- File list:    /var/log/nginx/access.log
`- Actions
   |- Currently banned: 1
   |- Total banned: 1
   `- Banned IP list:   46.32.125.42

But on iptables it doesnt show the ip being blocked

Iptables:

root@box-01:~# iptables -L INPUT -v -n
Chain INPUT (policy ACCEPT 1501 packets, 415K bytes)
 pkts bytes target     prot opt in     out     source               destination         
  328 40327 f2b-nginx-php  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            multiport dports 80,443
br flag
2021-11-29 12:24:59,408 fail2ban.filter [850]: INFO [nginx-php] Found 46.32.125.42 - 2021-11-29 12:24:59 2021-11-29 12:24:59,881 fail2ban.actions [850]: NOTICE [nginx-php] Ban 46.32.125.42
cn flag
Bob
Generally fail2ban has several possible approaches for blocking hosts and your check may not appropriate. For example when your config used `ipset` blocked IP adresses will never show up In iptables output … Also `iptables-save` may give more output
Gerrit avatar
cn flag
try `iptables -S f2b-nginx-php`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.