Project

General

Profile

Download (25.5 KB) Statistics
| Branch: | Tag: | Revision:
1
<?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
/*
36
	pfSense_MODULE:	system
37
*/
38

    
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
require_once("functions.inc");
48
require_once("filter.inc");
49
require_once("shaper.inc");
50
require_once("ipsec.inc");
51
require_once("vpn.inc");
52
require_once("vslb.inc");
53

    
54
$pconfig['proxyurl'] = $config['system']['proxyurl'];
55
$pconfig['proxyport'] = $config['system']['proxyport'];
56
$pconfig['proxyuser'] = $config['system']['proxyuser'];
57
$pconfig['proxypass'] = $config['system']['proxypass'];
58
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
59
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
60
$pconfig['srctrack'] = $config['system']['srctrack'];
61
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
62
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
63
$pconfig['racoondebug_enable'] = isset($config['ipsec']['racoondebug']);
64
$pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']);
65
$pconfig['maxmss'] = $config['system']['maxmss'];
66
$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']);
67
$pconfig['crypto_hardware'] = $config['system']['crypto_hardware'];
68
$pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
69
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
70
$pconfig['kill_states'] = isset($config['system']['kill_states']);
71

    
72
if (!empty($config['system']['powerd_mode']))
73
	$pconfig['powerd_mode'] = $config['system']['powerd_mode'];
74
else
75
	$pconfig['powerd_mode'] = "hadp";
76

    
77
$crypto_modules = array('glxsb' => gettext("AMD Geode LX Security Block"),
78
			'aesni' => gettext("AES-NI CPU-based Acceleration"));
