Project

General

Profile

Download (33.7 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
	Copyright (C) 2008 Shrew Soft Inc
8
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
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_misc.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("vpn.inc");
51
require_once("vslb.inc");
52

    
53
$pconfig['proxyurl'] = $config['system']['proxyurl'];
54
$pconfig['proxyport'] = $config['system']['proxyport'];
55
$pconfig['proxyuser'] = $config['system']['proxyuser'];
56
$pconfig['proxypass'] = $config['system']['proxypass'];
57
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
58
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
59
$pconfig['srctrack'] = $config['system']['srctrack'];
60
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
61
$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']);
62
$pconfig['crypto_hardware'] = $config['system']['crypto_hardware'];
63
$pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
64
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
65
$pconfig['kill_states'] = isset($config['system']['kill_states']);
66
$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']);
67
$pconfig['apinger_debug'] = isset($config['system']['apinger_debug']);
68
$pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']);
69
$pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size'];
70
$pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size'];
71
$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']);
72
$pconfig['host_uuid'] = !isset($config['system']['host_uuid']);
73

    
74
$pconfig['powerd_ac_mode'] = "hadp";
75
if (!empty($config['system']['powerd_ac_mode']))
76
	$pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode'];
77

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

    
82
$pconfig['powerd_normal_mode'] = "hadp";
83
if (!empty($config['system']['powerd_normal_mode']))
84
	$pconfig['powerd_normal_mode'] = $config['system']['powerd_normal_mode'];
85

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

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

    
92
if ($_POST) {
93

    
94
	unset($input_errors);
95
	$pconfig = $_POST;
96

    
97
	ob_flush();
98
	flush();
99

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

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

    
106
	if (!empty($_POST['use_mfs_tmp_size']) && (!is_numeric($_POST['use_mfs_tmp_size']) || ($_POST['use_mfs_tmp_size'] < 40)))
107
		$input_errors[] = gettext("/tmp Size must be numeric and should not be less than 40MB.");
108

    
109
	if (!empty($_POST['use_mfs_var_size']) && (!is_numeric($_POST['use_mfs_var_size']) || ($_POST['use_mfs_var_size'] < 60)))
110
		$input_errors[] = gettext("/var Size must be numeric and should not be less than 60MB.");
111
		
112
	if (!empty($_POST['proxyport']) && !is_port($_POST['proxyport'])) {
113
		$input_errors[] = gettext("Proxy port must be a valid port number, 1-65535.");
114
	}
115
	
116
	if (!empty($_POST['proxyurl']) && !is_fqdn($_POST['proxyurl']) && !is_ipaddr($_POST['proxyurl'])) {
117
		$input_errors[] = gettext("Proxy URL must be a valid IP address or FQDN.");
118
	}
119
	
120
	if (!empty($_POST['proxyuser']) && preg_match("/[^a-zA-Z0-9\.\-_@]/", $_POST['proxyuser'])) {
121
		$input_errors[] = gettext("The proxy username contains invalid characters.");
122
	}
123
	
124
	if (!$input_errors) {
125

    
126
		if($_POST['harddiskstandby'] <> "") {
127
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
128
			system_set_harddisk_standby();
129
		} else
130
			unset($config['system']['harddiskstandby']);
131

    
132
		if($_POST['proxyurl'] <> "")
133
			$config['system']['proxyurl'] = $_POST['proxyurl'];
134
		else
135
			unset($config['system']['proxyurl']);
136

    
137
		if($_POST['proxyport'] <> "")
138
			$config['system']['proxyport'] = $_POST['proxyport'];
139
		else
140
			unset($config['system']['proxyport']);
141

    
142
		if($_POST['proxyuser'] <> "")
143
			$config['system']['proxyuser'] = $_POST['proxyuser'];
144
		else
145
			unset($config['system']['proxyuser']);
146

    
147
		if($_POST['proxypass'] <> "")
148
			$config['system']['proxypass'] = $_POST['proxypass'];
149
		else
150
			unset($config['system']['proxypass']);
151

    
152
		$need_relayd_restart = false;
153
		if($_POST['lb_use_sticky'] == "yes") {
154
			if (!isset($config['system']['lb_use_sticky'])) {
155
				$config['system']['lb_use_sticky'] = true;
156
				$need_relayd_restart = true;
157
			}
158
			if ($config['system']['srctrack'] != $_POST['srctrack']) {
159
				$config['system']['srctrack'] = $_POST['srctrack'];
160
				$need_relayd_restart = true;
161
			}
162
		} else {
163
			if (isset($config['system']['lb_use_sticky'])) {
164
				unset($config['system']['lb_use_sticky']);
165
				$need_relayd_restart = true;
166
			}
167
		}
168

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

    
174
		if($_POST['pkg_nochecksig'] == "yes")
175
			$config['system']['pkg_nochecksig'] = true;
176
		elseif (isset($config['system']['pkg_nochecksig']))
177
			unset($config['system']['pkg_nochecksig']);
178

    
179
		if ($_POST['host_uuid'] == "yes") {
180
			unset($config['system']['host_uuid']);
181
		} else {
182
			$config['system']['host_uuid'] = true;
183
		}
184

    
185
		if($_POST['powerd_enable'] == "yes")
186
			$config['system']['powerd_enable'] = true;
187
		else
188
			unset($config['system']['powerd_enable']);
189

    
190
		$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
191
		$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
192
		$config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode'];
193

    
194
		if($_POST['crypto_hardware'])
195
			$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
196
		else
197
			unset($config['system']['crypto_hardware']);
198

    
199
		if($_POST['thermal_hardware'])
200
			$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
201
		else
202
			unset($config['system']['thermal_hardware']);
203

    
204
		if($_POST['schedule_states'] == "yes")
205
			$config['system']['schedule_states'] = true;
206
		else
207
			unset($config['system']['schedule_states']);
208

    
209
		if($_POST['kill_states'] == "yes")
210
			$config['system']['kill_states'] = true;
211
		else
212
			unset($config['system']['kill_states']);
213

    
214
		if($_POST['skip_rules_gw_down'] == "yes")
215
			$config['system']['skip_rules_gw_down'] = true;
216
		else
217
			unset($config['system']['skip_rules_gw_down']);
218

    
219
		$need_apinger_restart = false;
220
		if($_POST['apinger_debug'] == "yes") {
221
			if (!isset($config['system']['apinger_debug']))
222
				$need_apinger_restart = true;
223
			$config['system']['apinger_debug'] = true;
224
		} else {
225
			if (isset($config['system']['apinger_debug']))
226
				$need_apinger_restart = true;
227
			unset($config['system']['apinger_debug']);
228
		}
229

    
230
		if($_POST['use_mfs_tmpvar'] == "yes")
231
			$config['system']['use_mfs_tmpvar'] = true;
232
		else
233
			unset($config['system']['use_mfs_tmpvar']);
234

    
235
		$config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size'];
236
		$config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size'];
237

    
238
		if (isset($_POST['rrdbackup'])) {
239
			$config['system']['rrdbackup'] = $_POST['rrdbackup'];
240
			install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
241
		}
242
		if (isset($_POST['dhcpbackup'])) {
243
			$config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
244
			install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
245
		}
246

    
247
		write_config();
248

    
249
		$retval = 0;
250
		system_resolvconf_generate(true);
251
		$retval = filter_configure();
252
		if(stristr($retval, "error") <> true)
253
			$savemsg = get_std_save_message(gettext($retval));
254
		else
255
			$savemsg = gettext($retval);
256

    
257
		activate_powerd();
258
		load_crypto();
259
		load_thermal_hardware();
260
		if ($need_relayd_restart)
261
			relayd_configure();
262
		if ($need_apinger_restart)
263
			setup_gateways_monitor();
264
	}
265
}
266

    
267
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
268
include("head.inc");
269

    
270
?>
271

    
272
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
273
<?php
274
	include("fbegin.inc");
275
	if ($input_errors)
276
		print_input_errors($input_errors);
277
	if ($savemsg)
278
		print_info_box($savemsg);
279
?>
280
<script type="text/javascript">
281
//<![CDATA[
282
function sticky_checked(obj) {
283
	if (obj.checked)
284
		jQuery('#srctrack').attr('disabled',false);
285
	else
286
		jQuery('#srctrack').attr('disabled','true');
287
}
288
function tmpvar_checked(obj) {
289
	if (obj.checked) {
290
		jQuery('#use_mfs_tmp_size').attr('disabled',false);
291
		jQuery('#use_mfs_var_size').attr('disabled',false);
292
		jQuery('#rrdbackup').attr('disabled',false);
293
		jQuery('#dhcpbackup').attr('disabled',false);
294
	} else {
295
		jQuery('#use_mfs_tmp_size').attr('disabled','true');
296
		jQuery('#use_mfs_var_size').attr('disabled','true');
297
		jQuery('#rrdbackup').attr('disabled','true');
298
		jQuery('#dhcpbackup').attr('disabled','true');
299
	}
300
}
301
//]]>
302
</script>
303
	<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
304
		<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="system advanced misc">
305
			<tr>
306
				<td>
307
					<?php
308
						$tab_array = array();
309
						$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
310
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
311
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
312
						$tab_array[] = array(gettext("Miscellaneous"), true, "system_advanced_misc.php");
313
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
314
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
315
						display_top_tabs($tab_array);
316
					?>
317
				</td>
318
			</tr>
319
			<tr>
320
				<td id="mainarea">
321
					<div class="tabcont">
322
						<span class="vexpl">
323
							<span class="red">
324
								<strong><?=gettext("NOTE:"); ?>&nbsp;</strong>
325
							</span>
326
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
327
							<br />
328
						</span>
329
						<br />
330
						<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
331
							<tr>
332
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Proxy support"); ?></td>
333
							</tr>
334
							<tr>
335
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy URL"); ?></td>
336
								<td width="78%" class="vtable">
337
									<input name="proxyurl" id="proxyurl" value="<?php if ($pconfig['proxyurl'] <> "") echo htmlspecialchars($pconfig['proxyurl']); ?>" class="formfld unknown" />
338
									<br />
339
									<?php printf(gettext("Hostname or IP address of proxy server this system will use for its outbound Internet access.")); ?>
340
								</td>
341
							</tr>
342
							<tr>
343
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Port"); ?></td>
344
								<td width="78%" class="vtable">
345
									<input name="proxyport" id="proxyport" value="<?php if ($pconfig['proxyport'] <> "") echo htmlspecialchars($pconfig['proxyport']); ?>" class="formfld unknown" />
346
									<br />
347
									<?php printf(gettext("Port where proxy server is listening.")); ?>
348
								</td>
349
							</tr>
350
							<tr>
351
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Username"); ?></td>
352
								<td width="78%" class="vtable">
353
									<input name="proxyuser" id="proxyuser" value="<?php if ($pconfig['proxyuser'] <> "") echo htmlspecialchars($pconfig['proxyuser']); ?>" class="formfld unknown" />
354
									<br />
355
									<?php printf(gettext("Username for authentication to proxy server. Optional, leave blank to not use authentication.")); ?>
356
								</td>
357
							</tr>
358
							<tr>
359
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Password"); ?></td>
360
								<td width="78%" class="vtable">
361
									<input type="password" name="proxypass" id="proxypass" value="<?php if ($pconfig['proxypass'] <> "") echo htmlspecialchars($pconfig['proxypass']); ?>" class="formfld unknown" />
362
									<br />
363
									<?php printf(gettext("Password for authentication to proxy server.")); ?>
364
								</td>
365
							</tr>
366
							<tr>
367
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
368
							</tr>
369
							<tr>
370
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
371
								<td width="78%" class="vtable">
372
									<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)" />
