Преглед изворни кода

Default fetch last 2h records from badips

Edvinas Valatka пре 8 година
родитељ
комит
227684a325
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      config
  2. 1 1
      e-badips

+ 1 - 1
config

@@ -16,7 +16,7 @@ banlevel=0
 # ban time in seconds,  1 week =  604800,  1 day = 86400
 banttl=604800
 # h,d,w,m,y
-rangecheck=1h
+rangecheck=2h
 # ssh,http... or any
 banservice=any
 

+ 1 - 1
e-badips

@@ -13,7 +13,7 @@ if curl -f -s -S -m 60 -o $tmp "https://www.badips.com/get/list/${banservice}/${
     done < $tmp
 fi
 
-if curl -f -s -S -m 60 -o $tmp  "http://api.blocklist.de/getlast.php?time=3600&service=all" ; then
+if curl -f -s -S -m 60 -o $tmp  "http://api.blocklist.de/getlast.php?time=7200&service=all" ; then
     while read -r ip ; do
         [[ "$ip" =~ ^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$ ]] && ipset -! add ${banset} ${ip} timeout $banttl
     done < $tmp