Project

General

Profile

Download (21.7 KB) Statistics
| Branch: | Tag: | Revision:
1 df81417f Matthew Grooms
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_misc.php
5
	part of pfSense
6
	Copyright (C) 2005-2007 Scott Ullrich
7
8
	Copyright (C) 2008 Shrew Soft Inc
9
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35 1d333258 Scott Ullrich
/*
36
	pfSense_MODULE:	system
37
*/
38 df81417f Matthew Grooms
39
##|+PRIV
40
##|*IDENT=page-system-advanced-misc
41
##|*NAME=System: Advanced: Miscellaneous page
42
##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page.
43
##|*MATCH=system_advanced.php*
44
##|-PRIV
45
46
require("guiconfig.inc");
47 7a927e67 Scott Ullrich
require_once("functions.inc");
48
require_once("filter.inc");
49
require_once("shaper.inc");
50 127eb8e0 jim-p
require_once("ipsec.inc");
51 7b2fdac4 jim-p
require_once("vpn.inc");
52 6fbe0168 jim-p
require_once("vslb.inc");
53 df81417f Matthew Grooms
54 42c07003 Ermal
$pconfig['proxyurl'] = $config['system']['proxyurl'];
55
$pconfig['proxyport'] = $config['system']['proxyport'];
56
$pconfig['proxyuser'] = $config['system']['proxyuser'];
57
$pconfig['proxypass'] = $config['system']['proxypass'];
58 df81417f Matthew Grooms
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
59
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
60 45736415 jim-p
$pconfig['srctrack'] = $config['system']['srctrack'];
61 f4645d7f Ermal
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
62 df81417f Matthew Grooms
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
63 127eb8e0 jim-p
$pconfig['racoondebug_enable'] = isset($config['ipsec']['racoondebug']);
64 6441fa9a Ermal
$pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']);
65
$pconfig['maxmss'] = $config['system']['maxmss'];
66 8e9fa41d Scott Ullrich
$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']);
67 09f18f59 jim-p
$pconfig['glxsb_enable'] = isset($config['system']['glxsb_enable']);
68 f204df7d Ermal Lu?i
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
69 b0cf10bf Ermal
$pconfig['kill_states'] = isset($config['system']['kill_states']);
70 df81417f Matthew Grooms
71
if ($_POST) {
72
73
    unset($input_errors);
74
    $pconfig = $_POST;
75
76
	ob_flush();
77
	flush();
78
79
	if (!$input_errors) {
80
81
		if($_POST['harddiskstandby'] <> "") {
82
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
83
			system_set_harddisk_standby();
84
		} else
85
			unset($config['system']['harddiskstandby']);
86
87 42c07003 Ermal
		if($_POST['proxyurl'] <> "")
88
			$config['system']['proxyurl'] = $_POST['proxyurl'];
89
		else
90
			unset($config['system']['proxyurl']);
91
92
		if($_POST['proxyport'] <> "")
93
			$config['system']['proxyport'] = $_POST['proxyport'];
94
		else
95
			unset($config['system']['proxyport']);
96
97
		if($_POST['proxyuser'] <> "")
98
			$config['system']['proxyuser'] = $_POST['proxyuser'];
99
		else
100
			unset($config['system']['proxyuser']);
101
102
		if($_POST['proxypass'] <> "")
103
			$config['system']['proxypass'] = $_POST['proxypass'];
104
		else
105
			unset($config['system']['proxypass']);
106
107 6fbe0168 jim-p
		$need_relayd_restart = false;
108 45736415 jim-p
		if($_POST['lb_use_sticky'] == "yes") {
109 6fbe0168 jim-p
			if (!isset($config['system']['lb_use_sticky'])) {
110
				$config['system']['lb_use_sticky'] = true;
111
				$config['system']['srctrack'] = $_POST['srctrack'];
112
				$need_relayd_restart = true;
113
			}
114
		} else {
115
			if (isset($config['system']['lb_use_sticky'])) {
116
				unset($config['system']['lb_use_sticky']);
117
				$need_relayd_restart = true;
118
			}
119
		}
120 df81417f Matthew Grooms
121 f4645d7f Ermal
		if($_POST['gw_switch_default'] == "yes")
122
			$config['system']['gw_switch_default'] = true;
123
		else
124
			unset($config['system']['gw_switch_default']);
125
126 f204df7d Ermal Lu?i
		if($_POST['preferoldsa_enable'] == "yes")
127 7b2fdac4 jim-p
			$config['ipsec']['preferoldsa'] = true;
128 ae0023be jim-p
		elseif (isset($config['ipsec']['preferoldsa']))
129 7b2fdac4 jim-p
			unset($config['ipsec']['preferoldsa']);
130 f204df7d Ermal Lu?i
131 127eb8e0 jim-p
		$need_racoon_restart = false;
132
		if($_POST['racoondebug_enable'] == "yes") {
133
			if (!isset($config['ipsec']['racoondebug'])) {
134
				$config['ipsec']['racoondebug'] = true;
135
				$need_racoon_restart = true;
136
			}
137
		} else {
138
			if (isset($config['ipsec']['racoondebug'])) {
139
				unset($config['ipsec']['racoondebug']);
140
				$need_racoon_restart = true;
141
			}
142
		}
143
144 6441fa9a Ermal
		if($_POST['maxmss_enable'] == "yes") {
145
                        $config['system']['maxmss_enable'] = true;
146
			$config['system']['maxmss'] = $_POST['maxmss'];
147
                } else {
148
                        unset($config['system']['maxmss_enable']);
149
                        unset($config['system']['maxmss']);
150
		}
151
152 f204df7d Ermal Lu?i
		if($_POST['powerd_enable'] == "yes")
153
                        $config['system']['powerd_enable'] = true;
154
                else
155
                        unset($config['system']['powerd_enable']);
156
157
		if($_POST['glxsb_enable'] == "yes")
158
                        $config['system']['glxsb_enable'] = true;
159
                else
160
                        unset($config['system']['glxsb_enable']);
161
162
		if($_POST['schedule_states'] == "yes")
163
                        $config['system']['schedule_states'] = true;
164
                else
165
                        unset($config['system']['schedule_states']);
166 df81417f Matthew Grooms
167 b0cf10bf Ermal
		if($_POST['kill_states'] == "yes")
168
                        $config['system']['kill_states'] = true;
169
                else
170
                        unset($config['system']['kill_states']);
171
172 df81417f Matthew Grooms
		write_config();
173
174
		$retval = 0;
175 6c86a39f Ermal
		system_resolvconf_generate(true);
176 df81417f Matthew Grooms
		$retval = filter_configure();
177
		if(stristr($retval, "error") <> true)
178 1eacdc8a Carlos Eduardo Ramos
		    $savemsg = get_std_save_message(gettext($retval));
179 df81417f Matthew Grooms
		else
180 1eacdc8a Carlos Eduardo Ramos
		    $savemsg = gettext($retval);
181 8e9fa41d Scott Ullrich
		
182
		activate_powerd();
183 09f18f59 jim-p
		load_glxsb();
184 7b2fdac4 jim-p
		vpn_ipsec_configure_preferoldsa();
185 127eb8e0 jim-p
		if ($need_racoon_restart)
186
			vpn_ipsec_force_reload();
187 df81417f Matthew Grooms
	}
188
}
189
190 e51ed1e9 Vinicius Coque
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
191 df81417f Matthew Grooms
include("head.inc");
192
193
?>
194
195
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
196
<?php
197
	include("fbegin.inc");
