I've written a bash script to ban country IP blocks from my router.
Why is it that the following works:
for ip in $(wget -qO- http://ipdeny.com/ipblocks/data/countries/cn.zone)
do
iptables -I wanin -s "$ip" -j DROP
done
But the following in which I nest multiple countries does not?
for country in CN AD
do
for ip in $(wget -qO- http://ipdeny.com/ipblocks/data/countries/$country.zone)
do
iptables -I wanin -s "$ip" -j DROP
done
done