Project

General

Profile

Download (32.3 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

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

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

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

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

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

    
91
if ($_POST) {
92

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

    
96
	ob_flush();
97
	flush();
98

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

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

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

    
108
	if (!empty($_POST['use_mfs_var_size']) && (!is_numeric($_POST['use_mfs_var_size']) || ($_POST['use_mfs_var_size'] < 60)))
109
		$input_errors[] = gettext("/var Size must be numeric and should not be less than 60MB.");
110

    
111
	if (!$input_errors) {
112

    
113
		if($_POST['harddiskstandby'] <> "") {
114
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
115
			system_set_harddisk_standby();
116
		} else
117
			unset($config['system']['harddiskstandby']);
118

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

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

    
129
		if($_POST['proxyuser'] <> "")
130
			$config['system']['proxyuser'] = $_POST['proxyuser'];
131
		else
132
			unset($config['system']['proxyuser']);
133

    
134
		if($_POST['proxypass'] <> "")
135
			$config['system']['proxypass'] = $_POST['proxypass'];
136
		else
137
			unset($config['system']['proxypass']);
138

    
139
		$need_relayd_restart = false;
140
		if($_POST['lb_use_sticky'] == "yes") {
141
			if (!isset($config['system']['lb_use_sticky'])) {
142
				$config['system']['lb_use_sticky'] = true;
143
				$need_relayd_restart = true;
144
			}
145
			if ($config['system']['srctrack'] != $_POST['srctrack']) {
146
				$config['system']['srctrack'] = $_POST['srctrack'];
147
				$need_relayd_restart = true;
148
			}
149
		} else {
150
			if (isset($config['system']['lb_use_sticky'])) {
151
				unset($config['system']['lb_use_sticky']);
152
				$need_relayd_restart = true;
153
			}
154
		}
155

    
156
		if($_POST['gw_switch_default'] == "yes")
157
			$config['system']['gw_switch_default'] = true;
158
		else
159
			unset($config['system']['gw_switch_default']);
160

    
161
		if($_POST['pkg_nochecksig'] == "yes")
162
			$config['system']['pkg_nochecksig'] = true;
163
		elseif (isset($config['system']['pkg_nochecksig']))
164
			unset($config['system']['pkg_nochecksig']);
165

    
166
		if($_POST['powerd_enable'] == "yes")
167
			$config['system']['powerd_enable'] = true;
168
		else
169
			unset($config['system']['powerd_enable']);
170

    
171
		$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
172
		$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
173
		$config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode'];
174

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

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

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

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

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

    
200
		$need_apinger_restart = false;
201
		if($_POST['apinger_debug'] == "yes") {
202
			if (!isset($config['system']['apinger_debug']))
203
				$need_apinger_restart = true;
204
			$config['system']['apinger_debug'] = true;
205
		} else {
206
			if (isset($config['system']['apinger_debug']))
207
				$need_apinger_restart = true;
208
			unset($config['system']['apinger_debug']);
209
		}
210

    
211
		if($_POST['use_mfs_tmpvar'] == "yes")
212
			$config['system']['use_mfs_tmpvar'] = true;
213
		else
214
			unset($config['system']['use_mfs_tmpvar']);
215

    
216
		$config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size'];
217
		$config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size'];
218

    
219
		if (isset($_POST['rrdbackup'])) {
220
			$config['system']['rrdbackup'] = $_POST['rrdbackup'];
221
			install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
222
		}
223
		if (isset($_POST['dhcpbackup'])) {
224
			$config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
225
			install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
226
		}
227

    
228
		write_config();
229

    
230
		$retval = 0;
231
		system_resolvconf_generate(true);
232
		$retval = filter_configure();
233
		if(stristr($retval, "error") <> true)
234
			$savemsg = get_std_save_message(gettext($retval));
235
		else
236
			$savemsg = gettext($retval);
237

    
238
		activate_powerd();
239
		load_crypto();
240
		load_thermal_hardware();
241
		if ($need_relayd_restart)
242
			relayd_configure();
243
		if ($need_apinger_restart)
244
			setup_gateways_monitor();
245
	}
246
}
247

    
248
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
249
include("head.inc");
250

    
251
?>
252

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

    
651
							<tr>
652
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Package settings"); ?></td>
653
							</tr>
654
							<tr>
655
								<td width="22%" valign="top" class="vncell"><?=gettext("Package signature"); ?></td>
656
								<td width="78%" class="vtable">
657
									<input name="pkg_nochecksig" type="checkbox" id="pkg_nochecksig" value="yes" <?php if ($pconfig['pkg_nochecksig']) echo "checked=\"checked\""; ?> />
658
									<strong><?=gettext("Do NOT check package signature"); ?></strong><br />
659
									<?=gettext("Enable this option to allow pfSense to install any package without checking its signature."); ?>
660
								</td>
661
							</tr>
662

    
663
							<tr>
664
								<td width="22%" valign="top">&nbsp;</td>
665
								<td width="78%">
666
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
667
								</td>
668
							</tr>
669
						</table>
670
					</div>
671
				</td>
672
			</tr>
673
		</table>
674
	</form>
675

    
676
<?php include("fend.inc"); ?>
677
</body>
678
</html>
(207-207/256)