198
	if ($input_errors)
199
		print_input_errors($input_errors);
200
	if ($savemsg)
201
		print_info_box($savemsg);
202
?>
203 6441fa9a Ermal
<script type="text/javascript" >
204 45736415 jim-p
function sticky_checked(obj) {
205
	if (obj.checked)
206
		jQuery('#srctrack').attr('disabled',false);
207
	else
208
		jQuery('#srctrack').attr('disabled','true');
209
}
210 6441fa9a Ermal
function maxmss_checked(obj) {
211
	if (obj.checked)
212 300e2c0b Vinicius Coque
		jQuery('#maxmss').attr('disabled',false);
213 6441fa9a Ermal
	else
214 300e2c0b Vinicius Coque
		jQuery('#maxmss').attr('disabled','true');
215 6441fa9a Ermal
}
216
</script>
217 ab3c8553 Matthew Grooms
	<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
218
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
219
			<tr>
220
				<td>
221
					<?php
222
						$tab_array = array();
223 e51ed1e9 Vinicius Coque
						$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
224
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
225
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
226
						$tab_array[] = array(gettext("Miscellaneous"), true, "system_advanced_misc.php");
227
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
228
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
229 ab3c8553 Matthew Grooms
						display_top_tabs($tab_array);
230
					?>
231
				</td>
232
			</tr>
233
			<tr>
234 2ff19bfd Matthew Grooms
				<td id="mainarea">
