blockauth

This commit is contained in:
q3aql 2024-03-28 13:07:42 +01:00
parent ddbe20635a
commit 80a0e9ee73

View File

@ -86,8 +86,8 @@ while [ ${blockauth} -eq 0 ] ; do
sleep 60
# Read auth.log file and select blocked IPs
for user in ${valid_users} ; do
echo "blockauth: allowing acces for ${user}"
echo "blockauth: allowing acces for ${user}" >> ${filelog}
echo "blockauth: allowing access for ${user}"
echo "blockauth: allowing access for ${user}" >> ${filelog}
sed -i "s/Failed password for ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log
sed -i "s/Failed password for invalid user ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log
done