1,53 → 1,11 |
#!/bin/sh |
# $Id$ |
|
FAIL_CONF="/etc/fail2ban/fail2ban.conf" |
JAIL_CONF="/etc/fail2ban/jail.conf" |
DIR_FILTER="/etc/fail2ban/filter.d/" |
ACTION_ALLPORTS="/etc/fail2ban/action.d/iptables-allports.conf" |
|
######################################################### |
## Mise à jour du fichier de configuration de fail2ban ## |
######################################################### |
[ -f $FAIL_CONF ] && [ ! -e $FAIL_CONF.default ] && mv $FAIL_CONF $FAIL_CONF.default |
cat << EOF > $FAIL_CONF |
|
[Definition] |
|
# Option: loglevel |
# Notes.: Set the log level output. |
# 1 = ERROR |
# 2 = WARN |
# 3 = INFO |
# 4 = DEBUG |
# Values: NUM Default: 3 |
# |
loglevel = 3 |
|
# Option: logtarget |
# Notes.: Set the log target. This could be a file, SYSLOG, STDERR or STDOUT. |
# Only one log target can be specified. |
# Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log |
# |
logtarget = /var/log/fail2ban.log |
|
# Option: socket |
# Notes.: Set the socket file. This is used to communicate with the daemon. Do |
# not remove this file when Fail2ban runs. It will not be possible to |
# communicate with the server afterwards. |
# Values: FILE Default: /var/run/fail2ban/fail2ban.sock |
# |
socket = /var/run/fail2ban/fail2ban.sock |
|
# Option: pidfile |
# Notes.: Set the PID file. This is used to store the process ID of the |
# fail2ban server. |
# Values: [ FILE ] Default: /var/run/fail2ban/fail2ban.pid |
# |
pidfile = /var/run/fail2ban/fail2ban.pid |
EOF |
|
######################################################### |
## Mise à jour de la configuration de jail de fail2ban ## |
######################################################### |
[ -f $JAIL_CONF ] && [ ! -e $JAIL_CONF.default ] && mv $JAIL_CONF $JAIL_CONF.default |