Most már csak
cron-daily/@refresh_zone
, mert a
http://www.ipdeny.com/ipblocks/ oldalon:
"Zone files last updated: Thu Apr 4 13:00:59 EDT 2013"
vagyis naponta frissítődik(?).
#!/bin/bash
# refresh_zone
if ! [ "$USER" = "root" ]; then sudo $0; exit; fi
zdir='/etc/ufw/zones/'
zwget='all-zones.tar'
zfile=$zdir$zwget
zhu=$zdir'hu.zone'
sudo wget -q www.ipdeny.com/ipblocks/data/countries/$zwget'.gz' -O - > $zfile'.gz'
sudo gunzip -f $zfile.gz
sudo tar --extract --file=$zfile ./hu.zone > $zhu
Már amennyiben a hu.zone file helye:
/etc/ufw/zones/hu.zone
(Azért van beleépítve a sudo, mert annyira utálom külön beütni amikor tudom, hogy kell.)