#!/bin/sh ####################################################################### #Script Name: pfloadcountry #Version: 1.4 #Description: Script to auto load Country ip ranges from #IPdeny #Last Modify Date: 03102021 #Author:Brent Dacus #Email:brent[at]thedacus[dot]net ####################################################################### # Main # ####################################################################### ## get new geo ip server list curl -s http://www.ipdeny.com/ipblocks/data/aggregated/{ru,cn,tr,ir,iq,id,kp,cz,br,tw,ro,vn}-aggregated.zone \ > /tmp/geoblock_file ## enter into pf anti-ad server table pfctl -t geoblock -T replace -f /tmp/geoblock_file ## clean up and remove temp file rm -rf /tmp/geoblock_*