Author Topic: Script Automation  (Read 6504 times)

Offline dreamdemon

  • Newbie
  • *
  • Posts: 4
  • Karma: +1/-0
    • View Profile
Script Automation
« on: September 17, 2011, 12:09:14 PM »
Using a combination of IPSET & IPTABLES in linux, this is how I have automated my firewall script to parse & process the listings.  All suggestions welcome.

Code: [Select]
wget -c --output-document=iptables-blocklist.txt http://www.countryipblocks.net/e_country_data/Antartica_cidr.txt
if [ -f iptables-blocklist.txt ]; then
  BLOCKDB="iptables-blocklist.txt"
  IPS=$(grep -Ev "^#" $BLOCKDB)
  for i in $IPS
  do
    $IPSET -A WHACKED $i
  done
fi
rm $WORKDIR/iptables-blocklist.txt

This allows me to update blocks on a regular basis via cron.

Offline Country IP Blocks

  • Administrator
  • Sr. Member
  • *****
  • Posts: 446
  • Karma: +0/-0
    • View Profile
Re: Script Automation
« Reply #1 on: May 28, 2012, 08:36:43 AM »
Unfortunately we are no longer offering text file updates for our free members. Therefore the above script no longer works.