mirror of https://github.com/fail2ban/fail2ban
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.6 KiB
66 lines
1.6 KiB
12 years ago
|
# Fail2Ban configuration file
|
||
|
#
|
||
|
# Author: Daniel Black
|
||
|
#
|
||
|
# Tested against protocol 6 (ipset v6.14)
|
||
|
#
|
||
|
|
||
|
[Definition]
|
||
|
|
||
|
# Option: actionstart
|
||
|
# Notes.: command executed once at the start of Fail2Ban.
|
||
|
# Values: CMD
|
||
|
#
|
||
|
actionstart = ipset create fail2ban-<name> hash:ip timeout <bantime>
|
||
|
iptables -I INPUT -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j DROP
|
||
|
|
||
|
# Option: actionstop
|
||
|
# Notes.: command executed once at the end of Fail2Ban
|
||
|
# Values: CMD
|
||
|
#
|
||
|
actionstop = iptables -D INPUT -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j DROP
|
||
|
ipset flush fail2ban-<name>
|
||
|
ipset destroy fail2ban-<name>
|
||
|
|
||
|
# Option: actionban
|
||
|
# Notes.: command executed when banning an IP. Take care that the
|
||
|
# command is executed with Fail2Ban user rights.
|
||
|
# Tags: <ip> IP address
|
||
|
# Values: CMD
|
||
|
#
|
||
|
actionban = ipset add fail2ban-<name> <ip> -exist
|
||
|
|
||
|
# Option: actionunban
|
||
|
# Notes.: command executed when unbanning an IP. Take care that the
|
||
|
# command is executed with Fail2Ban user rights.
|
||
|
# Tags: <ip> IP address
|
||
|
# Values: CMD
|
||
|
#
|
||
|
actionunban = ipset del fail2ban-<name> <ip> -exist
|
||
|
|
||
|
[Init]
|
||
|
|
||
|
# Defaut name of the chain
|
||
|
#
|
||
|
name = default
|
||
|
|
||
|
# Option: port
|
||
|
# Notes.: specifies port to monitor
|
||
|
# Values: [ NUM | STRING ] Default: ssh
|
||
|
#
|
||
|
port = ssh
|
||
|
|
||
|
# Option: protocol
|
||
|
# Notes.: internally used by config reader for interpolations.
|
||
|
# Values: [ tcp | udp | icmp | all ] Default: tcp
|
||
|
#
|
||
|
protocol = tcp
|
||
|
|
||
|
# Option: bantime
|
||
|
# Notes: specifies the bantime in seconds (handled internally rather than by fail2ban)
|
||
|
# Values: [ NUM ] Default: 600
|
||
|
|
||
|
bantime = 600
|
||
|
|
||
|
|