Project

General

Profile

Download (25.5 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 7530177c jim-p
$pconfig['crypto_hardware'] = $config['system']['crypto_hardware'];
68 f60156f6 jim-p
$pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
69 f204df7d Ermal Lu?i
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
70 b0cf10bf Ermal
$pconfig['kill_states'] = isset($config['system']['kill_states']);
71 df81417f Matthew Grooms
72 53c210dd Cristian Feldman
if (!empty($config['system']['powerd_mode']))
73
	$pconfig['powerd_mode'] = $config['system']['powerd_mode'];
74
else
75
	$pconfig['powerd_mode'] = "hadp";
76
77 7530177c jim-p
$crypto_modules = array('glxsb' => gettext("AMD Geode LX Security Block"),
78 43669934 Phil Davis
			'aesni' => gettext("AES-NI CPU-based Acceleration"));
79 7530177c jim-p
80 f60156f6 jim-p
$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 df81417f Matthew Grooms
if ($_POST) {
84
85
    unset($input_errors);
86
    $pconfig = $_POST;
87
88
	ob_flush();
89
	flush();
90
91 7530177c jim-p
	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 f60156f6 jim-p
	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 df81417f Matthew Grooms
	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 42c07003 Ermal
		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 6fbe0168 jim-p
		$need_relayd_restart = false;
126 45736415 jim-p
		if($_POST['lb_use_sticky'] == "yes") {
127 6fbe0168 jim-p
			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 df81417f Matthew Grooms
139 f4645d7f Ermal
		if($_POST['gw_switch_default'] == "yes")
140
			$config['system']['gw_switch_default'] = true;
141
		else
142
			unset($config['system']['gw_switch_default']);
143
144 f204df7d Ermal Lu?i
		if($_POST['preferoldsa_enable'] == "yes")
145 7b2fdac4 jim-p
			$config['ipsec']['preferoldsa'] = true;
146 ae0023be jim-p
		elseif (isset($config['ipsec']['preferoldsa']))
147 7b2fdac4 jim-p
			unset($config['ipsec']['preferoldsa']);
148 f204df7d Ermal Lu?i
149 127eb8e0 jim-p
		$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 6441fa9a Ermal
		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 f204df7d Ermal Lu?i
		if($_POST['powerd_enable'] == "yes")
171
                        $config['system']['powerd_enable'] = true;
172
                else
173
                        unset($config['system']['powerd_enable']);
174
175 53c210dd Cristian Feldman
		$config['system']['powerd_mode'] = $_POST['powerd_mode'];
176 7530177c jim-p
177
		if($_POST['crypto_hardware'])
178
			$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
179
		else
180
			unset($config['system']['crypto_hardware']);
181 f204df7d Ermal Lu?i
182 f60156f6 jim-p
		if($_POST['thermal_hardware'])
183
			$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
184
		else
185
			unset($config['system']['thermal_hardware']);
186
187 f204df7d Ermal Lu?i
		if($_POST['schedule_states'] == "yes")
188
                        $config['system']['schedule_states'] = true;
189
                else
190
                        unset($config['system']['schedule_states']);
191 df81417f Matthew Grooms
192 b0cf10bf Ermal
		if($_POST['kill_states'] == "yes")
193
                        $config['system']['kill_states'] = true;
194
                else
195
                        unset($config['system']['kill_states']);
196
197 df81417f Matthew Grooms
		write_config();
198
199
		$retval = 0;
200 6c86a39f Ermal
		system_resolvconf_generate(true);
201 df81417f Matthew Grooms
		$retval = filter_configure();
202
		if(stristr($retval, "error") <> true)
203 1eacdc8a Carlos Eduardo Ramos
		    $savemsg = get_std_save_message(gettext($retval));
204 df81417f Matthew Grooms
		else
205 1eacdc8a Carlos Eduardo Ramos
		    $savemsg = gettext($retval);
206 8e9fa41d Scott Ullrich
		
207
		activate_powerd();
208 7530177c jim-p
		load_crypto();
209 f60156f6 jim-p
		load_thermal_hardware();
210 7b2fdac4 jim-p
		vpn_ipsec_configure_preferoldsa();
211 127eb8e0 jim-p
		if ($need_racoon_restart)
212
			vpn_ipsec_force_reload();
213 37129ab8 Pierre POMES
		if ($need_relayd_restart)
214
			relayd_configure();
215 df81417f Matthew Grooms
	}
216
}
217
218 e51ed1e9 Vinicius Coque
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
219 df81417f Matthew Grooms
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 6441fa9a Ermal
<script type="text/javascript" >
232 45736415 jim-p
function sticky_checked(obj) {
233
	if (obj.checked)
234
		jQuery('#srctrack').attr('disabled',false);
235
	else
236
		jQuery('#srctrack').attr('disabled','true');
237
}
238 6441fa9a Ermal
function maxmss_checked(obj) {
239
	if (obj.checked)
240 300e2c0b Vinicius Coque
		jQuery('#maxmss').attr('disabled',false);
241 6441fa9a Ermal
	else
242 300e2c0b Vinicius Coque
		jQuery('#maxmss').attr('disabled','true');
243 6441fa9a Ermal
}
244
</script>
245 ab3c8553 Matthew Grooms
	<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 e51ed1e9 Vinicius Coque
						$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 ab3c8553 Matthew Grooms
						display_top_tabs($tab_array);
258
					?>
259
				</td>
260
			</tr>
261
			<tr>
262 2ff19bfd Matthew Grooms
				<td id="mainarea">
263
					<div class="tabcont">
264
						<span class="vexpl">
265
							<span class="red">
266 ea53e38f Renato Botelho
								<strong><?=gettext("NOTE:"); ?>&nbsp</strong>
267 2ff19bfd Matthew Grooms
							</span>
268 1eacdc8a Carlos Eduardo Ramos
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
269 2ff19bfd Matthew Grooms
							<br/>
270
						</span>
271
						<br/>
272
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
273 42c07003 Ermal
							<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 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy url for allowing %s to use this proxy to connect outside."),$g['product']); ?>
282 42c07003 Ermal
								</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 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']); ?>
290 42c07003 Ermal
								</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 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy username for allowing %s to use this proxy to connect outside"),$g['product']); ?>
298 42c07003 Ermal
								</td>
299
							</tr>
300
							<tr>
301 b4eec6e6 jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Pass"); ?></td>
302 42c07003 Ermal
								<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 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy password for allowing %s to use this proxy to connect outside"),$g['product']); ?>
306 42c07003 Ermal
								</td>
307
							</tr>
308 ab3c8553 Matthew Grooms
							<tr>
309 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
310 ab3c8553 Matthew Grooms
							</tr>
311
							<tr>
312 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
313 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
314 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)" />
315 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use sticky connections"); ?></strong><br/>
316 f0d1af93 Carlos Eduardo Ramos
									<?=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 6fbe0168 jim-p
									"robin. Changing this option will restart the Load Balancing service."); ?>
