cat /var/log/auth.log | grep 'sshd.*Invalid' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | sort | uniq -u | xargs printf "ALL: %s\n" >> /etc/hosts.deny
this is a work in progress. not working yet. permission problem with appending hosts.deny
cat /var/log/auth.log | grep 'sshd.*Invalid' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | sort | uniq -u | xargs printf "ALL: %s\n" >> /etc/hosts.deny
this is a work in progress. not working yet. permission problem with appending hosts.deny
Leave a Reply