Skip to content

Instantly share code, notes, and snippets.

@LinuxTracker
LinuxTracker / update.sh
Last active August 29, 2015 14:05
pfSense Bash script to d/l .csv of Country IP ranges and extract each range into it's respective country file
#!/bin/sh
# script downloads GeoIPCountryCSV.zip from geolite.maxmind.com
# extracts IP ranges into pfBlocker's country files (ie:/usr/local/pkg/pfblocker/US.txt)
# req unzip util,
# ie: pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.3-release/Latest/unzip.tbz
# still needs method to convert ranges to CIDR
# define working dir
workdir='/usr/local/pkg'