= iptables = Administration tool for IPv4/IPv6 packet filtering and NAT == Block IP address == {{{#!highlight bash cat /var/log/auth.log | grep Failed iptables -A INPUT -s 14.39.42.133 -j DROP iptables -A INPUT -s 80.94.95.181 -j DROP iptables -A INPUT -s 77.90.185.59 -j DROP iptables -L apt install whois whois 14.39.42.133 }}} === firewall.sh === {{{#!highlight sh iptables -F sh mail_failure_ip_list.sh | xargs -i iptables -A INPUT -s {} -j DROP iptables -L }}} === mail_failure_ip_list.sh === {{{#!highlight sh #!/bin/sh cat /var/log/mail.log | grep failure | awk '//{print $5}' | sort | uniq | sed 's/unknown//g' | sed 's/://g' | sed 's/\[//g' | sed 's/\]//g' }}}