D
D
denidip2016-04-23 12:48:57
FreeBSD
denidip, 2016-04-23 12:48:57

Why fail2ban doesn't ban?

Created a jail in the status all is well:

Status for the jail: new-jail
|- Filter
|  |- Currently failed:	1
|  |- Total failed:	10
|  `- File list:	/var/log/new-jail-acces.log
`- Actions
   |- Currently banned:	1
   |- Total banned:	2
   `- Banned IP list:	176.9.136.47

In /usr/local/etc/fail2ban/jail.conf
[new-jail]
enabled = true
filter = new-jail
port = https
logpath = /var/log/new-jail-acces.log
ignoreip = 192.168.1.1
maxretry = 2
bantime = 86400
findtime = 600
action = bsd-ipfw

In /usr/local/etc/fail2ban/action.d/bsd-ipfw.conf
actionban = e=`ipfw table <table> add <ip> 2>&1`; x=$?; [ $x -eq 0 -o "$e" = 'ipfw: setsockopt(IP_FW_TABLE_XADD): File exists' ] || { echo "$e" 1>&2; exit $x; }

Why aren't addresses added to the ipwf table?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question