79

    
80
$thermal_hardware_modules = array(	'coretemp' => gettext("Intel Core* CPU on-die thermal sensor"),
81
					'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor"));
82

    
83
if ($_POST) {
84

    
85
    unset($input_errors);
86
    $pconfig = $_POST;
87

    
88
	ob_flush();
89
	flush();
90

    
91
	if (!empty($_POST['crypto_hardware']) && !array_key_exists($_POST['crypto_hardware'], $crypto_modules))
92
		$input_errors[] = gettext("Please select a valid Cryptographic Accelerator.");
93

    
94
	if (!empty($_POST['thermal_hardware']) && !array_key_exists($_POST['thermal_hardware'], $thermal_hardware_modules))
95
		$input_errors[] = gettext("Please select a valid Thermal Hardware Sensor.");
96

    
97
	if (!$input_errors) {
98

    
99
		if($_POST['harddiskstandby'] <> "") {
100
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
101
			system_set_harddisk_standby();
102
		} else
103
			unset($config['system']['harddiskstandby']);
104

    
105
		if($_POST['proxyurl'] <> "")
106
			$config['system']['proxyurl'] = $_POST['proxyurl'];
107
		else
108
			unset($config['system']['proxyurl']);
109

    
110
		if($_POST['proxyport'] <> "")
111
			$config['system']['proxyport'] = $_POST['proxyport'];
112
		else
113
			unset($config['system']['proxyport']);
114

    
115
		if($_POST['proxyuser'] <> "")
116
			$config['system']['proxyuser'] = $_POST['proxyuser'];
117
		else
118
			unset($config['system']['proxyuser']);
119

    
120
		if($_POST['proxypass'] <> "")
121
			$config['system']['proxypass'] = $_POST['proxypass'];
122
		else
123
			unset($config['system']['proxypass']);
124

    
125
		$need_relayd_restart = false;
126
		if($_POST['lb_use_sticky'] == "yes") {
127
			if (!isset($config['system']['lb_use_sticky'])) {
128
				$config['system']['lb_use_sticky'] = true;
129
				$config['system']['srctrack'] = $_POST['srctrack'];
130
				$need_relayd_restart = true;
131
			}
132
		} else {
133
			if (isset($config['system']['lb_use_sticky'])) {
134
				unset($config['system']['lb_use_sticky']);
135
				$need_relayd_restart = true;
136
			}
137
		}
138

    
139
		if($_POST['gw_switch_default'] == "yes")
140
			$config['system']['gw_switch_default'] = true;
141
		else
142
			unset($config['system']['gw_switch_default']);
143

    
144
		if($_POST['preferoldsa_enable'] == "yes")
145
			$config['ipsec']['preferoldsa'] = true;
146
		elseif (isset($config['ipsec']['preferoldsa']))
147
			unset($config['ipsec']['preferoldsa']);
148

    
149
		$need_racoon_restart = false;
150
		if($_POST['racoondebug_enable'] == "yes") {
151
			if (!isset($config['ipsec']['racoondebug'])) {
152
				$config['ipsec']['racoondebug'] = true;
153
				$need_racoon_restart = true;
154
			}
155
		} else {
156
			if (isset($config['ipsec']['racoondebug'])) {
157
				unset($config['ipsec']['racoondebug']);
158
				$need_racoon_restart = true;
159
			}
160
		}
161

    
162
		if($_POST['maxmss_enable'] == "yes") {
163
                        $config['system']['maxmss_enable'] = true;
164
			$config['system']['maxmss'] = $_POST['maxmss'];
165
                } else {
166
                        unset($config['system']['maxmss_enable']);
167
                        unset($config['system']['maxmss']);
168
		}
169

    
170
		if($_POST['powerd_enable'] == "yes")
171
                        $config['system']['powerd_enable'] = true;
172
                else
173
                        unset($config['system']['powerd_enable']);
174

    
175
		$config['system']['powerd_mode'] = $_POST['powerd_mode'];
176

    
177
		if($_POST['crypto_hardware'])
178
			$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
179
		else
180
			unset($config['system']['crypto_hardware']);
181

    
182
		if($_POST['thermal_hardware'])
183
			$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
184
		else
185
			unset($config['system']['thermal_hardware']);
186

    
187
		if($_POST['schedule_states'] == "yes")
188
                        $config['system']['schedule_states'] = true;
189
                else
190
                        unset($config['system']['schedule_states']);
191

    
192
		if($_POST['kill_states'] == "yes")
193
                        $config['system']['kill_states'] = true;
194
                else
195
                        unset($config['system']['kill_states']);
196

    
197
		write_config();
198

    
199
		$retval = 0;
200
		system_resolvconf_generate(true);
201
		$retval = filter_configure();
202
		if(stristr($retval, "error") <> true)
203
		    $savemsg = get_std_save_message(gettext($retval));
204
		else
205
		    $savemsg = gettext($retval);
206
		
207
		activate_powerd();
208
		load_crypto();
209
		load_thermal_hardware();
210
		vpn_ipsec_configure_preferoldsa();
211
		if ($need_racoon_restart)
212
			vpn_ipsec_force_reload();
213
		if ($need_relayd_restart)
214
			relayd_configure();
215
	}
216
}
217

    
218
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
219
include("head.inc");
220

    
221
?>
222

    
223
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
224
<?php
225
	include("fbegin.inc");
226
	if ($input_errors)
227
		print_input_errors($input_errors);
228
	if ($savemsg)
229
		print_info_box($savemsg);
230
?>
231
<script type="text/javascript" >
232
function sticky_checked(obj) {
233
	if (obj.checked)
234
		jQuery('#srctrack').attr('disabled',false);
235
	else
236
		jQuery('#srctrack').attr('disabled','true');
237
}
238
function maxmss_checked(obj) {
239
	if (obj.checked)
240
		jQuery('#maxmss').attr('disabled',false);
241
	else
242
		jQuery('#maxmss').attr('disabled','true');
243
}
244
</script>
245
	<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
246
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
247
			<tr>
248
				<td>
249
					<?php
250
						$tab_array = array();
251
						$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
252
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
253
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
254
						$tab_array[] = array(gettext("Miscellaneous"), true, "system_advanced_misc.php");
255
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
256
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
257
						display_top_tabs($tab_array);
258
					?>
259
				</td>
260
			</tr>
261
			<tr>
262
				<td id="mainarea">
263
					<div class="tabcont">
264
						<span class="vexpl">
265
							<span class="red">
266
								<strong><?=gettext("NOTE:"); ?>&nbsp</strong>
267
							</span>
268
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
269
							<br/>
270
						</span>
271
						<br/>
272
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
273
							<tr>
274
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Proxy support"); ?></td>
275
							</tr>
276
							<tr>
277
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy URL"); ?></td>
278
								<td width="78%" class="vtable">
279
									<input name="proxyurl" id="proxyurl" value="<?php if ($pconfig['proxyurl'] <> "") echo $pconfig['proxyurl']; ?>" class="formfld unknown">
280
									<br />
281
									<?php printf(gettext("Proxy url for allowing %s to use this proxy to connect outside."),$g['product']); ?>
282
								</td>
283
							</tr>
284
							<tr>
285
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Port"); ?></td>
286
								<td width="78%" class="vtable">
287
									<input name="proxyport" id="proxyport" value="<?php if ($pconfig['proxyport'] <> "") echo $pconfig['proxyport']; ?>" class="formfld unknown">
288
									<br />
289
									<?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']); ?>
290
								</td>
291
							</tr>
292
							<tr>
293
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Username"); ?></td>
294
								<td width="78%" class="vtable">
295
									<input name="proxyuser" id="proxyuser" value="<?php if ($pconfig['proxyuser'] <> "") echo $pconfig['proxyuser']; ?>" class="formfld unknown">
296
									<br />
297
									<?php printf(gettext("Proxy username for allowing %s to use this proxy to connect outside"),$g['product']); ?>
298
								</td>
299
							</tr>
300
							<tr>
301
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Pass"); ?></td>
302
								<td width="78%" class="vtable">
303
									<input type="password" name="proxypass" id="proxypass" value="<?php if ($pconfig['proxypass'] <> "") echo $pconfig['proxypass']; ?>" class="formfld unknown">
304
									<br />
305
									<?php printf(gettext("Proxy password for allowing %s to use this proxy to connect outside"),$g['product']); ?>
306
								</td>
307
							</tr>
308
							<tr>
309
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
310
							</tr>
311
							<tr>
312
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
313
								<td width="78%" class="vtable">
314
									<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)" />
