Project

General

Profile

Download (26.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
$pconfig['powerd_ac_mode'] = "hadp";
73
if (!empty($config['system']['powerd_ac_mode']))
74
	$pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode'];
75

    
76
$pconfig['powerd_battery_mode'] = "hadp";
77
if (!empty($config['system']['powerd_battery_mode']))
78
	$pconfig['powerd_battery_mode'] = $config['system']['powerd_battery_mode'];
79

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

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

    
86
if ($_POST) {
87

    
88
    unset($input_errors);
89
    $pconfig = $_POST;
90

    
91
	ob_flush();
92
	flush();
93

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

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

    
100
	if (!$input_errors) {
101

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

    
108
		if($_POST['proxyurl'] <> "")
109
			$config['system']['proxyurl'] = $_POST['proxyurl'];
110
		else
111
			unset($config['system']['proxyurl']);
112

    
113
		if($_POST['proxyport'] <> "")
114
			$config['system']['proxyport'] = $_POST['proxyport'];
115
		else
116
			unset($config['system']['proxyport']);
117

    
118
		if($_POST['proxyuser'] <> "")
119
			$config['system']['proxyuser'] = $_POST['proxyuser'];
120
		else
121
			unset($config['system']['proxyuser']);
122

    
123
		if($_POST['proxypass'] <> "")
124
			$config['system']['proxypass'] = $_POST['proxypass'];
125
		else
126
			unset($config['system']['proxypass']);
127

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

    
142
		if($_POST['gw_switch_default'] == "yes")
143
			$config['system']['gw_switch_default'] = true;
144
		else
145
			unset($config['system']['gw_switch_default']);
146

    
147
		if($_POST['preferoldsa_enable'] == "yes")
148
			$config['ipsec']['preferoldsa'] = true;
149
		elseif (isset($config['ipsec']['preferoldsa']))
150
			unset($config['ipsec']['preferoldsa']);
151

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

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

    
173
		if($_POST['powerd_enable'] == "yes")
174
                        $config['system']['powerd_enable'] = true;
175
                else
176
                        unset($config['system']['powerd_enable']);
177

    
178
		$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
179
		$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
180

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

    
186
		if($_POST['thermal_hardware'])
187
			$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
188
		else
189
			unset($config['system']['thermal_hardware']);
190

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

    
196
		if($_POST['kill_states'] == "yes")
197
                        $config['system']['kill_states'] = true;
198
                else
199
                        unset($config['system']['kill_states']);
200

    
201
		write_config();
202

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

    
222
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
223
include("head.inc");
224

    
225
?>
226

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

    
543
							<tr>
544
								<td width="22%" valign="top">&nbsp;</td>
545
								<td width="78%">
546
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
547
								</td>
548
							</tr>
549
						</table>
550
					</div>
551
				</td>
552
			</tr>
553
		</table>
554
	</form>
555

    
556
<?php include("fend.inc"); ?>
557
</body>
558
</html>
559

    
(198-198/246)