373
									<strong><?=gettext("Use sticky connections"); ?></strong><br />
374
									<?=gettext("Successive connections will be redirected to the servers " .
375
									"in a round-robin manner with connections from the same " .
376
									"source being sent to the same web server. This 'sticky " .
377
									"connection' will exist as long as there are states that " .
378
									"refer to this connection. Once the states expire, so will " .
379
									"the sticky connection. Further connections from that host " .
380
									"will be redirected to the next web server in the round " .
381
									"robin. Changing this option will restart the Load Balancing service."); ?>
382
									<br />
383
									<input name="srctrack" id="srctrack" value="<?php if ($pconfig['srctrack'] <> "") echo htmlspecialchars($pconfig['srctrack']); else "1400"; ?>" class="formfld unknown" <?php if ($pconfig['lb_use_sticky'] == false) echo "disabled=\"disabled\""; ?> />
384
									<br />
385
									<?=gettext("Set the source tracking timeout for sticky connections. " .
386
									"By default this is 0, so source tracking is removed as soon as the state expires. " .
387
									"Setting this timeout higher will cause the source/destination relationship to persist for longer periods of time."); ?>
388
								</td>
389
							</tr>
390
							<tr>
391
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
392
								<td width="78%" class="vtable">
393
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
394
									<strong><?=gettext("Enable default gateway switching"); ?></strong><br />
