在创建一个简单的脚本,抓住IP地址,并阻止他们的黑名单,我碰到这个问题:
## Function giving greif
function _droplist(){
while read line; do
$IPT -A droplist -i eth1 -s $line -j LOG --log-prefix "IP BlockList "
$IPT -A droplist -i eth1 -s $line -j DROP
done < $badlist ##IPT is /sbin/iptables
}
通过这个功能我的几个迭代得到的错误:
Try `iptables -h' or 'iptables --help' for more information.
' not found.4.12: host/network `SO.ME.IPH.ERE
运行硬相同的脚本在IP的作品精细编码,它要么是与$线或iptables的m的实施。
干杯 - 挡板。
通过修正了该问题$ IPT -A INPUT -s $ @ -j DROP ......仍然不确定,如果它是$线或黑名单格式化? – deviantlamb 2013-05-01 03:48:27