From d47703f24b8495a62d8dda4ecfda7338cc068bd3 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Sun, 2 Oct 2011 17:13:30 +0200 Subject: Remove process check for ACL page so that they can be setup *before* starting Unbound --- config/unbound/unbound_acls.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'config') diff --git a/config/unbound/unbound_acls.php b/config/unbound/unbound_acls.php index 40f21595..ff3ce3bd 100644 --- a/config/unbound/unbound_acls.php +++ b/config/unbound/unbound_acls.php @@ -32,11 +32,6 @@ require("guiconfig.inc"); require("unbound.inc"); -if(!is_process_running("unbound")) { - Header("Location: /pkg_edit.php?xml=unbound.xml&id=0"); - exit; -} - if (!is_array($config['installedpackages']['unboundacls']['config'])) $config['installedpackages']['unboundacls']['config'] = array(); -- cgit v1.2.3 From 965b82cb3b15d983da2bfce8db9303085d7122c9 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Sun, 2 Oct 2011 18:56:10 -0400 Subject: fix pkg_add location to 8 stable and fix other issues --- config/ipblocklist/8/ipblocklist.inc | 9 ++++++--- config/ipblocklist/8/ipblocklist.tmp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index 003f28bf..d3d5e1cd 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -55,10 +55,12 @@ function php_install_command_ip() //install PERL + exec("setenv PACKAGESITE \"ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/\""); exec("pkg_add -r perl"); exec("pkg_add -r p5-Net-CIDR"); - exec("pkg_add -r compat7x-i386.tbz"); - exec("pkg_add -r compat6x-i386.tbz"); + //exec("pkg_add -r compat7x-i386.tbz"); + //exec("pkg_add -r compat6x-i386.tbz"); + exec("rehash"); //rename PHP files from .tmp to .php exec("cp /tmp/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); @@ -121,11 +123,12 @@ function deinstall_command_ip() $handle = popen("/usr/local/etc/rc.d/ipblocklist.sh stop", "r"); unlink_if_exists("/usr/local/pkg/ipblocklist.xml"); unlink_if_exists("/usr/local/pkg/ipblocklist.inc"); + unlink_if_exists("/usr/local/pkg/pf/IP-Blocklist.sh"); exec("rm -R /usr/local/www/packages/ipblocklist/ipblocklists"); exec("rm -R /usr/local/www/packages/ipblocklist"); exec("rm /usr/local/etc/rc.d/IP-Blocklist.sh"); exec("pfctl -t ipblocklist -T kill"); - exec("ipfw -f flush"); + //exec("ipfw -f flush"); conf_mount_ro(); } diff --git a/config/ipblocklist/8/ipblocklist.tmp b/config/ipblocklist/8/ipblocklist.tmp index ffbfdc57..02f67c05 100755 --- a/config/ipblocklist/8/ipblocklist.tmp +++ b/config/ipblocklist/8/ipblocklist.tmp @@ -62,7 +62,7 @@ if (count($_POST)>0) { //echo "disabled"; $config['installedpackages']['ipblocklist_settings']['config'][0]['enable'] = 0; //Clear Lists - mwexec("ipfw -f flush"); + //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"); -- cgit v1.2.3 From 8c27153be113df55f891c19594d0915c6362a665 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Sun, 2 Oct 2011 19:24:17 -0400 Subject: Create user backup and install perl from absolute path in 8 stable --- config/ipblocklist/8/ipblocklist.inc | 8 +++++--- config/ipblocklist/8/ipblocklist.tmp | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index d3d5e1cd..7a32da7a 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -55,9 +55,8 @@ function php_install_command_ip() //install PERL - exec("setenv PACKAGESITE \"ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/\""); - exec("pkg_add -r perl"); - exec("pkg_add -r p5-Net-CIDR"); + exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/perl-5.12-4_2.tbz"); + exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/p5-Net-CIDR.tbz"); //exec("pkg_add -r compat7x-i386.tbz"); //exec("pkg_add -r compat6x-i386.tbz"); exec("rehash"); @@ -111,6 +110,9 @@ function php_install_command_ip() exec("/usr/bin/touch /usr/local/www/packages/ipblocklist/OUTBOUND"); + //Attempt to pull from a backup + exec("/bin/mkdir /usr/local/www/packages/ipblocklist_bkup"); + exec("cp /usr/local/www/packages/ipblocklist_bkup/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); conf_mount_ro(); config_unlock(); diff --git a/config/ipblocklist/8/ipblocklist.tmp b/config/ipblocklist/8/ipblocklist.tmp index 02f67c05..677158e2 100755 --- a/config/ipblocklist/8/ipblocklist.tmp +++ b/config/ipblocklist/8/ipblocklist.tmp @@ -56,6 +56,9 @@ if (count($_POST)>0) { //Now clear ipfw, and process each list to ipfw commands exec("/bin/sh convert-execute.sh"); + + //Attempt to create a backup of user lists + mwexec("cp /usr/local/www/packages/ipblocklist/lists.txt /usr/local/www/packages/ipbloclist_bkup/lists.txt"); } else { -- cgit v1.2.3 From 7dda215e41a7deb3a6e1a7b314114ef52af8d4bf Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Sun, 2 Oct 2011 19:42:55 -0400 Subject: correct typos --- config/ipblocklist/8/ipblocklist.inc | 4 ++-- config/ipblocklist/8/ipblocklist.tmp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index 7a32da7a..24147562 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -55,8 +55,8 @@ function php_install_command_ip() //install PERL - exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/perl-5.12-4_2.tbz"); - exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/p5-Net-CIDR.tbz"); + exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/perl-5.12.4_2.tbz"); + exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/p5-Net-CIDR-0.14.tbz"); //exec("pkg_add -r compat7x-i386.tbz"); //exec("pkg_add -r compat6x-i386.tbz"); exec("rehash"); diff --git a/config/ipblocklist/8/ipblocklist.tmp b/config/ipblocklist/8/ipblocklist.tmp index 677158e2..9291a468 100755 --- a/config/ipblocklist/8/ipblocklist.tmp +++ b/config/ipblocklist/8/ipblocklist.tmp @@ -58,7 +58,7 @@ if (count($_POST)>0) { exec("/bin/sh convert-execute.sh"); //Attempt to create a backup of user lists - mwexec("cp /usr/local/www/packages/ipblocklist/lists.txt /usr/local/www/packages/ipbloclist_bkup/lists.txt"); + mwexec("cp /usr/local/www/packages/ipblocklist/lists.txt /usr/local/www/packages/ipblocklist_bkup/lists.txt"); } else { -- cgit v1.2.3 From 26e504fbacb47031869a7ab204bcd54e54315c15 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Sun, 2 Oct 2011 19:55:56 -0400 Subject: Remove email and create user backup --- config/countryblock/countryblock.inc | 5 +++++ config/countryblock/countryblock.tmp | 5 ++++- config/countryblock/countryblock_if.tmp | 2 +- config/countryblock/help.tmp | 4 ++-- config/countryblock/settings.tmp | 2 +- config/countryblock/whitelist.tmp | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index f67fd76f..79b223ce 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -114,6 +114,10 @@ function php_install_command_cb() exec("mkdir /usr/local/www/packages/countryblock/lists"); exec("touch /usr/local/www/packages/countryblock/lists/countries.txt"); + //Attempt to restore from backup + exec("mkdir /usr/local/www/packages/countryblock_bkup"); + exec("cp /usr/local/www/packages/countryblock_bkup/countries.txt /usr/local/www/packages/countryblock/countries.txt"); + conf_mount_ro(); config_unlock(); } @@ -125,6 +129,7 @@ function deinstall_command_cb() $handle = popen("/usr/local/etc/rc.d/countryblock.sh stop", "r"); unlink_if_exists("/usr/local/pkg/countryblock.xml"); unlink_if_exists("/usr/local/pkg/countryblock.inc"); + //unlink_if_exists("/usr/local/pkg/pf/countryblock.sh"); exec("rm -R /usr/local/www/packages/countryblock/countryblocks"); exec("rm -R /usr/local/www/packages/countryblock"); exec("rm /usr/local/etc/rc.d/countryblock.sh"); diff --git a/config/countryblock/countryblock.tmp b/config/countryblock/countryblock.tmp index 0ddb4c5f..39ee6e64 100644 --- a/config/countryblock/countryblock.tmp +++ b/config/countryblock/countryblock.tmp @@ -60,6 +60,9 @@ if (count($_POST)>0) { //mwexec("pfctl -t countryblock -T kill"); //mwexec("sed -i -e '/countryblock/d' /tmp/rules.debug"); mwexec("sh execute.sh"); + + //attempt to create a backup of countries.txt + mwexec("cp /usr/local/www/packages/countryblock/countries.txt /usr/local/www/packages/countryblock_bkup/countries.txt"); } else { @@ -118,7 +121,7 @@ else { $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> diff --git a/config/countryblock/countryblock_if.tmp b/config/countryblock/countryblock_if.tmp index 8471f075..65b80992 100644 --- a/config/countryblock/countryblock_if.tmp +++ b/config/countryblock/countryblock_if.tmp @@ -122,7 +122,7 @@ include("head.inc"); $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", true, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> diff --git a/config/countryblock/help.tmp b/config/countryblock/help.tmp index 17f30f90..2f466947 100644 --- a/config/countryblock/help.tmp +++ b/config/countryblock/help.tmp @@ -34,7 +34,7 @@ $pgtitle = "Firewall: Countryblock - Help"; $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", true, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> @@ -91,7 +91,7 @@ To run countryblock as a cron job use /usr/local/etc/rc.d/countryblock.sh
Warning! - Apply after every firewall change or state reset. Use at your own risk. ---> -Please see wiki for help +Please see wiki for help or the Forum diff --git a/config/countryblock/settings.tmp b/config/countryblock/settings.tmp index 5bbfedc3..0a067d83 100644 --- a/config/countryblock/settings.tmp +++ b/config/countryblock/settings.tmp @@ -44,7 +44,7 @@ $pgtitle = "Firewall: Countryblock - Settings"; $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> diff --git a/config/countryblock/whitelist.tmp b/config/countryblock/whitelist.tmp index 0dbed5d0..d613ee11 100644 --- a/config/countryblock/whitelist.tmp +++ b/config/countryblock/whitelist.tmp @@ -43,7 +43,7 @@ mwexec("touch countries-white.txt"); $tab_array[2] = array("Whitelist", true, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> -- cgit v1.2.3 From d4d0fcbadc7817f1a0a675d04c4005afc58d9b19 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Mon, 3 Oct 2011 00:35:17 -0400 Subject: added widget for countryblock and ipblocklist --- config/countryblock/countryblock.inc | 5 + config/countryblock/countryblock.xml | 12 ++- .../countryblock_IPBlocklist.widget.tmp | 39 +++++++ .../countryblock_ipblocklist_widget.tmp | 116 +++++++++++++++++++++ .../8/countryblock_IPBlocklist.widget.tmp | 39 +++++++ .../8/countryblock_ipblocklist_widget.tmp | 116 +++++++++++++++++++++ config/ipblocklist/8/ipblocklist.inc | 5 + config/ipblocklist/8/ipblocklist.xml | 12 ++- 8 files changed, 342 insertions(+), 2 deletions(-) create mode 100644 config/countryblock/countryblock_IPBlocklist.widget.tmp create mode 100644 config/countryblock/countryblock_ipblocklist_widget.tmp create mode 100644 config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp create mode 100644 config/ipblocklist/8/countryblock_ipblocklist_widget.tmp (limited to 'config') diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index 79b223ce..cba04cb7 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -62,6 +62,11 @@ function php_install_command_cb() //rename PHP files from .tmp to .php + exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); + unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); + exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/widgets/widgets/countryblock_ipblocklist_widget.php"); + unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); + exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/countryblock/class.phpmailer.php"); unlink_if_exists("/tmp/class.phpmailer.tmp "); exec("cp /tmp/class.smtp.tmp /usr/local/www/packages/countryblock/class.smtp.php"); diff --git a/config/countryblock/countryblock.xml b/config/countryblock/countryblock.xml index dbbefd18..6e2ec635 100644 --- a/config/countryblock/countryblock.xml +++ b/config/countryblock/countryblock.xml @@ -41,7 +41,7 @@ Active Internet http://forum.pfsense.org/index.php/topic,25732.0.html Country Block Settings - 0.2.2 + 0.2.4 Settings /usr/local/pkg/countryblock.inc @@ -164,6 +164,16 @@ 0755 http://www.pfsense.org/packages/config/countryblock/email.tmp + + /tmp/ + 0755 + http://www.pfsense.org/packages/config/countryblock/countryblock_IPBlocklist.widget.tmp + + + /tmp/ + 0755 + http://www.pfsense.org/packages/config/countryblock/countryblock_ipblocklist_widget.tmp + Variable One diff --git a/config/countryblock/countryblock_IPBlocklist.widget.tmp b/config/countryblock/countryblock_IPBlocklist.widget.tmp new file mode 100644 index 00000000..e81f1a55 --- /dev/null +++ b/config/countryblock/countryblock_IPBlocklist.widget.tmp @@ -0,0 +1,39 @@ + + + +
Ajax Loading...
+ diff --git a/config/countryblock/countryblock_ipblocklist_widget.tmp b/config/countryblock/countryblock_ipblocklist_widget.tmp new file mode 100644 index 00000000..d8d0f780 --- /dev/null +++ b/config/countryblock/countryblock_ipblocklist_widget.tmp @@ -0,0 +1,116 @@ +"; +if (file_exists($ipblocklist_file)) { + echo " IP-Blocklist"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); + ob_end_clean(); + if ($results > '2') echo ""; + else + echo ""; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " Countryblock"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); + ob_end_clean(); + if ($results > '0') echo ""; + else + echo ""; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + echo " "; + ob_start(); + $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); + ob_end_clean(); + echo $resultsIP; + echo " Networks"; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " "; + ob_start(); + $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); + ob_end_clean(); + echo $resultsCB; + echo " Networks"; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + ob_start(); + $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); + ob_end_clean(); + if ($resultsIP == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsIP; + echo ""; + echo ""; + } +} +if (file_exists($countryblock_file)) { + ob_start(); + $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); + ob_end_clean(); + if ($resultsCB == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsCB; + echo ""; + echo ""; + } +} +echo" "; +//echo" "; +//if (file_exists($ipblocklist_file)) echo "  "; +//if (file_exists($countryblock_file)) echo "  "; +//echo" "; +echo""; + +?> \ No newline at end of file diff --git a/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp b/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp new file mode 100644 index 00000000..e81f1a55 --- /dev/null +++ b/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp @@ -0,0 +1,39 @@ + + + +
Ajax Loading...
+ diff --git a/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp b/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp new file mode 100644 index 00000000..d8d0f780 --- /dev/null +++ b/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp @@ -0,0 +1,116 @@ +"; +if (file_exists($ipblocklist_file)) { + echo " IP-Blocklist"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); + ob_end_clean(); + if ($results > '2') echo ""; + else + echo ""; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " Countryblock"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); + ob_end_clean(); + if ($results > '0') echo ""; + else + echo ""; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + echo " "; + ob_start(); + $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); + ob_end_clean(); + echo $resultsIP; + echo " Networks"; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " "; + ob_start(); + $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); + ob_end_clean(); + echo $resultsCB; + echo " Networks"; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + ob_start(); + $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); + ob_end_clean(); + if ($resultsIP == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsIP; + echo ""; + echo ""; + } +} +if (file_exists($countryblock_file)) { + ob_start(); + $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); + ob_end_clean(); + if ($resultsCB == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsCB; + echo ""; + echo ""; + } +} +echo" "; +//echo" "; +//if (file_exists($ipblocklist_file)) echo "  "; +//if (file_exists($countryblock_file)) echo "  "; +//echo" "; +echo""; + +?> \ No newline at end of file diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index 24147562..ed096d44 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -62,6 +62,11 @@ function php_install_command_ip() exec("rehash"); //rename PHP files from .tmp to .php + exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); + unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); + exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/widgets/widgets/countryblock_ipblocklist_widget.php"); + unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); + exec("cp /tmp/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/ipblocklist/class.phpmailer.php"); unlink_if_exists("/tmp/class.phpmailer.tmp "); diff --git a/config/ipblocklist/8/ipblocklist.xml b/config/ipblocklist/8/ipblocklist.xml index ca488d01..4d38eae4 100755 --- a/config/ipblocklist/8/ipblocklist.xml +++ b/config/ipblocklist/8/ipblocklist.xml @@ -41,7 +41,7 @@ perl http://forum.pfsense.org/index.php/topic,24769.0.html IP Blocklist Settings - 0.3.4 + 0.3.5 Settings /usr/local/pkg/ipblocklist.inc @@ -154,6 +154,16 @@ 0755 http://www.pfsense.org/packages/config/ipblocklist/8/lists.txt + + /tmp/ + 0755 + http://www.pfsense.org/packages/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp + + + /tmp/ + 0755 + http://www.pfsense.org/packages/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp + Variable One -- cgit v1.2.3 From afbe65c905f8e40609e225986fc40f7c7306d5c2 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Mon, 3 Oct 2011 00:45:19 -0400 Subject: correct widget naming --- config/countryblock/countryblock.inc | 2 +- config/ipblocklist/8/ipblocklist.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index cba04cb7..6aca3a91 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -64,7 +64,7 @@ function php_install_command_cb() //rename PHP files from .tmp to .php exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); - exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/widgets/widgets/countryblock_ipblocklist_widget.php"); + exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/countryblock_ipblocklist_widget.php"); unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/countryblock/class.phpmailer.php"); diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index ed096d44..6797f689 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -64,7 +64,7 @@ function php_install_command_ip() //rename PHP files from .tmp to .php exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); - exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/widgets/widgets/countryblock_ipblocklist_widget.php"); + exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/countryblock_ipblocklist_widget.php"); unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); exec("cp /tmp/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); -- cgit v1.2.3 From e178ef94bf3930b9a9bc5e0f563bc0412ae1cee6 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Mon, 3 Oct 2011 10:02:32 -0400 Subject: correct permissions on widget and removed ajax --- config/countryblock/countryblock.inc | 2 - config/countryblock/countryblock.xml | 7 +- .../countryblock_IPBlocklist.widget.tmp | 153 ++++++++++++++++----- .../countryblock_ipblocklist_widget.tmp | 116 ---------------- .../8/countryblock_IPBlocklist.widget.tmp | 153 ++++++++++++++++----- .../8/countryblock_ipblocklist_widget.tmp | 116 ---------------- config/ipblocklist/8/ipblocklist.inc | 2 - config/ipblocklist/8/ipblocklist.xml | 7 +- 8 files changed, 232 insertions(+), 324 deletions(-) delete mode 100644 config/countryblock/countryblock_ipblocklist_widget.tmp delete mode 100644 config/ipblocklist/8/countryblock_ipblocklist_widget.tmp (limited to 'config') diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index 6aca3a91..64c1f4cc 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -64,8 +64,6 @@ function php_install_command_cb() //rename PHP files from .tmp to .php exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); - exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/countryblock_ipblocklist_widget.php"); - unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/countryblock/class.phpmailer.php"); unlink_if_exists("/tmp/class.phpmailer.tmp "); diff --git a/config/countryblock/countryblock.xml b/config/countryblock/countryblock.xml index 6e2ec635..1d278d20 100644 --- a/config/countryblock/countryblock.xml +++ b/config/countryblock/countryblock.xml @@ -166,14 +166,9 @@ /tmp/ - 0755 + 0644 http://www.pfsense.org/packages/config/countryblock/countryblock_IPBlocklist.widget.tmp - - /tmp/ - 0755 - http://www.pfsense.org/packages/config/countryblock/countryblock_ipblocklist_widget.tmp - Variable One diff --git a/config/countryblock/countryblock_IPBlocklist.widget.tmp b/config/countryblock/countryblock_IPBlocklist.widget.tmp index e81f1a55..a62fcede 100644 --- a/config/countryblock/countryblock_IPBlocklist.widget.tmp +++ b/config/countryblock/countryblock_IPBlocklist.widget.tmp @@ -1,39 +1,116 @@ - - - -
Ajax Loading...
+"; +if (file_exists($ipblocklist_file)) { + echo " IP-Blocklist"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); + ob_end_clean(); + if ($results > '2') echo ""; + else + echo ""; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " Countryblock"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); + ob_end_clean(); + if ($results > '0') echo ""; + else + echo ""; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + echo " "; + ob_start(); + $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); + ob_end_clean(); + echo $resultsIP; + echo " Networks"; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " "; + ob_start(); + $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); + ob_end_clean(); + echo $resultsCB; + echo " Networks"; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + ob_start(); + $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); + ob_end_clean(); + if ($resultsIP == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsIP; + echo ""; + echo ""; + } +} +if (file_exists($countryblock_file)) { + ob_start(); + $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); + ob_end_clean(); + if ($resultsCB == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsCB; + echo ""; + echo ""; + } +} +echo" "; +//echo" "; +//if (file_exists($ipblocklist_file)) echo "  "; +//if (file_exists($countryblock_file)) echo "  "; +//echo" "; +echo""; + +?> diff --git a/config/countryblock/countryblock_ipblocklist_widget.tmp b/config/countryblock/countryblock_ipblocklist_widget.tmp deleted file mode 100644 index d8d0f780..00000000 --- a/config/countryblock/countryblock_ipblocklist_widget.tmp +++ /dev/null @@ -1,116 +0,0 @@ -"; -if (file_exists($ipblocklist_file)) { - echo " IP-Blocklist"; - ob_start(); - $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); - ob_end_clean(); - if ($results > '2') echo ""; - else - echo ""; - echo ""; -} -if (file_exists($countryblock_file)) { - echo " Countryblock"; - ob_start(); - $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); - ob_end_clean(); - if ($results > '0') echo ""; - else - echo ""; - echo ""; -} -echo" "; -echo" "; -if (file_exists($ipblocklist_file)) { - echo " "; - ob_start(); - $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); - ob_end_clean(); - echo $resultsIP; - echo " Networks"; - echo ""; -} -if (file_exists($countryblock_file)) { - echo " "; - ob_start(); - $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); - ob_end_clean(); - echo $resultsCB; - echo " Networks"; - echo ""; -} -echo" "; -echo" "; -if (file_exists($ipblocklist_file)) { - ob_start(); - $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); - ob_end_clean(); - if ($resultsIP == "") { - echo " "; - } else { - echo " "; - echo "
"; - echo $resultsIP; - echo ""; - echo ""; - } -} -if (file_exists($countryblock_file)) { - ob_start(); - $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); - ob_end_clean(); - if ($resultsCB == "") { - echo " "; - } else { - echo " "; - echo "
"; - echo $resultsCB; - echo ""; - echo ""; - } -} -echo" "; -//echo" "; -//if (file_exists($ipblocklist_file)) echo "  "; -//if (file_exists($countryblock_file)) echo "  "; -//echo" "; -echo""; - -?> \ No newline at end of file diff --git a/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp b/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp index e81f1a55..a62fcede 100644 --- a/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp +++ b/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp @@ -1,39 +1,116 @@ - - - -
Ajax Loading...
+"; +if (file_exists($ipblocklist_file)) { + echo " IP-Blocklist"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); + ob_end_clean(); + if ($results > '2') echo ""; + else + echo ""; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " Countryblock"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); + ob_end_clean(); + if ($results > '0') echo ""; + else + echo ""; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + echo " "; + ob_start(); + $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); + ob_end_clean(); + echo $resultsIP; + echo " Networks"; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " "; + ob_start(); + $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); + ob_end_clean(); + echo $resultsCB; + echo " Networks"; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + ob_start(); + $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); + ob_end_clean(); + if ($resultsIP == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsIP; + echo ""; + echo ""; + } +} +if (file_exists($countryblock_file)) { + ob_start(); + $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); + ob_end_clean(); + if ($resultsCB == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsCB; + echo ""; + echo ""; + } +} +echo" "; +//echo" "; +//if (file_exists($ipblocklist_file)) echo "  "; +//if (file_exists($countryblock_file)) echo "  "; +//echo" "; +echo""; + +?> diff --git a/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp b/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp deleted file mode 100644 index d8d0f780..00000000 --- a/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp +++ /dev/null @@ -1,116 +0,0 @@ -"; -if (file_exists($ipblocklist_file)) { - echo " IP-Blocklist"; - ob_start(); - $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); - ob_end_clean(); - if ($results > '2') echo ""; - else - echo ""; - echo ""; -} -if (file_exists($countryblock_file)) { - echo " Countryblock"; - ob_start(); - $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); - ob_end_clean(); - if ($results > '0') echo ""; - else - echo ""; - echo ""; -} -echo" "; -echo" "; -if (file_exists($ipblocklist_file)) { - echo " "; - ob_start(); - $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); - ob_end_clean(); - echo $resultsIP; - echo " Networks"; - echo ""; -} -if (file_exists($countryblock_file)) { - echo " "; - ob_start(); - $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); - ob_end_clean(); - echo $resultsCB; - echo " Networks"; - echo ""; -} -echo" "; -echo" "; -if (file_exists($ipblocklist_file)) { - ob_start(); - $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); - ob_end_clean(); - if ($resultsIP == "") { - echo " "; - } else { - echo " "; - echo "
"; - echo $resultsIP; - echo ""; - echo ""; - } -} -if (file_exists($countryblock_file)) { - ob_start(); - $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); - ob_end_clean(); - if ($resultsCB == "") { - echo " "; - } else { - echo " "; - echo "
"; - echo $resultsCB; - echo ""; - echo ""; - } -} -echo" "; -//echo" "; -//if (file_exists($ipblocklist_file)) echo "  "; -//if (file_exists($countryblock_file)) echo "  "; -//echo" "; -echo""; - -?> \ No newline at end of file diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index 6797f689..545cb4ab 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -64,8 +64,6 @@ function php_install_command_ip() //rename PHP files from .tmp to .php exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); - exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/countryblock_ipblocklist_widget.php"); - unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); exec("cp /tmp/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/ipblocklist/class.phpmailer.php"); diff --git a/config/ipblocklist/8/ipblocklist.xml b/config/ipblocklist/8/ipblocklist.xml index 4d38eae4..00ac22b8 100755 --- a/config/ipblocklist/8/ipblocklist.xml +++ b/config/ipblocklist/8/ipblocklist.xml @@ -156,14 +156,9 @@ /tmp/ - 0755 + 0644 http://www.pfsense.org/packages/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp - - /tmp/ - 0755 - http://www.pfsense.org/packages/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp - Variable One -- cgit v1.2.3