Project

General

Profile

Download (5.11 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	firewall_shaper_wizards.php
5
*/
6
/* ====================================================================
7
 *  Copyright (c)  2004-2015  Electric Sheep Fencing, LLC. All rights reserved. 
8
 *  Copyright (c)  2004, 2005 Scott Ullrich
9
 *  Copyright (c)  2008 Ermal Luçi
10
 *
11
 *  Redistribution and use in source and binary forms, with or without modification, 
12
 *  are permitted provided that the following conditions are met: 
13
 *
14
 *  1. Redistributions of source code must retain the above copyright notice,
15
 *      this list of conditions and the following disclaimer.
16
 *
17
 *  2. Redistributions in binary form must reproduce the above copyright
18
 *      notice, this list of conditions and the following disclaimer in
19
 *      the documentation and/or other materials provided with the
20
 *      distribution. 
21
 *
22
 *  3. All advertising materials mentioning features or use of this software 
23
 *      must display the following acknowledgment:
24
 *      "This product includes software developed by the pfSense Project
25
 *       for use in the pfSense software distribution. (http://www.pfsense.org/). 
26
 *
27
 *  4. The names "pfSense" and "pfSense Project" must not be used to
28
 *       endorse or promote products derived from this software without
29
 *       prior written permission. For written permission, please contact
30
 *       coreteam@pfsense.org.
31
 *
32
 *  5. Products derived from this software may not be called "pfSense"
33
 *      nor may "pfSense" appear in their names without prior written
34
 *      permission of the Electric Sheep Fencing, LLC.
35
 *
36
 *  6. Redistributions of any form whatsoever must retain the following
37
 *      acknowledgment:
38
 *
39
 *  "This product includes software developed by the pfSense Project
40
 *  for use in the pfSense software distribution (http://www.pfsense.org/).
41
  *
42
 *  THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
43
 *  EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44
 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
45
 *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
46
 *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
48
 *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
49
 *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50
 *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
51
 *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52
 *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
53
 *  OF THE POSSIBILITY OF SUCH DAMAGE.
54
 *
55
 *  ====================================================================
56
 *
57
 */
58
/*
59
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
60
	pfSense_MODULE: shaper
61
*/
62

    
63
##|+PRIV
64
##|*IDENT=page-firewall-trafficshaper-wizard
65
##|*NAME=Firewall: Traffic Shaper: Wizard page
66
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Wizard' page.
67
##|*MATCH=firewall_shaper_wizards.php*
68
##|-PRIV
69

    
70
require("guiconfig.inc");
71
require_once("functions.inc");
72
require_once("filter.inc");
73
require_once("shaper.inc");
74
require_once("util.inc");
75

    
76
if($_GET['reset'] != "") {
77
	sigkillbyname('pfctl', SIGKILL);
78
	exit;
79
}
80

    
81
if ($_POST['apply']) {
82
	write_config();
83

    
84
	$retval = 0;
85
	/* Setup pf rules since the user may have changed the optimization value */
86
	$retval = filter_configure();
87
	$savemsg = get_std_save_message($retval);
88
	if (stristr($retval, "error") <> true) {
89
		$savemsg = get_std_save_message($retval);
90
	} else {
91
		$savemsg = $retval;
92
	}
93

    
94
	/* reset rrd queues */
95
	unlink_if_exists("/var/db/rrd/*queuedrops.rrd");
96
	unlink_if_exists("/var/db/rrd/*queues.rrd");
97
	enable_rrd_graphing();
98

    
99
	clear_subsystem_dirty('shaper');
100
}
101

    
102
$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Wizards"));
103
$shortcut_section = "trafficshaper";
104

    
105
$wizards = array(
106
	gettext("Multiple Lan/Wan") => "traffic_shaper_wizard_multi_all.xml",
107
	gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml",
108
);
109

    
110
$closehead = false;
111
include("head.inc");
112

    
113
if ($input_errors)
114
	print_input_errors($input_errors);
115

    
116
$tab_array = array();
117
$tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php");
118
$tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
119
$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
120
$tab_array[] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
121
$tab_array[] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
122
display_top_tabs($tab_array);
123

    
124
if ($savemsg)
125
	print_info_box($savemsg, 'success');
126

    
127
if (is_subsystem_dirty('shaper'))
128
	print_info_box_np(gettext("The traffic shaper configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
129

    
130
?>
131
<div class="panel panel-default">
132
	<div class="panel-heading"><h2 class="panel-title"><?=gettext('Traffic Shaper Wizards')?></h2></div>
133
	<div class="panel-body">
134
		<dl	 class="dl-horizontal responsive">
135
<?php
136
foreach ($wizards as $key => $wizard):
137
?>
138
			<dt>
139
				<?=$key?>
140
			</dt>
141
			<dd>
142
				<?='<a href="wizard.php?xml=' . $wizard . '">' . $wizard . '</a>'?>
143
			</dd>
144
<?php
145
endforeach;
146
?>
147
		</dl>
148
	</div>
149
</div>
150
<?php
151
include("foot.inc");
(69-69/238)