diff options
author | Tom Schaefer <tom@tomschaefer.org> | 2010-10-02 04:46:58 -0400 |
---|---|---|
committer | Tom Schaefer <tom@tomschaefer.org> | 2010-10-02 04:46:58 -0400 |
commit | 2456629c6f172395dc7a0d32d4a622c6167da9ee (patch) | |
tree | 24a1e895be93e9db6874d00c6f2280e998ee60c8 /config/countryblock | |
parent | 499c6afe4081ff9c76547da116a1e7cdad09fb39 (diff) | |
download | pfsense-packages-2456629c6f172395dc7a0d32d4a622c6167da9ee.tar.gz pfsense-packages-2456629c6f172395dc7a0d32d4a622c6167da9ee.tar.bz2 pfsense-packages-2456629c6f172395dc7a0d32d4a622c6167da9ee.zip |
fixed two bugs that were introduced in the last upgrade
Diffstat (limited to 'config/countryblock')
-rwxr-xr-x | config/countryblock/countryblock.tmp | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | config/countryblock/whitelist.tmp | 141 |
2 files changed, 85 insertions, 58 deletions
diff --git a/config/countryblock/countryblock.tmp b/config/countryblock/countryblock.tmp index 2d05d061..48de3021 100755 --- a/config/countryblock/countryblock.tmp +++ b/config/countryblock/countryblock.tmp @@ -301,7 +301,7 @@ background-color: #F3F3F3; ?> - of 246 selected. </h3> + of 246 selected. </h3><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>select/unselect <br/> diff --git a/config/countryblock/whitelist.tmp b/config/countryblock/whitelist.tmp index 46e26608..b73c24ad 100644..100755 --- a/config/countryblock/whitelist.tmp +++ b/config/countryblock/whitelist.tmp @@ -1,14 +1,6 @@ <?php - - // TomSchaefer.org countryblock package 2010 - // - // Notes: Find: ^(.*)$ - // Replace: ob_start();\n$results = exec("cat countries-white.txt | grep XX");\nob_end_clean();\n\tif ($results == 'XX')\n\t\techo "\1";\n\telse\n\t\techo "\1";\n - // - // - // - // - require_once('config.inc'); +$pgtitle = "Firewall: Countryblock - Whitelist"; + require("guiconfig.inc"); include("head.inc"); @@ -21,25 +13,19 @@ //phpinfo(); - -?><head> -<?php include("fbegin.inc"); ?> -<style type="text/css"> -<!-- -.white { - text-align: center; -} ---> -</style> - - + +?> -<p class="pgtitle">Firewall: Country Block - Whitelist</p> +<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> +<?php include("fbegin.inc"); ?> +<p class="pgtitle"><?=$pgtitle?></p> +<?php if ($input_errors) print_input_errors($input_errors); ?> +<?php if ($savemsg) print_info_box($savemsg); ?> <form method=POST action=""> - <?php +<?php mwexec("touch countries-white.txt"); @@ -48,37 +34,34 @@ mwexec("touch countries-white.txt"); ?> - - -<script type="text/javascript" src="jquery.min.js"></script> - - - -<style type="text/css"> - -a img {border:none; } - -</style> -<!--<span class="tabcont">--> -<?php if ($savemsg_cb) print_info_box($savemsg_cb); - //if ($output) print_info_box($output,$output2); - echo($output); - echo($output2); - ?> -</span> - -</head> -<br><br> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - + <tr><td class="tabnavtbl"> +<?php + $tab_array = array(); + $tab_array[0] = array("Countries", false, "countryblock.php"); + $tab_array[1] = array("Settings", false, "settings.php"); + $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"); + display_top_tabs($tab_array); +?> + </td></tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="listhdrr">Whitelist</td> + + </tr> + + <tr> + <td class="listlr" valign="middle"> + +<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td class="tabcont" > - <a href="countryblock.php" target="_parent"><img src="../../themes/nervecenter/images/icons/icon_alias_url_reload.gif" ALT="Manual" ALIGN=RIGHT></a> -</form> - - <form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post"> - <p> + +<p> Enter the CIDR Range you would like to whitlist</p> <p><form method="post" action=""> <input name="content" type="text" /> @@ -200,14 +183,58 @@ echo "<br/><br/>"; <br/><br/> </p> </form> -<br/> + + </div> + + </td> </tr> </table> -</form> + </td> + + + </tr> + + +</table> +</div> +<br> +<?php + echo "Current Status = "; + ob_start(); + $results = exec("pfctl -s rules | grep -c countryblock"); + ob_end_clean(); + if ($results > '0') echo "Running"; + else + echo "<span style='color:red'>NOT running</span>"; + + //Get Errors if exists + ob_start(); + $results = exec("tail -r errorOUT.txt"); + ob_end_clean(); + echo "<br/><span style='color:red'>"; + echo $results; + echo "</span>"; + + //Get IP Count + echo "<br>You are blocking "; + ob_start(); + $results = exec("pfctl -T show -t countryblock |grep -v -c Z"); + ob_end_clean(); + echo $results; + echo " Networks"; + ?> -<?php include("fend.inc"); ?> +<br><br> +<p> +</p> +</td> + </tr> +</table> +</form> +<?php include("fend.inc"); ?> </body> -</html>
\ No newline at end of file +</html> + |