395
									<?=gettext("If the default gateway goes down, " .
396
									"switch the default gateway to another available one. This is not enabled by default, as it's unnecessary in most all scenarios, which instead use gateway groups."); ?>
397
								</td>
398
							</tr>
399
							<tr>
400
								<td colspan="2" class="list" height="12">&nbsp;</td>
401
							</tr>
402
							<tr>
403
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
404
							</tr>
405
							<tr>
406
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
407
								<td width="78%" class="vtable">
408
									<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked=\"checked\""; ?> />
409
									<strong><?=gettext("Use PowerD"); ?></strong><br />
410
									<br />
411
									<table border="0" cellspacing="0" cellpadding="2" summary="powerd">
412
										<tr>
413
											<td><?=gettext("On AC Power Mode:");?> &nbsp;</td>
414
											<td>
415
												<select name="powerd_ac_mode" id="powerd_ac_mode">
416
													<option value="hadp"<?php if($pconfig['powerd_ac_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
417
													<option value="adp"<?php if($pconfig['powerd_ac_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
418
													<option value="min"<?php if($pconfig['powerd_ac_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
419
													<option value="max"<?php if($pconfig['powerd_ac_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
420
												</select>
421
											</td>
422
										</tr>
423
										<tr>
424
											<td><?=gettext("On Battery Power Mode:");?> &nbsp;</td>
425
											<td>
426
												<select name="powerd_battery_mode" id="powerd_battery_mode">
427
													<option value="hadp"<?php if($pconfig['powerd_battery_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
428
													<option value="adp"<?php if($pconfig['powerd_battery_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
429
													<option value="min"<?php if($pconfig['powerd_battery_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
430
													<option value="max"<?php if($pconfig['powerd_battery_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
431
												</select>
432
											</td>
433
										</tr>
434
										<tr>
435
											<td><?=gettext("On Unknown Power Mode:");?> &nbsp;</td>
436
											<td>
437
											<select name="powerd_normal_mode" id="powerd_normal_mode">
438
												<option value="hadp"<?php if($pconfig['powerd_normal_mode']=="hadp") echo " selected=\"selected\""; ?>><?=gettext("Hiadaptive");?></option>
439
												<option value="adp"<?php if($pconfig['powerd_normal_mode']=="adp") echo " selected=\"selected\""; ?>><?=gettext("Adaptive");?></option>
440
												<option value="min"<?php if($pconfig['powerd_normal_mode']=="min") echo " selected=\"selected\""; ?>><?=gettext("Minimum");?></option>
441
												<option value="max"<?php if($pconfig['powerd_normal_mode']=="max") echo " selected=\"selected\""; ?>><?=gettext("Maximum");?></option>
442
											</select>
443
											</td>
444
										</tr>
445
									</table>
446
									<br />
447
									<?=gettext("The powerd utility monitors the system state and sets various power control " .
448
									"options accordingly.  It offers four modes (maximum, minimum, adaptive " .
449
									"and hiadaptive) that can be individually selected while on AC power or batteries. " .
450
									"The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " .
451
									"min, adp, hadp.  Maximum mode chooses the highest performance values.  Minimum " .
452
									"mode selects the lowest performance values to get the most power savings. " .
453
									"Adaptive mode attempts to strike a balance by degrading performance when " .
454
									"the system appears idle and increasing it when the system is busy.  It " .
455
									"offers a good balance between a small performance loss for greatly " .
456
									"increased power savings.  Hiadaptive mode is alike adaptive mode, but " .
457
									"tuned for systems where performance and interactivity are more important " .
458
									"than power consumption.  It raises frequency faster, drops slower and " .
459
									"keeps twice lower CPU load."); ?>
460
								</td>
461
							</tr>
462
							<tr>
463
								<td colspan="2" class="list" height="12">&nbsp;</td>
464
							</tr>
465
							<tr>
466
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Hardware Acceleration"); ?></td>
467
							</tr>
468
							<tr>
469
								<td width="22%" valign="top" class="vncell"><?=gettext("Cryptographic Hardware"); ?></td>
470
								<td width="78%" class="vtable">
471
									<select name="crypto_hardware" id="crypto_hardware">
472
										<option value=""><?php echo gettext("None"); ?></option>
473
										<?php foreach ($crypto_modules as $cryptomod_name => $cryptomod_descr): ?>
474
											<option value="<?php echo $cryptomod_name; ?>" <?php if ($pconfig['crypto_hardware'] == $cryptomod_name) echo " selected=\"selected\""; ?>><?php echo "{$cryptomod_descr} ({$cryptomod_name})"; ?></option>
475
										<?php endforeach; ?>
476
									</select>
477
									<br />
478
									<?=gettext("A cryptographic accelerator module will use hardware support to speed up some " .
479
										"cryptographic functions on systems which have the chip. Do not enable this " .
480
										"option if you have a Hifn cryptographic acceleration card, as this will take " .
481
										"precedence and the Hifn card will not be used. Acceleration should be automatic " .
482
										"for IPsec when using a cipher supported by your chip, such as AES-128. OpenVPN " .
483
										"should be set for AES-128-CBC and have cryptodev enabled for hardware " .
484
										"acceleration."); ?>
485
									<br /><br />
486
									<?=gettext("If you do not have a crypto chip in your system, this option will have no " .
487
									"effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
488
								</td>
489
							</tr>
490
							<tr>
491
								<td colspan="2" class="list" height="12">&nbsp;</td>
492
							</tr>
493
							<tr>
494
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Thermal Sensors"); ?></td>
495
							</tr>
496
							<tr>
497
								<td width="22%" valign="top" class="vncell"><?=gettext("Thermal Sensors"); ?></td>
498
								<td width="78%" class="vtable">
499
								<select name="thermal_hardware" id="thermal_hardware">
500
									<option value=""><?php echo gettext("None/ACPI"); ?></option>
501
									<?php foreach ($thermal_hardware_modules as $themalmod_name => $themalmod_descr): ?>
502
										<option value="<?php echo $themalmod_name; ?>" <?php if ($pconfig['thermal_hardware'] == $themalmod_name) echo " selected=\"selected\""; ?>><?php echo "{$themalmod_descr} ({$themalmod_name})"; ?></option>
503
									<?php endforeach; ?>
504
								</select>
505
								<br />
506
								<?=gettext("If you have a supported CPU, selecting a themal sensor will load the appropriate " .
507
										"driver to read its temperature. Setting this to 'None' will attempt to read the " .
508
										"temperature from an ACPI-compliant motherboard sensor instead, if one is present."); ?>
509
								<br /><br />
510
								<?=gettext("If you do not have a supported thermal sensor chip in your system, this option will have no " .
511
									"effect. To unload the selected module, set this option to 'none' and then reboot."); ?>
512
								</td>
513
							</tr>
514
							<tr>
515
								<td colspan="2" class="list" height="12">&nbsp;</td>
516
							</tr>
517
							<tr>
518
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
519
							</tr>
520
							<tr>
521
								<td width="22%" valign="top" class="vncell">&nbsp;</td>
522
								<td width="78%" class="vtable">
523
									<?=gettext("These settings have moved to <a href=\"vpn_ipsec_settings.php\">VPN &gt; IPsec on the Advanced Settings tab</a>."); ?>
524
								</td>
525
							</tr>
526
							<tr>
527
								<td colspan="2" class="list" height="12">&nbsp;</td>
528
							</tr>
529
							<tr>
530
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
531
							</tr>
532
							<tr>
533
								<td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
534
								<td width="78%" class="vtable">
535
									<input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked=\"checked\""; ?> />
536
									<br />
537
									<?=gettext("By default, when a schedule expires, connections permitted by that schedule are killed. ".
538
									"This option overrides that behavior by not clearing states for existing connections."); ?>
539
								</td>
540
							</tr>
541
							<tr>
542
								<td colspan="2" class="list" height="12">&nbsp;</td>
543
							</tr>
544
							<tr>
545
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Gateway Monitoring"); ?></td>
546
							</tr>
547
							<tr>
548
								<td width="22%" valign="top" class="vncell"><?=gettext("State Killing on Gateway Failure"); ?></td>
549
								<td width="78%" class="vtable">
550
									<input name="kill_states" type="checkbox" id="kill_states" value="yes" <?php if ($pconfig['kill_states']) echo "checked=\"checked\""; ?> />
551
									<br />
552
									<?=gettext("The monitoring process will flush states for a gateway that goes down if this box is not checked. Check this box to disable this behavior."); ?>
553
								</td>
554
							</tr>
555
							<tr>
556
								<td width="22%" valign="top" class="vncell"><?=gettext("Skip rules when gateway is down"); ?></td>
557
								<td width="78%" class="vtable">
558
									<input name="skip_rules_gw_down" type="checkbox" id="skip_rules_gw_down" value="yes" <?php if ($pconfig['skip_rules_gw_down']) echo "checked=\"checked\""; ?> />
559
									<br />
560
									<?=gettext("By default, when a rule has a gateway specified and this gateway is down, ".
561
									"the rule is created omitting the gateway. This option overrides that behavior by omitting ".
562
									"the entire rule instead."); ?>
563
								</td>
564
							</tr>
565
							<tr>
566
								<td width="22%" valign="top" class="vncell"><?=gettext("Enable gateway monitoring debug logging"); ?></td>
567
								<td width="78%" class="vtable">
568
									<input name="apinger_debug" type="checkbox" id="apinger_debug" value="yes" <?php if ($pconfig['apinger_debug']) echo "checked=\"checked\""; ?> />
569
									<br />
570
									<?=gettext("Enable this setting to log debug information from the gateway monitoring process to the system logs."); ?>
571
								</td>
572
							</tr>
573
							<tr>
574
								<td colspan="2" valign="top" class="listtopic"><?=gettext("RAM Disk Settings (Reboot to Apply Changes)"); ?></td>
575
							</tr>
576
							<?php if ($g['platform'] == "pfSense"): ?>
577
							<tr>
578
								<td width="22%" valign="top" class="vncell"><?=gettext("Use RAM Disks"); ?></td>
579
								<td width="78%" class="vtable">
580
									<input name="use_mfs_tmpvar" type="checkbox" id="use_mfs_tmpvar" value="yes" <?php if ($pconfig['use_mfs_tmpvar']) echo "checked=\"checked\""; ?> onclick="tmpvar_checked(this)" />
581
									<strong><?=gettext("Use memory file system for /tmp and /var"); ?></strong><br />
582
									<?=gettext("Set this if you wish to use /tmp and /var as RAM disks (memory file system disks) on a full install " .
583
									"rather than use the hard disk. Setting this will cause the data in /tmp and /var to be lost at reboot, including log data. RRD and DHCP Leases will be retained."); ?>
584
								</td>
585
							</tr>
586
							<?php endif; ?>
587
							<tr>
588
								<td width="22%" valign="top" class="vncell"><?=gettext("/tmp RAM Disk Size"); ?></td>
589
								<td width="78%" class="vtable">
590
									<input name="use_mfs_tmp_size" id="use_mfs_tmp_size" value="<?php if ($pconfig['use_mfs_tmp_size'] <> "") echo htmlspecialchars($pconfig['use_mfs_tmp_size']); ?>" class="formfld unknown" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> /> MB
591
									<br />
592
									<?=gettext("Set the size, in MB, for the /tmp RAM disk. " .
593
									"Leave blank for 40MB. Do not set lower than 40."); ?>
594
								</td>
595
							</tr>
596
							<tr>
597
								<td width="22%" valign="top" class="vncell"><?=gettext("/var RAM Disk Size"); ?></td>
598
								<td width="78%" class="vtable">
599
									<input name="use_mfs_var_size" id="use_mfs_var_size" value="<?php if ($pconfig['use_mfs_var_size'] <> "") echo htmlspecialchars($pconfig['use_mfs_var_size']); ?>" class="formfld unknown" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> /> MB
600
									<br />
601
									<?=gettext("Set the size, in MB, for the /var RAM disk. " .
602
									"Leave blank for 60MB. Do not set lower than 60."); ?>
603
								</td>
604
							</tr>
605
							<tr>
606
								<td width="22%" valign="top" class="vncell"><?=gettext("Periodic RRD Backup");?></td>
607
								<td width="78%" class="vtable">
608
									<?=gettext("Frequency:");?>
609
									<select name="rrdbackup" id="rrdbackup" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> >
610
										<option value='0' <?php if (!isset($config['system']['rrdbackup']) || ($config['system']['rrdbackup'] == 0)) echo "selected='selected'"; ?>><?=gettext("Disable"); ?></option>
611
									<?php for ($x=1; $x<=24; $x++) { ?>
612
										<option value='<?= $x ?>' <?php if ($config['system']['rrdbackup'] == $x) echo "selected='selected'"; ?>><?= $x ?> <?=gettext("hour"); ?><?php if ($x>1) echo "s"; ?></option>
613
									<?php } ?>
614
									</select>
615
									<br />
616
									<?=gettext("This will periodically backup the RRD data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
617
									<br />
618
									<br />
619
								</td>
620
							</tr>
621
							<tr>
622
								<td width="22%" valign="top" class="vncell"><?=gettext("Periodic DHCP Leases Backup");?></td>
623
								<td width="78%" class="vtable">
624
									<?=gettext("Frequency:");?>
625
									<select name="dhcpbackup" id="dhcpbackup" <?php if (($g['platform'] == "pfSense") && ($pconfig['use_mfs_tmpvar'] == false)) echo "disabled=\"disabled\""; ?> >
626
										<option value='0' <?php if (!isset($config['system']['dhcpbackup']) || ($config['system']['dhcpbackup'] == 0)) echo "selected='selected'"; ?>><?=gettext("Disable"); ?></option>
627
									<?php for ($x=1; $x<=24; $x++) { ?>
628
										<option value='<?= $x ?>' <?php if ($config['system']['dhcpbackup'] == $x) echo "selected='selected'"; ?>><?= $x ?> <?=gettext("hour"); ?><?php if ($x>1) echo "s"; ?></option>
629
									<?php } ?>
630
									</select>
631
									<br />
632
									<?=gettext("This will periodically backup the DHCP leases data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
633
									<br />
634
									<br />
635
								</td>
636
							</tr>
637
							<tr>
638
								<td colspan="2" class="list" height="12">&nbsp;</td>
639
							</tr>
640
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
641
							<tr>
642
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
643
							</tr>
644
							<tr>
645
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
646
								<td width="78%" class="vtable">
647
									<select name="harddiskstandby" class="formselect">
648
										<?php
649
											## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
650
											$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");
651
										?>
652
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected="selected"');?>><?=gettext("Always on"); ?></option>
653
										<?php
654
											foreach ($sbvals as $sbval):
655
												list($min,$val) = explode(",", $sbval);
656
										?>
657
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected="selected"');?>><?=$min;?> <?=gettext("minutes"); ?></option>
658
										<?php endforeach; ?>
659
									</select>
660
									<br />
661
									<?=gettext("Puts the hard disk into standby mode when the selected amount of time after the last ".
662
									"access has elapsed."); ?> <em><?=gettext("Do not set this for CF cards."); ?></em>
663
								</td>
664
							</tr>
665
							<tr>
666
								<td colspan="2" class="list" height="12">&nbsp;</td>
667
							</tr>
668
							<?php endif; ?>
669

    
670
							<tr>
671
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Package settings"); ?></td>
672
							</tr>
673
							<tr>
674
								<td width="22%" valign="top" class="vncell"><?=gettext("Package signature"); ?></td>
675
								<td width="78%" class="vtable">
676
									<input name="pkg_nochecksig" type="checkbox" id="pkg_nochecksig" value="yes" <?php if ($pconfig['pkg_nochecksig']) echo "checked=\"checked\""; ?> />
677
									<strong><?=gettext("Do NOT check package signature"); ?></strong><br />
678
									<?=gettext("Enable this option to allow pfSense to install any package without checking its signature."); ?>
679
								</td>
680
							</tr>
681
							<tr>
682
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Installation Feedback"); ?></td>
683
							</tr>
684
							<tr>
685
								<td width="22%" valign="top" class="vncell"><?=gettext("Host UUID"); ?></td>
686
								<td width="78%" class="vtable">
687
									<input name="host_uuid" type="checkbox" id="host_uuid" value="yes" <?php if ($pconfig['host_uuid']) echo "checked=\"checked\""; ?> />
688
									<strong><?=gettext("Do NOT send HOST UUID with user agent"); ?></strong><br />
689
									<?=gettext("Enable this option to not send HOST UUID to pfSense as part of User-Agent header."); ?>
690
								</td>
691
							</tr>
692

    
693
							<tr>
694
								<td width="22%" valign="top">&nbsp;</td>
695
								<td width="78%">
696
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
697
								</td>
698
							</tr>
699
						</table>
700
					</div>
701
				</td>
702
			</tr>
703
		</table>
704
	</form>
705

    
706
<?php include("fend.inc"); ?>
707
</body>
708
</html>
(202-202/251)