summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-09 04:06:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-09 04:06:27 +0000
commit0a532a71e591fb0751d7fbe5ad031c744dcd37d0 (patch)
tree840b37165185538625c558ff7b503972f386a0fb /etc/phpshellsessions
parentf47b64ad9d5921e554c79cfb915fb7f0a0d5f27a (diff)
downloadpfsense-0a532a71e591fb0751d7fbe5ad031c744dcd37d0.zip
pfsense-0a532a71e591fb0751d7fbe5ad031c744dcd37d0.tar.gz
Syncing from 2.0
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r--etc/phpshellsessions/disabledhcpd12
-rw-r--r--etc/phpshellsessions/enableallowallwan19
2 files changed, 31 insertions, 0 deletions
diff --git a/etc/phpshellsessions/disabledhcpd b/etc/phpshellsessions/disabledhcpd
new file mode 100644
index 0000000..7f3b17f
--- /dev/null
+++ b/etc/phpshellsessions/disabledhcpd
@@ -0,0 +1,12 @@
+global $config;
+
+$config = parse_config(true);
+
+unset($config['dhcpd']);
+
+echo "Disabling DHCP Server on all interfaces...";
+
+write_config("pfSsh.php disabled dhcp on all interfaces");
+
+services_dhcpd_configure();
+
diff --git a/etc/phpshellsessions/enableallowallwan b/etc/phpshellsessions/enableallowallwan
new file mode 100644
index 0000000..c1466ca
--- /dev/null
+++ b/etc/phpshellsessions/enableallowallwan
@@ -0,0 +1,19 @@
+$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);
+echo "Reloading the filter configuration...";
+filter_configure_sync(); \ No newline at end of file
OpenPOWER on IntegriCloud