315
									<strong><?=gettext("Use sticky connections"); ?></strong><br/>
316
									<?=gettext("Successive connections will be redirected to the servers " .
317
									"in a round-robin manner with connections from the same " .
318
									"source being sent to the same web server. This 'sticky " .
319
									"connection' will exist as long as there are states that " .
320
									"refer to this connection. Once the states expire, so will " .
321
									"the sticky connection. Further connections from that host " .
322
									"will be redirected to the next web server in the round " .
323
									"robin. Changing this option will restart the Load Balancing service."); ?>
324
									<br />
325
									<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"; ?>>
326
									<br />
327
									<?=gettext("Set the source tracking timeout for sticky connections. " .
328
									"By default this is 0, so source tracking is removed as soon as the state expires. " .
329
									"Setting this timeout higher will cause the source/destination relationship to persist for longer periods of time."); ?>
330
								</td>
331
							</tr>
332
							<tr>
333
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
334
								<td width="78%" class="vtable">
335
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
336
									<strong><?=gettext("Allow default gateway switching"); ?></strong><br/>
337
									<?=gettext("If the link where the default gateway resides fails " .
338
									"switch the default gateway to another available one."); ?>
339
								</td>
340
							</tr>
341
							<tr>
342
								<td colspan="2" class="list" height="12">&nbsp;</td>
343
							</tr>
344
							<tr>
345
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
346
							</tr>
347
							<tr>
348
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
349
								<td width="78%" class="vtable">
350
									<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked"; ?> />
351
									<strong><?=gettext("Use PowerD"); ?></strong><br/>
352
									<br/>
353
									<?=gettext("Mode"); ?>&nbsp;:&nbsp;
354
									<select name="powerd_mode" id="powerd_mode">
355
										<option value="hadp"<?php if($pconfig['powerd_mode']=="hadp") echo " selected"; ?>><?=gettext("Hiadaptive");?></option>
356
										<option value="adp"<?php if($pconfig['powerd_mode']=="adp") echo " selected"; ?>><?=gettext("Adaptive");?></option>
357
										<option value="min"<?php if($pconfig['powerd_mode']=="min") echo " selected"; ?>><?=gettext("Minimum");?></option>
358
										<option value="max"<?php if($pconfig['powerd_mode']=="max") echo " selected"; ?>><?=gettext("Maximum");?></option>
359
									</select>
360
									<br/><br/>
