在創建一個簡單的腳本,抓住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