Subversion Repositories ALCASAR

Rev

Rev 2353 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2353 Rev 2355
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: fail2ban.sh 2353 2017-07-25 21:39:16Z tom.houdayer $
2
# $Id: fail2ban.sh 2355 2017-07-26 22:11:27Z 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-prefix "Fail2Ban -- DROP"
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
322
            iptables -I fail2ban-<name> 1 -s <ip> -j DROP
323
 
323
 
324
# Option:  actionunban
324
# Option:  actionunban
325
# Notes.:  command executed when unbanning an IP. Take care that the
325
# Notes.:  command executed when unbanning an IP. Take care that the
326
#          command is executed with Fail2Ban user rights.
326
#          command is executed with Fail2Ban user rights.
327
# Tags:    <ip>  IP address
327
# Tags:    <ip>  IP address
328
#          <failures>  number of failures
328
#          <failures>  number of failures
329
#          <time>  unix timestamp of the ban time
329
#          <time>  unix timestamp of the ban time
330
# Values:  CMD
330
# Values:  CMD
331
#
331
#
332
actionunban = iptables -D fail2ban-<name> -s <ip> -j DROP
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 NFLOG --nflog-prefix "Fail2Ban -- DROP"
333
              iptables -D fail2ban-<name> -s <ip> -j DROP
334
 
334
 
335
[Init]
335
[Init]
336
 
336
 
337
# Defaut name of the chain
337
# Defaut name of the chain
338
#
338
#