361
								     <?=gettext("The powerd utility monitors the system state and sets various power control " .
362
								     "options accordingly.  It offers four modes (maximum, minimum, adaptive " .
363
								     "and hiadaptive) that can be individually selected while on AC power or batteries. " . 
364
								     "The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " .
365
								     "min, adp, hadp.  Maximum mode chooses the highest performance values.  Minimum " .
366
								     "mode selects the lowest performance values to get the most power savings. " .
367
								     "Adaptive mode attempts to strike a balance by degrading performance when " .
368
								     "the system appears idle and increasing it when the system is busy.  It " .
369
								     "offers a good balance between a small performance loss for greatly " .
370
								     "increased power savings.  Hiadaptive mode is alike adaptive mode, but " .
371
									 "tuned for systems where performance and interactivity are more important" .
372
									 "than power consumption.  It rises frequency faster, drops slower and" .
373
									 "keeps twice lower CPU load."); ?>
374
								</td>
375
							</tr>
376
							<tr>
377
								<td colspan="2" class="list" height="12">&nbsp;</td>
378
							</tr>
379
							<tr>
380
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Hardware Acceleration"); ?></td>
381
							</tr>
382
							<tr>
383
								<td width="22%" valign="top" class="vncell"><?=gettext("Cryptographic Hardware"); ?></td>
384
								<td width="78%" class="vtable">
385
									<select name="crypto_hardware" id="crypto_hardware">
386
										<option value=""><?php echo gettext("None"); ?></option>
387
										<?php foreach ($crypto_modules as $cryptomod_name => $cryptomod_descr): ?>
388
											<option value="<?php echo $cryptomod_name; ?>" <?php if ($pconfig['crypto_hardware'] == $cryptomod_name) echo " selected"; ?>><?php echo "{$cryptomod_descr} ({$cryptomod_name})"; ?></option>
389
										<?php endforeach; ?>
390
									</select>
391
									<br />
392
								     <?=gettext("A cryptographic accelerator module will use hardware support to speed up some " .
393
										"cryptographic functions on systems which have the chip. Do not enable this " .
394
										"option if you have a Hifn cryptographic acceleration card, as this will take " .
395
										"precedence and the Hifn card will not be used. Acceleration should be automatic " .
396
										"for IPsec when using a cipher supported by your chip, such as AES-128. OpenVPN " .
397
										"should be set for AES-128-CBC and have cryptodev enabled for hardware " .
398
										"acceleration."); ?>
399
								     <br/><br/>
