diff options
author | Tom Schaefer <tom@tomschaefer.org> | 2010-09-30 04:04:17 -0400 |
---|---|---|
committer | Tom Schaefer <tom@tomschaefer.org> | 2010-09-30 04:04:17 -0400 |
commit | 7a331fae4f2692d3a8f5255ed22ea571c092815a (patch) | |
tree | 6483fdcd248fa1e3d3e5a17f1aca4ff4d6684096 /config/countryblock | |
parent | fbe0871ca99561c5476103c5365d73b7b282c4b7 (diff) | |
download | pfsense-packages-7a331fae4f2692d3a8f5255ed22ea571c092815a.tar.gz pfsense-packages-7a331fae4f2692d3a8f5255ed22ea571c092815a.tar.bz2 pfsense-packages-7a331fae4f2692d3a8f5255ed22ea571c092815a.zip |
ver 1.6 added usage details, all interfaces enabled by default
Diffstat (limited to 'config/countryblock')
-rw-r--r-- | config/countryblock/countryblock.inc | 2 | ||||
-rwxr-xr-x | config/countryblock/countryblock.tmp | 16 | ||||
-rw-r--r-- | config/countryblock/countryblock.xml | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | config/countryblock/countryblock_if.tmp | 8 | ||||
-rw-r--r-- | config/countryblock/interfaces.txt | 1 |
5 files changed, 24 insertions, 10 deletions
diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index e716f25b..46429563 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -84,6 +84,8 @@ function php_install_command_cb() unlink_if_exists("/tmp/purge.tmp"); exec("cp /tmp/whitelist.tmp /usr/local/www/packages/countryblock/whitelist.php"); unlink_if_exists("/tmp/whitelist.tmp"); + exec("cp /tmp/interfaces.txt /usr/local/www/packages/countryblock/interfaces.txt"); + unlink_if_exists("/tmp/interfaces.txt"); diff --git a/config/countryblock/countryblock.tmp b/config/countryblock/countryblock.tmp index f95c2e7c..785329a2 100755 --- a/config/countryblock/countryblock.tmp +++ b/config/countryblock/countryblock.tmp @@ -2586,12 +2586,16 @@ ob_end_clean(); - <u>Usage</u> + <p><u>Usage</u> <br/> - Check the country that you would like to block completely. Affects in & out traffic. - <br/><span style="color:red">Warning!</span> - Apply after every firewall change or state reset. Use at your own risk. - <br/><br/> - <input type="submit" name="formSubmit" value="Commit Countries" /> + Check the country that you would like to block completely. Choose if you want to block outbound access and if you want to log attempts. Click "Commit Countries" to store your settings. <br/> + When your settings are stored select "Enable Country Block" and press save to enable to package.<br /> + To run countryblock as a cron job use /usr/local/etc/rc.d/countryblock.sh <br /> + To whitelist a CIDR range press <a href="whitelist.php" target="_parent"><img src="../../themes/nervecenter/images/icons/icon_plus.gif" ALT="Manual"></a> and to specify interfaces press <a href="countryblock_if.php" target="_parent"><img src="../../themes/nervecenter/images/icons/icon_cablenic.gif" ALT="Manual"></a>. By default all interfaces are selected. <br /> + <span style="color:red">Warning!</span> - Apply after every firewall change or state reset. Use at your own risk. + <br/><br/> + <input type="submit" name="formSubmit" value="Commit Countries" /> + </p> </form> <br/> @@ -2630,7 +2634,7 @@ ob_end_clean(); </td> </tr> -</table> +</table><br /> <input type="submit" value="Save/Update"> </form> diff --git a/config/countryblock/countryblock.xml b/config/countryblock/countryblock.xml index 4edc4a6e..b89a38f5 100644 --- a/config/countryblock/countryblock.xml +++ b/config/countryblock/countryblock.xml @@ -41,7 +41,7 @@ <requirements>Active Internet</requirements> <faq>http://forum.pfsense.org/index.php/topic,25732.0.html</faq> <name>Country Block Settings</name> - <version>0.1.5</version> + <version>0.1.6</version> <title>Settings</title> <include_file>/usr/local/pkg/countryblock.inc</include_file> <menu> @@ -67,6 +67,11 @@ <additional_files_needed> <prefix>/usr/local/pkg/</prefix> <chmod>0755</chmod> + <item>http://www.pfsense.org/packages/config/countryblock/interfaces.txt</item> + </additional_files_needed> + <additional_files_needed> + <prefix>/usr/local/pkg/</prefix> + <chmod>0755</chmod> <item>http://www.pfsense.org/packages/config/countryblock/countryblock.inc</item> </additional_files_needed> <additional_files_needed> diff --git a/config/countryblock/countryblock_if.tmp b/config/countryblock/countryblock_if.tmp index 405e1aec..11a81414 100644..100755 --- a/config/countryblock/countryblock_if.tmp +++ b/config/countryblock/countryblock_if.tmp @@ -148,9 +148,11 @@ include("head.inc"); <?php if ($portname == $iface['if']) { ob_start(); + $resultsany = exec("cat interfaces.txt | grep any"); $results = exec("cat interfaces.txt | grep $portname"); ob_end_clean(); - if ($results == $portname) + + if ($results == $portname || $resultsany == any) echo "<input name='$portname' type='checkbox' value='$portname' checked/>$portname"; else echo "<input name='$portname' type='checkbox' value='$portname' />$portname"; @@ -174,8 +176,8 @@ include("head.inc"); <p><br> <input type="submit" class="formbtn" value="Save"> </p> - <p>Select the interfaces you want secured. </p> - <p>I <strong>highly</strong> recommend selecting <u>all</u> interfaces. <br> + <p>Select the interfaces you want secured. It's recommended to select all interfaces. </p> + <p>Default: All interfaces are seleted. <br> <br> </p> <p></p></td> diff --git a/config/countryblock/interfaces.txt b/config/countryblock/interfaces.txt new file mode 100644 index 00000000..124009d7 --- /dev/null +++ b/config/countryblock/interfaces.txt @@ -0,0 +1 @@ +any
\ No newline at end of file |