235
					<div class="tabcont">
236
						<span class="vexpl">
237
							<span class="red">
238 ea53e38f Renato Botelho
								<strong><?=gettext("NOTE:"); ?>&nbsp</strong>
239 2ff19bfd Matthew Grooms
							</span>
240 1eacdc8a Carlos Eduardo Ramos
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
241 2ff19bfd Matthew Grooms
							<br/>
242
						</span>
243
						<br/>
244
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
245 42c07003 Ermal
							<tr>
246
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Proxy support"); ?></td>
247
							</tr>
248
							<tr>
249
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy URL"); ?></td>
250
								<td width="78%" class="vtable">
251
									<input name="proxyurl" id="proxyurl" value="<?php if ($pconfig['proxyurl'] <> "") echo $pconfig['proxyurl']; ?>" class="formfld unknown">
252
									<br />
253 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy url for allowing %s to use this proxy to connect outside."),$g['product']); ?>
254 42c07003 Ermal
								</td>
255
							</tr>
256
							<tr>
257
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Port"); ?></td>
258
								<td width="78%" class="vtable">
259
									<input name="proxyport" id="proxyport" value="<?php if ($pconfig['proxyport'] <> "") echo $pconfig['proxyport']; ?>" class="formfld unknown">
260
									<br />
261 f65555eb jim-p
									<?php printf(gettext("Proxy port to use when %s connects to the proxy URL configured above. Default is 8080 for http protocol or 443 for ssl."),$g['product']); ?>
262 42c07003 Ermal
								</td>
263
							</tr>
264
							<tr>
265
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Username"); ?></td>
266
								<td width="78%" class="vtable">
267
									<input name="proxyuser" id="proxyuser" value="<?php if ($pconfig['proxyuser'] <> "") echo $pconfig['proxyuser']; ?>" class="formfld unknown">
268
									<br />
269 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy username for allowing %s to use this proxy to connect outside"),$g['product']); ?>
270 42c07003 Ermal
								</td>
271
							</tr>
272
							<tr>
273 b4eec6e6 jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Pass"); ?></td>
274 42c07003 Ermal
								<td width="78%" class="vtable">
275
									<input type="password" name="proxypass" id="proxypass" value="<?php if ($pconfig['proxypass'] <> "") echo $pconfig['proxypass']; ?>" class="formfld unknown">
276
									<br />
277 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy password for allowing %s to use this proxy to connect outside"),$g['product']); ?>
278 42c07003 Ermal
								</td>
279
							</tr>
280 ab3c8553 Matthew Grooms
							<tr>
281 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
282 ab3c8553 Matthew Grooms
							</tr>
283
							<tr>
284 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
285 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
286 45736415 jim-p
									<input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> onClick="sticky_checked(this)" />
287 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use sticky connections"); ?></strong><br/>
288 f0d1af93 Carlos Eduardo Ramos
									<?=gettext("Successive connections will be redirected to the servers " .
289
									"in a round-robin manner with connections from the same " .
290
									"source being sent to the same web server. This 'sticky " .
291
									"connection' will exist as long as there are states that " .
292
									"refer to this connection. Once the states expire, so will " .
293
									"the sticky connection. Further connections from that host " .
294
									"will be redirected to the next web server in the round " .
295 6fbe0168 jim-p
									"robin. Changing this option will restart the Load Balancing service."); ?>
296 45736415 jim-p
									<br />
297
									<input name="srctrack" id="srctrack" value="<?php if ($pconfig['srctrack'] <> "") echo $pconfig['srctrack']; else "1400"; ?>" class="formfld unknown" <?php if ($pconfig['lb_use_sticky'] == false) echo "disabled"; ?>>
298
									<br />
299
									<?=gettext("Set the source tracking timeout for sticky connections. " .
300
									"By default this is 0, so source tracking is removed as soon as the state expires. " .
301
									"Setting this timeout higher will cause the source/destination relationship to persist for longer periods of time."); ?>
302 ab3c8553 Matthew Grooms
								</td>
303
							</tr>
304 f4645d7f Ermal
							<tr>
305
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
306
								<td width="78%" class="vtable">
307 3781d809 Ermal
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
308 f4645d7f Ermal
									<strong><?=gettext("Allow default gateway switching"); ?></strong><br/>
309
									<?=gettext("If the link where the default gateway resides fails " .
310
									"switch the default gateway to another available one."); ?>
311
								</td>
312
							</tr>
313 c912fe28 Scott Ullrich
							<tr>