400
								     <?=gettext("If you do not have a crypto chip in your system, this option will have no " .
401
								     "effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
402
								</td>
403
							</tr>
404
							<tr>
405
								<td colspan="2" class="list" height="12">&nbsp;</td>
406
							</tr>
407
							<tr>
408
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Thermal Sensors"); ?></td>
409
							</tr>
410
							<tr>
411
								<td width="22%" valign="top" class="vncell"><?=gettext("Thermal Sensors"); ?></td>
412
								<td width="78%" class="vtable">
413
								<select name="thermal_hardware" id="thermal_hardware">
414
									<option value=""><?php echo gettext("None/ACPI"); ?></option>
415
									<?php foreach ($thermal_hardware_modules as $themalmod_name => $themalmod_descr): ?>
416
										<option value="<?php echo $themalmod_name; ?>" <?php if ($pconfig['thermal_hardware'] == $themalmod_name) echo " selected"; ?>><?php echo "{$themalmod_descr} ({$themalmod_name})"; ?></option>
417
									<?php endforeach; ?>
418
								</select>
419
								<br />
420
								<?=gettext("If you have a supported CPU, selecting a themal sensor will load the appropriate " .
421
										"driver to read its temperature. Setting this to 'None' will attempt to read the " .
422
										"temperature from an ACPI-compliant motherboard sensor instead, if one is present."); ?>
423
								<br/><br/>
424
								<?=gettext("If you do not have a supported thermal sensor chip in your system, this option will have no " .
425
									"effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
426
								</td>
427
							</tr>
428
							<tr>
429
								<td colspan="2" class="list" height="12">&nbsp;</td>
430
							</tr>
431
							<tr>
432
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
433
							</tr>
434
							<tr>
435
								<td width="22%" valign="top" class="vncell"><?=gettext("Security Associations"); ?></td>
436
								<td width="78%" class="vtable">
437
									<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> />
438
									<strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
439
									<br />
440
									<?=gettext("By default, if several SAs match, the newest one is " .
441
									"preferred if it's at least 30 seconds old. Select this " .
442
									"option to always prefer old SAs over new ones."); ?>
443
								</td>
444
							</tr>
445
							<tr>
446
								<td width="22%" valign="top" class="vncell"><?=gettext("IPsec Debug"); ?></td>
447
								<td width="78%" class="vtable">
448
									<input name="racoondebug_enable" type="checkbox" id="racoondebug_enable" value="yes" <?php if ($pconfig['racoondebug_enable']) echo "checked"; ?> />
449
									<strong><?=gettext("Start racoon in debug mode"); ?></strong>
450
									<br />
451
									<?=gettext("Launches racoon in debug mode so that more verbose logs " .
452
									"will be generated to aid in troubleshooting."); ?><br/>
453
									<?=gettext("NOTE: Changing this setting will restart racoon."); ?>
454
								</td>
455
							</tr>
456
							<tr>
457
								<td width="22%" valign="top" class="vncell"><?=gettext("Maximum MSS"); ?></td>
458
								<td width="78%" class="vtable">
459
									<input name="maxmss_enable" type="checkbox" id="maxmss_enable" value="yes" <?php if ($pconfig['maxmss_enable'] == true) echo "checked"; ?> onClick="maxmss_checked(this)" />
460
									<strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong>
461
									<br />
462
									<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"; ?>>
463
									<br />
464
									<?=gettext("Enable MSS clamping on TCP flows over VPN. " .
465
									"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?>
466
								</td>
467
							</tr>
468
                                                        <tr>
469
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
470
                                                        </tr>
471
                                                        <tr>
472
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
473
                                                        </tr>
474
                                                        <tr>
475
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
476
                                                                <td width="78%" class="vtable">
477
                                                                        <input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked"; ?> />
478
                                                                        <br />
479
									<?=gettext("By default schedules clear the states of existing connections when the expiration time has come. ".
480
									"This option overrides that behavior by not clearing states for existing connections."); ?>
481
                                                                </td>
482
                                                        </tr>
483
                                                        <tr>
484
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
485
                                                        </tr>
486
                                                        <tr>
487
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Gateway Monitoring"); ?></td>
488
                                                        </tr>
489
                                                        <tr>
490
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("States"); ?></td>
491
                                                                <td width="78%" class="vtable">
492
                                                                        <input name="kill_states" type="checkbox" id="kill_states" value="yes" <?php if ($pconfig['kill_states']) echo "checked"; ?> />
493
                                                                        <br />
494
									<?=gettext("By default the monitoring process will flush states for a gateway that goes down. ".
495
									"This option overrides that behavior by not clearing states for existing connections."); ?>
496
                                                                </td>
497
                                                        </tr>
498
							<tr>
499
								<td colspan="2" class="list" height="12">&nbsp;</td>
500
							</tr>
501
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
502
							<tr>
503
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
504
							</tr>
505
							<tr>
506
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
507
								<td width="78%" class="vtable">
508
									<select name="harddiskstandby" class="formselect">
509
										<?php
510
										 	## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
511
											$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");
512
										?>
513
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>><?=gettext("Always on"); ?></option>
514
										<?php
515
											foreach ($sbvals as $sbval):
516
												list($min,$val) = explode(",", $sbval);
517
										?>
518
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> <?=gettext("minutes"); ?></option>
519
										<?php endforeach; ?>
520
									</select>
521
									<br/>
522
									<?=gettext("Puts the hard disk into standby mode when the selected amount of time after the last ".
523
									"access has elapsed."); ?> <em><?=gettext("Do not set this for CF cards."); ?></em>
524
								</td>
525
							</tr>
526
							<tr>
527
								<td colspan="2" class="list" height="12">&nbsp;</td>
528
							</tr>
529
							<?php endif; ?>
530

    
531
							<tr>
532
								<td width="22%" valign="top">&nbsp;</td>
533
								<td width="78%">
534
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
535
								</td>
536
							</tr>
537
						</table>
538
					</div>
539
				</td>
540
			</tr>
541
		</table>
542
	</form>
543

    
544
<?php include("fend.inc"); ?>
545
</body>
546
</html>
547

    
(200-200/248)