Project

General

Profile

Download (31.8 KB) Statistics
| Branch: | Tag: | Revision:

univnautes / usr / local / www / system_advanced_misc.php @ a1b66bec

1
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_misc.php
5
	part of pfSense
6
	Copyright (C) 2005-2007 Scott Ullrich
7

    
8
	Copyright (C) 2008 Shrew Soft Inc
9

    
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13

    
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16

    
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19

    
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23

    
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35
/*
36
	pfSense_MODULE:	system
37
*/
38

    
39
##|+PRIV
40
##|*IDENT=page-system-advanced-misc
41
##|*NAME=System: Advanced: Miscellaneous page
42
##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page.
43
##|*MATCH=system_advanced_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
				$config['system']['srctrack'] = $_POST['srctrack'];
144
				$need_relayd_restart = true;
145
			}
146
		} else {
147
			if (isset($config['system']['lb_use_sticky'])) {
148
				unset($config['system']['lb_use_sticky']);
149
				$need_relayd_restart = true;
150
			}
151
		}
152

    
153
		if($_POST['gw_switch_default'] == "yes")
154
			$config['system']['gw_switch_default'] = true;
155
		else
156
			unset($config['system']['gw_switch_default']);
157

    
158
		if($_POST['pkg_nochecksig'] == "yes")
159
			$config['system']['pkg_nochecksig'] = true;
160
		elseif (isset($config['system']['pkg_nochecksig']))
161
			unset($config['system']['pkg_nochecksig']);
162

    
163
		if($_POST['powerd_enable'] == "yes")
164
			$config['system']['powerd_enable'] = true;
165
		else
166
			unset($config['system']['powerd_enable']);
167

    
168
		$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
169
		$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
170
		$config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode'];
171

    
172
		if($_POST['crypto_hardware'])
173
			$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
174
		else
175
			unset($config['system']['crypto_hardware']);
176

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

    
182
		if($_POST['schedule_states'] == "yes")
183
			$config['system']['schedule_states'] = true;
184
		else
185
			unset($config['system']['schedule_states']);
186

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

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

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

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

    
213
		$config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size'];
214
		$config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size'];
215

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

    
225
		write_config();
226

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

    
235
		activate_powerd();
236
		load_crypto();
237
		load_thermal_hardware();
238
		if ($need_relayd_restart)
239
			relayd_configure();
240
		if ($need_apinger_restart)
241
			setup_gateways_monitor();
242
	}
243
}
244

    
245
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
246
include("head.inc");
247

    
248
?>
249

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

    
636
							<tr>
637
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Package settings"); ?></td>
638
							</tr>
639
							<tr>
640
								<td width="22%" valign="top" class="vncell"><?=gettext("Package signature"); ?></td>
641
								<td width="78%" class="vtable">
642
									<input name="pkg_nochecksig" type="checkbox" id="pkg_nochecksig" value="yes" <?php if ($pconfig['pkg_nochecksig']) echo "checked=\"checked\""; ?> />
643
									<strong><?=gettext("Do NOT check package signature"); ?></strong><br />
644
									<?=gettext("Enable this option to allow pfSense to install any package without checking its signature."); ?>
645
								</td>
646
							</tr>
647

    
648
							<tr>
649
								<td width="22%" valign="top">&nbsp;</td>
650
								<td width="78%">
651
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
652
								</td>
653
							</tr>
654
						</table>
655
					</div>
656
				</td>
657
			</tr>
658
		</table>
659
	</form>
660

    
661
<?php include("fend.inc"); ?>
662
</body>
663
</html>
(207-207/256)