314
								<td colspan="2" class="list" height="12">&nbsp;</td>
315
							</tr>
316 ab3c8553 Matthew Grooms
							<tr>
317 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
318 ab3c8553 Matthew Grooms
							</tr>
319 8e9fa41d Scott Ullrich
							<tr>
320 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
321 8e9fa41d Scott Ullrich
								<td width="78%" class="vtable">
322
									<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked"; ?> />
323 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use PowerD"); ?></strong><br/>
324 8e9fa41d Scott Ullrich
									<br />
325 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("The powerd utility monitors the system state and sets various power control " .
326 d0a00ec9 Vinicius Coque
								     "options accordingly. It offers three modes (maximum, minimum, and " .
327 f0d1af93 Carlos Eduardo Ramos
								     "adaptive) that can be individually selected while on AC power or batteries. " . 
328
								     "The modes maximum, minimum, and adaptive may be abbreviated max, " .
329
								     "min, adp.   Maximum mode chooses the highest performance values.  Minimum " .
330
								     "mode selects the lowest performance values to get the most power savings. " .
331
								     "Adaptive mode attempts to strike a balance by degrading performance when " .
332
								     "the system appears idle and increasing it when the system is busy.  It " .
333
								     "offers a good balance between a small performance loss for greatly " .
334 7e1cf139 jim-p
								     "increased power savings.  The default mode for {$g['product_name']} is adaptive."); ?>
335 8e9fa41d Scott Ullrich
								</td>
336
							</tr>
337
							<tr>
338
								<td colspan="2" class="list" height="12">&nbsp;</td>
339
							</tr>
340 09f18f59 jim-p
							<tr>
341 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("glxsb Crypto Acceleration"); ?></td>
342 09f18f59 jim-p
							</tr>
343
							<tr>
344 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("glxsb"); ?></td>
345 09f18f59 jim-p
								<td width="78%" class="vtable">
346
									<input name="glxsb_enable" type="checkbox" id="glxsb_enable" value="yes" <?php if ($pconfig['glxsb_enable']) echo "checked"; ?> />
347 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use glxsb"); ?></strong><br/>
348 09f18f59 jim-p
									<br />
349 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("The AMD Geode LX Security Block will accelerate some cryptographic functions " .
350
								     "on systems which have the chip. Do not enable this option if you have a " .
351
								     "Hifn cryptographic acceleration card, as this will take precedence and the " .
352
								     "Hifn card will not be used. Acceleration should be automatic for IPsec " .
353
								     "when using Rijndael (AES). OpenVPN should be set for AES-128-CBC."); ?>
354 09f18f59 jim-p
								     <br/><br/>
355 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("If you do not have a glxsb chip in your system, this option will have no " .
356
								     "effect. To unload the module, uncheck this option and then reboot."); ?>
357 09f18f59 jim-p
								</td>
358
							</tr>
359
							<tr>
360
								<td colspan="2" class="list" height="12">&nbsp;</td>
361
							</tr>
362 ab3c8553 Matthew Grooms
							<tr>
363 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
364 ab3c8553 Matthew Grooms
							</tr>
365
							<tr>
366 e8c8891d jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Security Associations"); ?></td>
367 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
368 7b2fdac4 jim-p
									<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> />
369 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
370 ab3c8553 Matthew Grooms
									<br />
371 f0d1af93 Carlos Eduardo Ramos
									<?=gettext("By default, if several SAs match, the newest one is " .
372
									"preferred if it's at least 30 seconds old. Select this " .
373
									"option to always prefer old SAs over new ones."); ?>
374 ab3c8553 Matthew Grooms
								</td>
375
							</tr>
376 127eb8e0 jim-p
							<tr>
377
								<td width="22%" valign="top" class="vncell"><?=gettext("IPsec Debug"); ?></td>
378
								<td width="78%" class="vtable">
379
									<input name="racoondebug_enable" type="checkbox" id="racoondebug_enable" value="yes" <?php if ($pconfig['racoondebug_enable']) echo "checked"; ?> />
380
									<strong><?=gettext("Start racoon in debug mode"); ?></strong>
381
									<br />
382
									<?=gettext("Launches racoon in debug mode so that more verbose logs " .
383
									"will be generated to aid in troubleshooting."); ?><br/>
384
									<?=gettext("NOTE: Changing this setting will restart racoon."); ?>
385
								</td>
386
							</tr>
387 6441fa9a Ermal
							<tr>
388
								<td width="22%" valign="top" class="vncell"><?=gettext("Maximum MSS"); ?></td>
