Proftpd et Fail2ban
Fail2ban surveille les log de proftpd. Cependant si votre installation d’Ubuntu (ou autre linux…) n’est pas en anglais, proftpd va internationaliser vos log, c’est a dire les mettre en français… plutôt sympa pour vous (encore que…), mais surtout ceux-ci ne vont plus être compréhensible par fail2ban… celui ci parlant exclusivement anglais.
La solution: éditer le fichier /etc/init.d/proftpd/
Et ajouter la ligne export LANG= »en_US.UTF-8″
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/bin/sh ### BEGIN INIT INFO # Provides: proftpd # Required-Start: $remote_fs $syslog $local_fs $network # Required-Stop: $remote_fs $syslog $local_fs $network # Should-Start: $named # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts ProFTPD daemon # Description: This script runs the FTP service offered # by the ProFTPD daemon ### END INIT INFO # Start the proftpd FTP daemon. PATH= /bin : /usr/bin : /sbin : /usr/sbin DAEMON= /usr/sbin/proftpd NAME=proftpd # Defaults RUN= "no" OPTIONS= "" export LANG= "en_US.UTF-8" PIDFILE=` grep -i 'pidfile' /etc/proftpd/proftpd .conf | sed -e 's/pidfile[\t ]\+//i' ` if [ "x$PIDFILE" = "x" ]; then PIDFILE= /var/run/proftpd .pid fi .... |
Laisser un commentaire