天天看點

檢測sshd端口誤封腳本

#!/bin/bash

n=`iptables -nvL |grep 'tcp dpt:22' |egrep -iE 'DROP|REJECT'|wc -l`

if [ $n -ge 1 ]

then

    iptables -I INPUT -p tcp --dport 22 -j ACCEPT

fi

本文轉自 15816815732 51CTO部落格,原文連結:http://blog.51cto.com/68686789/1861212

繼續閱讀