389
								<td width="78%" class="vtable">
390
									<input name="maxmss_enable" type="checkbox" id="maxmss_enable" value="yes" <?php if ($pconfig['maxmss_enable'] == true) echo "checked"; ?> onClick="maxmss_checked(this)" />
391 f7ec62f8 Chris Buechler
									<strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong>
392 6441fa9a Ermal
									<br />
393 f7ec62f8 Chris Buechler
									<input name="maxmss" id="maxmss" value="<?php if ($pconfig['maxmss'] <> "") echo $pconfig['maxmss']; else "1400"; ?>" class="formfld unknown" <?php if ($pconfig['maxmss_enable'] == false) echo "disabled"; ?>>
394 6441fa9a Ermal
									<br />
395 f7ec62f8 Chris Buechler
									<?=gettext("Enable MSS clamping on TCP flows over VPN. " .
396
									"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?>
397 6441fa9a Ermal
								</td>
398
							</tr>
399 f204df7d Ermal Lu?i
                                                        <tr>
400
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
401
                                                        </tr>
402
                                                        <tr>
403 1eacdc8a Carlos Eduardo Ramos
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
404 f204df7d Ermal Lu?i
                                                        </tr>
405
                                                        <tr>
406 1eacdc8a Carlos Eduardo Ramos
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
407 f204df7d Ermal Lu?i
                                                                <td width="78%" class="vtable">
408
                                                                        <input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked"; ?> />
409
                                                                        <br />
410 f65555eb jim-p
									<?=gettext("By default schedules clear the states of existing connections when the expiration time has come. ".
411
									"This option overrides that behavior by not clearing states for existing connections."); ?>
412 b0cf10bf Ermal
                                                                </td>
413
                                                        </tr>
414
                                                        <tr>
415
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
416
                                                        </tr>
417
                                                        <tr>
418
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Gateway Monitoring"); ?></td>
419
                                                        </tr>
420
                                                        <tr>
421
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("States"); ?></td>
422
                                                                <td width="78%" class="vtable">
423
                                                                        <input name="kill_states" type="checkbox" id="kill_states" value="yes" <?php if ($pconfig['kill_states']) echo "checked"; ?> />
424
                                                                        <br />
425
									<?=gettext("By default the monitoring process will flush states for a gateway that goes down. ".
426 f65555eb jim-p
									"This option overrides that behavior by not clearing states for existing connections."); ?>
427 f204df7d Ermal Lu?i
                                                                </td>
428
                                                        </tr>
429 ab3c8553 Matthew Grooms
							<tr>
430
								<td colspan="2" class="list" height="12">&nbsp;</td>
431
							</tr>
432
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
433
							<tr>
434 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
435 ab3c8553 Matthew Grooms
							</tr>
436
							<tr>
437 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
438 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
439
									<select name="harddiskstandby" class="formselect">
440
										<?php
441
										 	## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
442
											$sbvals = explode(" ", "0.5,6 1,12 2,24 3,36 4,48 5,60 7.5,90 10,120 15,180 20,240 30,241 60,242");
443
										?>
444 1eacdc8a Carlos Eduardo Ramos
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>><?=gettext("Always on"); ?></option>
445 ab3c8553 Matthew Grooms
										<?php
446
											foreach ($sbvals as $sbval):
447
												list($min,$val) = explode(",", $sbval);
448
										?>
449 1eacdc8a Carlos Eduardo Ramos
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> <?=gettext("minutes"); ?></option>
450 ab3c8553 Matthew Grooms
										<?php endforeach; ?>
451
									</select>
452
									<br/>
453 4d473c89 Vinicius Coque
									<?=gettext("Puts the hard disk into standby mode when the selected amount of time after the last ".
454
									"access has elapsed."); ?> <em><?=gettext("Do not set this for CF cards."); ?></em>
455 ab3c8553 Matthew Grooms
								</td>
456
							</tr>
457
							<tr>
458
								<td colspan="2" class="list" height="12">&nbsp;</td>
459
							</tr>
460
							<?php endif; ?>
461
462
							<tr>
463
								<td width="22%" valign="top">&nbsp;</td>
464
								<td width="78%">
465 267c28ab Vinicius Coque
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
466 ab3c8553 Matthew Grooms
								</td>
467
							</tr>
468
						</table>
469
					</div>
470
				</td>
471
			</tr>
472
		</table>
473
	</form>
474 df81417f Matthew Grooms
475
<?php include("fend.inc"); ?>
476
</body>
477
</html>