summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-08 08:03:15 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-08 08:03:15 +0000
commite5b86d7c06b73e543f690b6e78bd0c67bcdc50bd (patch)
treea6f38ce15e5841686be05e26be39fcc538438a9e /etc/phpshellsessions
parent11d409b05957488731280fafa2dc04de16279df3 (diff)
downloadpfsense-e5b86d7c06b73e543f690b6e78bd0c67bcdc50bd.zip
pfsense-e5b86d7c06b73e543f690b6e78bd0c67bcdc50bd.tar.gz
Add script which automatically enables a default firewall rule on wan and
disable block private networks on the wan interface.
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r--etc/phpshellsessions/enableallowallwan17
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/phpshellsessions/enableallowallwan b/etc/phpshellsessions/enableallowallwan
new file mode 100644
index 0000000..c9aacd7
--- /dev/null
+++ b/etc/phpshellsessions/enableallowallwan
@@ -0,0 +1,17 @@
+$config = parse_config(true);
+echo "Adding allow all rule...\n";
+$filterent = array();
+$filterent["type"] = "pass";
+$filterent["interface"] = "wan";
+$filterent["source"]["any"] = "";
+$filterent["destination"]["any"] = "";
+$filterent["statetype"] = "keep any";
+$filterent["os"] = "";
+$filterent["descr"] = "Allow all via pfSsh.php";
+$config["filter"]["rule"][] = $filterent;
+echo "Turning off block private networks (if on)...\n";
+unset($config["interfaces"]["wan"]["blockpriv"]);
+unlink_if_exists("/tmp/config.cache");
+write_config("pfSsh.php added allow all wan rule");
+unlink_if_exists("/tmp/config.cache");
+$config = parse_config(true);
OpenPOWER on IntegriCloud