0) { conf_mount_rw(); $ent = array(); if ($_POST['enable'] == 1) { //echo "enabled"; $config['installedpackages']['ipblocklist_settings']['config'][0]['enable'] = 1; //Load ipfw.ko //exec("kldload ipfw.ko"); (Version 0.1.4) //Process list by downloading and extracting $myFile = "lists.txt"; $fileContents = file_get_contents($myFile); $lines = explode(PHP_EOL, $fileContents); //Remove DIR lists to eliminate duplates exec("rm -R lists"); //Process each list URL, Extract, and put in DIR lists exec("mkdir lists"); foreach ($lines as $line) { exec("fetch -o lists $line"); $filename = basename($line); //Extract list exec("gzip -d lists/$filename"); } //Prep pfctl mwexec("touch lists/ipfw.ipfw"); //Now clear ipfw, and process each list to ipfw commands mwexec("sh convert-execute.sh"); } else { //echo "disabled"; $config['installedpackages']['ipblocklist_settings']['config'][0]['enable'] = 0; //Clear Lists mwexec("ipfw -f flush"); mwexec("pfctl -t ipblocklist -T kill"); mwexec("rm -R /usr/local/www/packages/ipblocklist/lists"); mwexec("sed -i -e '/ipblocklist/d' /tmp/rules.debug"); mwexec("pfctl -o basic -f /tmp/rules.debug"); //Clear errorOUT.txt mwexec("rm errorOUT.txt"); } write_config(); //services_dnsmasq_configure(); sleep(1); $savemsg_dnsb = "IP-Blocklist settings have been saved/updated. "; conf_mount_ro(); } ?>

Firewall: IP-Blocklist

\n"; } else { echo "\n"; } ?> Enable IP-Blocklist


Usage
Add direct link to list and press (Example: Level1, Level2, Level3)
Compressed lists should have .gz extention


Warning! - Apply after each reboot or firewall change. Use at your own risk.
Current Status = "; ob_start(); $results = exec("pfctl -s rules | grep -c ipblocklist"); ob_end_clean(); if ($results == '2') echo "Running"; else echo "NOT running"; //Get Errors if exists ob_start(); $results = exec("tail -r errorOUT.txt"); ob_end_clean(); echo "
"; echo $results; echo ""; ?>

"; ?>