mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Syncing from 2.0
This commit is contained in:
parent
f47b64ad9d
commit
0a532a71e5
12
etc/phpshellsessions/disabledhcpd
Normal file
12
etc/phpshellsessions/disabledhcpd
Normal 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();
|
||||
|
||||
19
etc/phpshellsessions/enableallowallwan
Normal file
19
etc/phpshellsessions/enableallowallwan
Normal 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();
|
||||
Loading…
Reference in New Issue
Block a user