#!/bin/sh ####################################################################### #Script Name: bfsynctable.sh #Version: 1.3 #Description: Script to sync DA BF file of abuse ips to the #CSF deny list on the Server. This runs @daily in cron. #Last Modify Date: 02082022 #Author:Brent Dacus #Email:brent[at]thedacus[dot]net ####################################################################### # Main # ####################################################################### #extract just the ips from the file Directamin BFM adds whitespace and a date. cat /etc/blocked_ips | sed -e 's/^[ \t]*//;s/=.*//' >/etc/blocked_ips.temp #load to pf firewall table while read ips; do /usr/local/directadmin/scripts/custom/block_ip.sh "$ips" done /usr/local/directadmin/data/admin/brute_ip.data #>/usr/local/directadmin/data/admin/brute_log_entries.list exit 0