1
|
global $config;
|
2
|
require("filter.inc");
|
3
|
require("shaper.inc");
|
4
|
$config = parse_config(true);
|
5
|
echo "Adding allow all rule...\n";
|
6
|
$filterent = array();
|
7
|
$filterent["type"] = "pass";
|
8
|
$filterent["interface"] = "wan";
|
9
|
$filterent["source"]["any"] = "";
|
10
|
$filterent["destination"]["any"] = "";
|
11
|
$filterent["statetype"] = "keep state";
|
12
|
$filterent["os"] = "";
|
13
|
$filterent["descr"] = "Allow all via pfSsh.php";
|
14
|
$config["filter"]["rule"][] = $filterent;
|
15
|
echo "Turning off block private networks (if on)...\n";
|
16
|
unset($config["interfaces"]["wan"]["blockpriv"]);
|
17
|
unlink_if_exists("/tmp/config.cache");
|
18
|
write_config("pfSsh.php added allow all wan rule");
|
19
|
unlink_if_exists("/tmp/config.cache");
|
20
|
unset($config['interfaces']['wan']['blockbogons']);
|
21
|
$config = parse_config(true);
|
22
|
echo "Reloading the filter configuration...";
|
23
|
filter_configure_sync();
|
24
|
echo "\n\n";
|