log ufw errors to log file
This commit is contained in:
parent
4312d75e27
commit
49d1f7524d
@ -19,7 +19,7 @@ if ! grep -q '<appears>yes</appears>' $repl; then
|
||||
fi
|
||||
freq=`grep '<frequency>' $repl | sed 's/<frequency>//; s!</frequency>!!'`
|
||||
if [ "$freq" -ge 1 ]; then
|
||||
if ufw deny from $ip >/dev/null; then
|
||||
if ufw deny from $ip >/dev/null 2>>$logf; then
|
||||
echo `date` blocked ip $ip with freq $freq >> $logf
|
||||
rm $repl
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user