Project

General

Profile

Download (1.17 KB) Statistics
| Branch: | Tag: | Revision:
1
global $config;
2
require_once("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 ipv4 via pfSsh.php";
14
$config["filter"]["rule"][] = $filterent;
15
$filterent = array();
16
$filterent["type"] = "pass";
17
$filterent["ipprotocol"] = "inet6";
18
$filterent["interface"] = "wan";
19
$filterent["source"]["any"] = "";
20
$filterent["destination"]["any"] = "";
21
$filterent["statetype"] = "keep state";
22
$filterent["os"] = "";
23
$filterent["descr"] = "Allow all ipv6 via pfSsh.php";
24
$config["filter"]["rule"][] = $filterent;
25
echo "Turning off block private networks (if on)...\n";
26
unset($config["interfaces"]["wan"]["blockpriv"]);
27
unlink_if_exists("/tmp/config.cache");
28
write_config("pfSsh.php added allow all wan rule");
29
unlink_if_exists("/tmp/config.cache");
30
unset($config['interfaces']['wan']['blockbogons']);
31
$config = parse_config(true);
32
echo "Reloading the filter configuration...";
33
filter_configure_sync();
34
echo "\n\n";
(4-4/16)