Syncing from 2.0

This commit is contained in:
Scott Ullrich 2008-11-09 04:06:27 +00:00
parent f47b64ad9d
commit 0a532a71e5
2 changed files with 31 additions and 0 deletions

View File

@ -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();

View File

@ -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();