Get the App
SLTechnology News&Howtos  ›  Servers  › 

Example Analysis of iptables Seal IP in CentOS

Shulou Source: shulou.com Published: 2022-06-01 19:27:20 10月01日 Update

This article mainly shows you the "Sample Analysis of IP Sealing by iptables in CentOS". The content is simple and easy to understand and clearly organized. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn the article "Sample Analysis of IP Sealing by iptables in CentOS".

View unsuccessful IP logins on the day

One command blocked all of these IPs:

for i in `grep "$(date +"%b %d")" /var/log/secure | grep "Failed password" | awk '{print $(NF-3)}' | sort | uniq -c | sort -nr| awk '{print $2}'` ;do iptables -A INPUT -s $i -j DROP; done

Effect:

The above is "CentOS iptables IP sealing example analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Examples analysis content articles learning help success commands effects understandability more organization knowledge editing industry information information channels channels login research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia Shulou Information OPPO Reno Apple