324 45736415 jim-p
									<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 ab3c8553 Matthew Grooms
								</td>
331
							</tr>
332 f4645d7f Ermal
							<tr>
333
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
334
								<td width="78%" class="vtable">
335 3781d809 Ermal
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
336 f4645d7f Ermal
									<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 c912fe28 Scott Ullrich
							<tr>
342
								<td colspan="2" class="list" height="12">&nbsp;</td>
343
							</tr>
344 ab3c8553 Matthew Grooms
							<tr>
345 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
346 ab3c8553 Matthew Grooms
							</tr>
347 8e9fa41d Scott Ullrich
							<tr>
348 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
349 8e9fa41d Scott Ullrich
								<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 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use PowerD"); ?></strong><br/>
352 53c210dd Cristian Feldman
									<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 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("The powerd utility monitors the system state and sets various power control " .
362 53c210dd Cristian Feldman
								     "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 f0d1af93 Carlos Eduardo Ramos
								     "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 53c210dd Cristian Feldman
								     "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 8e9fa41d Scott Ullrich
								</td>
375
							</tr>
376
							<tr>
377
								<td colspan="2" class="list" height="12">&nbsp;</td>
378
							</tr>
379 09f18f59 jim-p
							<tr>
380 7530177c jim-p
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Hardware Acceleration"); ?></td>
381 09f18f59 jim-p
							</tr>
382
							<tr>
383 7530177c jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Cryptographic Hardware"); ?></td>
384 09f18f59 jim-p
								<td width="78%" class="vtable">
385 7530177c jim-p
									<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 09f18f59 jim-p
									<br />
392 43669934 Phil Davis
								     <?=gettext("A cryptographic accelerator module will use hardware support to speed up some " .
393 7530177c jim-p
										"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 09f18f59 jim-p
								     <br/><br/>
400 7530177c jim-p
								     <?=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 09f18f59 jim-p
								</td>
403
							</tr>
404
							<tr>
405
								<td colspan="2" class="list" height="12">&nbsp;</td>
406
							</tr>
407 f60156f6 jim-p
							<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 9f223740 jim-p
								<?=gettext("If you have a supported CPU, selecting a themal sensor will load the appropriate " .
421 f60156f6 jim-p
										"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 ab3c8553 Matthew Grooms
							<tr>
432 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
433 ab3c8553 Matthew Grooms
							</tr>
434
							<tr>
435 e8c8891d jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Security Associations"); ?></td>
436 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
437 7b2fdac4 jim-p
									<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> />
438 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
439 ab3c8553 Matthew Grooms
									<br />
440 f0d1af93 Carlos Eduardo Ramos
									<?=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 ab3c8553 Matthew Grooms
								</td>
444
							</tr>
445 127eb8e0 jim-p
							<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 6441fa9a Ermal
							<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 f7ec62f8 Chris Buechler
									<strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong>
461 6441fa9a Ermal
									<br />
462 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"; ?>>
463 6441fa9a Ermal
									<br />
464 f7ec62f8 Chris Buechler
									<?=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 6441fa9a Ermal
								</td>
467
							</tr>
468 f204df7d Ermal Lu?i
                                                        <tr>
469
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
470
                                                        </tr>
471
                                                        <tr>
472 1eacdc8a Carlos Eduardo Ramos
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
473 f204df7d Ermal Lu?i
                                                        </tr>
474
                                                        <tr>
475 1eacdc8a Carlos Eduardo Ramos
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
476 f204df7d Ermal Lu?i
                                                                <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 f65555eb jim-p
									<?=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 b0cf10bf Ermal
                                                                </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 f65555eb jim-p
									"This option overrides that behavior by not clearing states for existing connections."); ?>
496 f204df7d Ermal Lu?i
                                                                </td>
497
                                                        </tr>
498 ab3c8553 Matthew Grooms
							<tr>
499
								<td colspan="2" class="list" height="12">&nbsp;</td>
500
							</tr>
501
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
502
							<tr>
503 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
504 ab3c8553 Matthew Grooms
							</tr>
505
							<tr>
506 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
507 ab3c8553 Matthew Grooms
								<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 1eacdc8a Carlos Eduardo Ramos
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>><?=gettext("Always on"); ?></option>
514 ab3c8553 Matthew Grooms
										<?php
515
											foreach ($sbvals as $sbval):
516
												list($min,$val) = explode(",", $sbval);
517
										?>
518 1eacdc8a Carlos Eduardo Ramos
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> <?=gettext("minutes"); ?></option>
519 ab3c8553 Matthew Grooms
										<?php endforeach; ?>
520
									</select>
521
									<br/>
522 4d473c89 Vinicius Coque
									<?=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 ab3c8553 Matthew Grooms
								</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 267c28ab Vinicius Coque
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
535 ab3c8553 Matthew Grooms
								</td>
536
							</tr>
537
						</table>
538
					</div>
539
				</td>
540
			</tr>
541
		</table>
542
	</form>
543 df81417f Matthew Grooms
544
<?php include("fend.inc"); ?>
545
</body>
546
</html>