Subversion Repositories ALCASAR

Rev

Rev 2355 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2355 Rev 2357
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: fail2ban.sh 2355 2017-07-26 22:11:27Z tom.houdayer $
2
# $Id: fail2ban.sh 2357 2017-07-27 14:29:28Z tom.houdayer $
3
 
3
 
4
FAIL_CONF="/etc/fail2ban/fail2ban.conf"
4
FAIL_CONF="/etc/fail2ban/fail2ban.conf"
5
JAIL_CONF="/etc/fail2ban/jail.conf"
5
JAIL_CONF="/etc/fail2ban/jail.conf"
6
DIR_FILTER="/etc/fail2ban/filter.d/"
6
DIR_FILTER="/etc/fail2ban/filter.d/"
7
ACTION_ALLPORTS="/etc/fail2ban/action.d/iptables-allports.conf"
7
ACTION_ALLPORTS="/etc/fail2ban/action.d/iptables-allports.conf"
Line 316... Line 316...
316
# Tags:    <ip>  IP address
316
# Tags:    <ip>  IP address
317
#          <failures>  number of failures
317
#          <failures>  number of failures
318
#          <time>  unix timestamp of the ban time
318
#          <time>  unix timestamp of the ban time
319
# Values:  CMD
319
# Values:  CMD
320
 
320
 
321
actionban = iptables -I fail2ban-<name> 1 -s <ip> -j NFLOG --nflog-group 1 --nflog-prefix "RULE Fail2Ban -- DROP"
-
 
322
            iptables -I fail2ban-<name> 1 -s <ip> -j DROP
321
actionban = iptables -I fail2ban-<name> 1 -s <ip> -j DROP
323
 
322
 
324
# Option:  actionunban
323
# Option:  actionunban
325
# Notes.:  command executed when unbanning an IP. Take care that the
324
# Notes.:  command executed when unbanning an IP. Take care that the
326
#          command is executed with Fail2Ban user rights.
325
#          command is executed with Fail2Ban user rights.
327
# Tags:    <ip>  IP address
326
# Tags:    <ip>  IP address
328
#          <failures>  number of failures
327
#          <failures>  number of failures
329
#          <time>  unix timestamp of the ban time
328
#          <time>  unix timestamp of the ban time
330
# Values:  CMD
329
# Values:  CMD
331
#
330
#
332
actionunban = iptables -D fail2ban-<name> -s <ip> -j NFLOG --nflog-group 1 --nflog-prefix "RULE Fail2Ban -- DROP"
-
 
333
              iptables -D fail2ban-<name> -s <ip> -j DROP
331
actionunban = iptables -D fail2ban-<name> -s <ip> -j DROP
334
 
332
 
335
[Init]
333
[Init]
336
 
334
 
337
# Defaut name of the chain
335
# Defaut name of the chain
338
#
336
#