linux常用技巧
7 12th, 2008
研究了一下,这个是我的最新版本,呵呵,欢迎测试
netstat -an | grep -v LISTEN | awk '{print $5}' |grep -v 127.0.0.1|grep -v 本机ip|sed "s/::ffff://g"|awk 'BEGIN { FS=":" } { Num[$1]++ } END { for(i in Num) if(Num[i]>8) { print i} }' |grep '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'| xargs -i[] iptables -I INPUT -s [] -j DROP
阅读全文——共348字
iptables | 安全
Linux相关文章
2 23rd, 2008
来自CU的高人.http://php.twomice.net/bbs/viewthread.php?tid=39
netstat -an | grep -v LISTEN | awk '{print $5}' | awk 'BEGIN { FS=":" } { Num[$1]++ } END { for(i in Num) if(Num[i]>8) { print i} }' | xargs -i[] iptables -I INPUT -s [] -j DROP
红色部分为设定值,这条句子会自动将netstat -an 中查到的来自同一IP的超过一定量的连接的列入禁止范围,红色部分为阀值
IP | iptables | Linux | 攻击 | 限制范围
网络安全
10 17th, 2007
tcp_wrappers
.使用libwrap.so保護某種tcp協定的服務器
.配置文件/etc/hosts.deny和/etc/hosts.allow
.支持tcp_wrappers的服務器
阅读全文——共1106字
iptables | tcp_wrappers