天天看点

检测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

继续阅读