#!/bin/bash #此脚本为自动封ssh登录次数 num=10 #输错密码上限 for i in `awk '/Failed/{print ParseError: KaTeX parse error: Expected 'EOF', got '}' at position 7: (NF-3)}̲' /var/log/secu…1>ParseError: KaTeX parse error: Expected '}', got 'EOF' at end of input: num){print2}}'` do iptables -I INPUT -p tcp -s $i --dport 22 -j DROP done
centos6 通过Iptablse 自动BAN 猥亵ssh的IP
Bookmark the permalink.