Project

General

Profile

Download (31.9 KB) Statistics
| Branch: | Tag: | Revision:
1 df81417f Matthew Grooms
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_misc.php
5
	part of pfSense
6 dd447bde Jim Thompson
	Copyright (C) 2005-2007 Scott Ullrich
7 29aef6c4 Jim Thompson
	Copyright (C) 2008 Shrew Soft Inc
8 ce77a9c4 Phil Davis
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
9 df81417f Matthew Grooms
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35 1d333258 Scott Ullrich
/*
36
	pfSense_MODULE:	system
37
*/
38 df81417f Matthew Grooms
39
##|+PRIV
40
##|*IDENT=page-system-advanced-misc
41
##|*NAME=System: Advanced: Miscellaneous page
42
##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page.
43 7997ed44 Renato Botelho
##|*MATCH=system_advanced_misc.php*
44 df81417f Matthew Grooms
##|-PRIV
45
46
require("guiconfig.inc");
47 7a927e67 Scott Ullrich
require_once("functions.inc");
48
require_once("filter.inc");
49
require_once("shaper.inc");
50 7b2fdac4 jim-p
require_once("vpn.inc");
51 6fbe0168 jim-p
require_once("vslb.inc");
52 df81417f Matthew Grooms
53 42c07003 Ermal
$pconfig['proxyurl'] = $config['system']['proxyurl'];
54
$pconfig['proxyport'] = $config['system']['proxyport'];
55
$pconfig['proxyuser'] = $config['system']['proxyuser'];
56
$pconfig['proxypass'] = $config['system']['proxypass'];
57 df81417f Matthew Grooms
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
58
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
59 45736415 jim-p
$pconfig['srctrack'] = $config['system']['srctrack'];
60 f4645d7f Ermal
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
61 8e9fa41d Scott Ullrich
$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']);
62 7530177c jim-p
$pconfig['crypto_hardware'] = $config['system']['crypto_hardware'];
63 f60156f6 jim-p
$pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
64 f204df7d Ermal Lu?i
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
65 b0cf10bf Ermal
$pconfig['kill_states'] = isset($config['system']['kill_states']);
66 a1f735b3 Renato Botelho
$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']);
67 a99547e4 Ermal
$pconfig['apinger_debug'] = isset($config['system']['apinger_debug']);
68 e92e83d4 jim-p
$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 51623673 jim-p
$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']);
72 df81417f Matthew Grooms
73 a358eec2 N0YB
$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 53c210dd Cristian Feldman
81 3d77cc35 Steven Selph
$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 7530177c jim-p
$crypto_modules = array('glxsb' => gettext("AMD Geode LX Security Block"),
86 43669934 Phil Davis
			'aesni' => gettext("AES-NI CPU-based Acceleration"));
87 7530177c jim-p
88 f60156f6 jim-p
$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 df81417f Matthew Grooms
if ($_POST) {
92
93 4f537e93 Renato Botelho
	unset($input_errors);
94
	$pconfig = $_POST;
95 df81417f Matthew Grooms
96
	ob_flush();
97
	flush();
98
99 7530177c jim-p
	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 f60156f6 jim-p
	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 efc0e29a jim-p
	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 e92e83d4 jim-p
108 efc0e29a jim-p
	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 e92e83d4 jim-p
111 df81417f Matthew Grooms
	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 42c07003 Ermal
		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 6fbe0168 jim-p
		$need_relayd_restart = false;
140 45736415 jim-p
		if($_POST['lb_use_sticky'] == "yes") {
141 6fbe0168 jim-p
			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 df81417f Matthew Grooms
153 f4645d7f Ermal
		if($_POST['gw_switch_default'] == "yes")
154
			$config['system']['gw_switch_default'] = true;
155
		else
156
			unset($config['system']['gw_switch_default']);
157
158 e5b5e29c Renato Botelho
		if($_POST['pkg_nochecksig'] == "yes")
159
			$config['system']['pkg_nochecksig'] = true;
160 51623673 jim-p
		elseif (isset($config['system']['pkg_nochecksig']))
161 e5b5e29c Renato Botelho
			unset($config['system']['pkg_nochecksig']);
162
163 f204df7d Ermal Lu?i
		if($_POST['powerd_enable'] == "yes")
164 4f537e93 Renato Botelho
			$config['system']['powerd_enable'] = true;
165
		else
166
			unset($config['system']['powerd_enable']);
167 f204df7d Ermal Lu?i
168 a358eec2 N0YB
		$config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode'];
169
		$config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode'];
170 3d77cc35 Steven Selph
		$config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode'];
171 7530177c jim-p
172
		if($_POST['crypto_hardware'])
173
			$config['system']['crypto_hardware'] = $_POST['crypto_hardware'];
174
		else
175
			unset($config['system']['crypto_hardware']);
176 f204df7d Ermal Lu?i
177 f60156f6 jim-p
		if($_POST['thermal_hardware'])
178
			$config['system']['thermal_hardware'] = $_POST['thermal_hardware'];
179
		else
180
			unset($config['system']['thermal_hardware']);
181
182 f204df7d Ermal Lu?i
		if($_POST['schedule_states'] == "yes")
183 4f537e93 Renato Botelho
			$config['system']['schedule_states'] = true;
184
		else
185
			unset($config['system']['schedule_states']);
186 df81417f Matthew Grooms
187 b0cf10bf Ermal
		if($_POST['kill_states'] == "yes")
188 4f537e93 Renato Botelho
			$config['system']['kill_states'] = true;
189
		else
190
			unset($config['system']['kill_states']);
191 b0cf10bf Ermal
192 a1f735b3 Renato Botelho
		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 a99547e4 Ermal
		$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 e92e83d4 jim-p
		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 df81417f Matthew Grooms
		write_config();
226
227
		$retval = 0;
228 6c86a39f Ermal
		system_resolvconf_generate(true);
229 df81417f Matthew Grooms
		$retval = filter_configure();
230
		if(stristr($retval, "error") <> true)
231 4f537e93 Renato Botelho
			$savemsg = get_std_save_message(gettext($retval));
232 df81417f Matthew Grooms
		else
233 4f537e93 Renato Botelho
			$savemsg = gettext($retval);
234
235 8e9fa41d Scott Ullrich
		activate_powerd();
236 7530177c jim-p
		load_crypto();
237 f60156f6 jim-p
		load_thermal_hardware();
238 37129ab8 Pierre POMES
		if ($need_relayd_restart)
239
			relayd_configure();
240 a99547e4 Ermal
		if ($need_apinger_restart)
241
			setup_gateways_monitor();
242 df81417f Matthew Grooms
	}
243
}
244
245 e51ed1e9 Vinicius Coque
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
246 df81417f Matthew Grooms
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 481e09b3 Colin Fleming
<script type="text/javascript">
259
//<![CDATA[
260 45736415 jim-p
function sticky_checked(obj) {
261
	if (obj.checked)
262
		jQuery('#srctrack').attr('disabled',false);
263
	else
264
		jQuery('#srctrack').attr('disabled','true');
265
}
266 e92e83d4 jim-p
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 481e09b3 Colin Fleming
//]]>
280 6441fa9a Ermal
</script>
281 ab3c8553 Matthew Grooms
	<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
282 481e09b3 Colin Fleming
		<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="system advanced misc">
283 ab3c8553 Matthew Grooms
			<tr>
284
				<td>
285
					<?php
286
						$tab_array = array();
287 e51ed1e9 Vinicius Coque
						$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 ab3c8553 Matthew Grooms
						display_top_tabs($tab_array);
294
					?>
295
				</td>
296
			</tr>
297
			<tr>
298 2ff19bfd Matthew Grooms
				<td id="mainarea">
299
					<div class="tabcont">
300
						<span class="vexpl">
301
							<span class="red">
302 481e09b3 Colin Fleming
								<strong><?=gettext("NOTE:"); ?>&nbsp;</strong>
303 2ff19bfd Matthew Grooms
							</span>
304 1eacdc8a Carlos Eduardo Ramos
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
305 8cd558b6 ayvis
							<br />
306 2ff19bfd Matthew Grooms
						</span>
307 8cd558b6 ayvis
						<br />
308 481e09b3 Colin Fleming
						<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
309 42c07003 Ermal
							<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 481e09b3 Colin Fleming
									<input name="proxyurl" id="proxyurl" value="<?php if ($pconfig['proxyurl'] <> "") echo $pconfig['proxyurl']; ?>" class="formfld unknown" />
316 42c07003 Ermal
									<br />
317 0c4cd13f Chris Buechler
									<?php printf(gettext("Hostname or IP address of proxy server this system will use for its outbound Internet access.")); ?>
318 42c07003 Ermal
								</td>
319
							</tr>
320
							<tr>
321
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Port"); ?></td>
322
								<td width="78%" class="vtable">
323 481e09b3 Colin Fleming
									<input name="proxyport" id="proxyport" value="<?php if ($pconfig['proxyport'] <> "") echo $pconfig['proxyport']; ?>" class="formfld unknown" />
324 42c07003 Ermal
									<br />
325 0c4cd13f Chris Buechler
									<?php printf(gettext("Port where proxy server is listening.")); ?>
326 42c07003 Ermal
								</td>
327
							</tr>
328
							<tr>
329
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Username"); ?></td>
330
								<td width="78%" class="vtable">
331 481e09b3 Colin Fleming
									<input name="proxyuser" id="proxyuser" value="<?php if ($pconfig['proxyuser'] <> "") echo $pconfig['proxyuser']; ?>" class="formfld unknown" />
332 42c07003 Ermal
									<br />
333 0c4cd13f Chris Buechler
									<?php printf(gettext("Username for authentication to proxy server. Optional, leave blank to not use authentication.")); ?>
334 42c07003 Ermal
								</td>
335
							</tr>
336
							<tr>
337 0c4cd13f Chris Buechler
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Password"); ?></td>
338 42c07003 Ermal
								<td width="78%" class="vtable">
339 481e09b3 Colin Fleming
									<input type="password" name="proxypass" id="proxypass" value="<?php if ($pconfig['proxypass'] <> "") echo $pconfig['proxypass']; ?>" class="formfld unknown" />
340 42c07003 Ermal
									<br />
341 0c4cd13f Chris Buechler
									<?php printf(gettext("Password for authentication to proxy server.")); ?>
342 42c07003 Ermal
								</td>
343
							</tr>
344 ab3c8553 Matthew Grooms
							<tr>
345 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
346 ab3c8553 Matthew Grooms
							</tr>
347
							<tr>
348 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
349 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
350 481e09b3 Colin Fleming
									<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 8cd558b6 ayvis
									<strong><?=gettext("Use sticky connections"); ?></strong><br />
352 f0d1af93 Carlos Eduardo Ramos
									<?=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 6fbe0168 jim-p
									"robin. Changing this option will restart the Load Balancing service."); ?>
360 45736415 jim-p
									<br />
361 481e09b3 Colin Fleming
									<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 45736415 jim-p
									<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 ab3c8553 Matthew Grooms
								</td>
367
							</tr>
368 f4645d7f Ermal
							<tr>
369
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
370
								<td width="78%" class="vtable">
371 3781d809 Ermal
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
372 0c4cd13f Chris Buechler
									<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 f4645d7f Ermal
								</td>
376
							</tr>
377 c912fe28 Scott Ullrich
							<tr>
378
								<td colspan="2" class="list" height="12">&nbsp;</td>
379
							</tr>
380 ab3c8553 Matthew Grooms
							<tr>
381 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
382 ab3c8553 Matthew Grooms
							</tr>
383 8e9fa41d Scott Ullrich
							<tr>
384 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
385 8e9fa41d Scott Ullrich
								<td width="78%" class="vtable">
386 481e09b3 Colin Fleming
									<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked=\"checked\""; ?> />
387 8cd558b6 ayvis
									<strong><?=gettext("Use PowerD"); ?></strong><br />
388
									<br />
389 a358eec2 N0YB
									<?=gettext("On AC Power Mode"); ?>&nbsp;:&nbsp;
390
									<select name="powerd_ac_mode" id="powerd_ac_mode">
391 481e09b3 Colin Fleming
										<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 a358eec2 N0YB
									</select>
396
									&nbsp;&nbsp;
397
									<?=gettext("On Battery Power Mode"); ?>&nbsp;:&nbsp;
398
									<select name="powerd_battery_mode" id="powerd_battery_mode">
399 481e09b3 Colin Fleming
										<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 53c210dd Cristian Feldman
									</select>
404 3d77cc35 Steven Selph
									<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 8cd558b6 ayvis
									<br /><br />
413 4f537e93 Renato Botelho
									<?=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 991549b4 Renato Botelho
									"tuned for systems where performance and interactivity are more important " .
424
									"than power consumption.  It raises frequency faster, drops slower and " .
425 4f537e93 Renato Botelho
									"keeps twice lower CPU load."); ?>
426 8e9fa41d Scott Ullrich
								</td>
427
							</tr>
428
							<tr>
429
								<td colspan="2" class="list" height="12">&nbsp;</td>
430
							</tr>
431 09f18f59 jim-p
							<tr>
432 7530177c jim-p
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Cryptographic Hardware Acceleration"); ?></td>
433 09f18f59 jim-p
							</tr>
434
							<tr>
435 7530177c jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Cryptographic Hardware"); ?></td>
436 09f18f59 jim-p
								<td width="78%" class="vtable">
437 7530177c jim-p
									<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 481e09b3 Colin Fleming
											<option value="<?php echo $cryptomod_name; ?>" <?php if ($pconfig['crypto_hardware'] == $cryptomod_name) echo " selected=\"selected\""; ?>><?php echo "{$cryptomod_descr} ({$cryptomod_name})"; ?></option>
441 7530177c jim-p
										<?php endforeach; ?>
442
									</select>
443 09f18f59 jim-p
									<br />
444 4f537e93 Renato Botelho
									<?=gettext("A cryptographic accelerator module will use hardware support to speed up some " .
445 7530177c jim-p
										"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 8cd558b6 ayvis
									<br /><br />
452 4f537e93 Renato Botelho
									<?=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 09f18f59 jim-p
								</td>
455
							</tr>
456
							<tr>
457
								<td colspan="2" class="list" height="12">&nbsp;</td>
458
							</tr>
459 f60156f6 jim-p
							<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 481e09b3 Colin Fleming
										<option value="<?php echo $themalmod_name; ?>" <?php if ($pconfig['thermal_hardware'] == $themalmod_name) echo " selected=\"selected\""; ?>><?php echo "{$themalmod_descr} ({$themalmod_name})"; ?></option>
469 f60156f6 jim-p
									<?php endforeach; ?>
470
								</select>
471
								<br />
472 9f223740 jim-p
								<?=gettext("If you have a supported CPU, selecting a themal sensor will load the appropriate " .
473 f60156f6 jim-p
										"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 8cd558b6 ayvis
								<br /><br />
476 f60156f6 jim-p
								<?=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 ab3c8553 Matthew Grooms
							<tr>
484 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
485 ab3c8553 Matthew Grooms
							</tr>
486 cc263020 Ermal
							<tr>
487 71172088 jim-p
								<td width="22%" valign="top" class="vncell">&nbsp;</td>
488 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
489 71172088 jim-p
									<?=gettext("These settings have moved to <a href=\"vpn_ipsec_settings.php\">VPN &gt; IPsec on the Advanced Settings tab</a>."); ?>
490 6441fa9a Ermal
								</td>
491
							</tr>
492 4f537e93 Renato Botelho
							<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 0c4cd13f Chris Buechler
									<?=gettext("By default, when a schedule expires, connections permitted by that schedule are killed. ".
504 f65555eb jim-p
									"This option overrides that behavior by not clearing states for existing connections."); ?>
505 4f537e93 Renato Botelho
								</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 243680e5 Chris Buechler
								<td width="22%" valign="top" class="vncell"><?=gettext("State Killing on Gateway Failure"); ?></td>
515 4f537e93 Renato Botelho
								<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 243680e5 Chris Buechler
									<?=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 4f537e93 Renato Botelho
								</td>
520
							</tr>
521 a1f735b3 Renato Botelho
							<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 0c4cd13f Chris Buechler
									<?=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 a1f735b3 Renato Botelho
								</td>
530
							</tr>
531 a99547e4 Ermal
							<tr>
532 0c4cd13f Chris Buechler
								<td width="22%" valign="top" class="vncell"><?=gettext("Enable gateway monitoring debug logging"); ?></td>
533 a99547e4 Ermal
								<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 0c4cd13f Chris Buechler
									<?=gettext("Enable this setting to log debug information from the gateway monitoring process to the system logs."); ?>
537 a99547e4 Ermal
								</td>
538
							</tr>
539 e92e83d4 jim-p
							<tr>
540 efc0e29a jim-p
								<td colspan="2" valign="top" class="listtopic"><?=gettext("RAM Disk Settings (Reboot to Apply Changes)"); ?></td>
541 e92e83d4 jim-p
							</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 8cd558b6 ayvis
									<strong><?=gettext("Use memory file system for /tmp and /var"); ?></strong><br />
548 e92e83d4 jim-p
									<?=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 779c00dd Colin Fleming
										<option value='0' <?php if (!isset($config['system']['rrdbackup']) || ($config['system']['rrdbackup'] == 0)) echo "selected='selected'"; ?>><?=gettext("Disable"); ?></option>
577 e92e83d4 jim-p
									<?php for ($x=1; $x<=24; $x++) { ?>
578 779c00dd Colin Fleming
										<option value='<?= $x ?>' <?php if ($config['system']['rrdbackup'] == $x) echo "selected='selected'"; ?>><?= $x ?> <?=gettext("hour"); ?><?php if ($x>1) echo "s"; ?></option>
579 e92e83d4 jim-p
									<?php } ?>
580
									</select>
581 8cd558b6 ayvis
									<br />
582 e92e83d4 jim-p
									<?=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 8cd558b6 ayvis
									<br />
584
									<br />
585 e92e83d4 jim-p
								</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 779c00dd Colin Fleming
										<option value='0' <?php if (!isset($config['system']['dhcpbackup']) || ($config['system']['dhcpbackup'] == 0)) echo "selected='selected'"; ?>><?=gettext("Disable"); ?></option>
593 e92e83d4 jim-p
									<?php for ($x=1; $x<=24; $x++) { ?>
594 779c00dd Colin Fleming
										<option value='<?= $x ?>' <?php if ($config['system']['dhcpbackup'] == $x) echo "selected='selected'"; ?>><?= $x ?> <?=gettext("hour"); ?><?php if ($x>1) echo "s"; ?></option>
595 e92e83d4 jim-p
									<?php } ?>
596
									</select>
597 8cd558b6 ayvis
									<br />
598 e92e83d4 jim-p
									<?=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 8cd558b6 ayvis
									<br />
600
									<br />
601 e92e83d4 jim-p
								</td>
602
							</tr>
603 ab3c8553 Matthew Grooms
							<tr>
604
								<td colspan="2" class="list" height="12">&nbsp;</td>
605
							</tr>
606
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
607
							<tr>
608 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
609 ab3c8553 Matthew Grooms
							</tr>
610
							<tr>
611 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
612 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
613
									<select name="harddiskstandby" class="formselect">
614
										<?php
615 4f537e93 Renato Botelho
											## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
616 ab3c8553 Matthew Grooms
											$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 481e09b3 Colin Fleming
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected="selected"');?>><?=gettext("Always on"); ?></option>
619 ab3c8553 Matthew Grooms
										<?php
620
											foreach ($sbvals as $sbval):
621
												list($min,$val) = explode(",", $sbval);
622
										?>
623 481e09b3 Colin Fleming
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected="selected"');?>><?=$min;?> <?=gettext("minutes"); ?></option>
624 ab3c8553 Matthew Grooms
										<?php endforeach; ?>
625
									</select>
626 8cd558b6 ayvis
									<br />
627 4d473c89 Vinicius Coque
									<?=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 ab3c8553 Matthew Grooms
								</td>
630
							</tr>
631
							<tr>
632
								<td colspan="2" class="list" height="12">&nbsp;</td>
633
							</tr>
634
							<?php endif; ?>
635
636 e5b5e29c Renato Botelho
							<tr>
637 ffb76388 Phil Davis
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Package settings"); ?></td>
638 e5b5e29c Renato Botelho
							</tr>
639
							<tr>
640 ffb76388 Phil Davis
								<td width="22%" valign="top" class="vncell"><?=gettext("Package signature"); ?></td>
641 e5b5e29c Renato Botelho
								<td width="78%" class="vtable">
642 51623673 jim-p
									<input name="pkg_nochecksig" type="checkbox" id="pkg_nochecksig" value="yes" <?php if ($pconfig['pkg_nochecksig']) echo "checked=\"checked\""; ?> />
643 ffb76388 Phil Davis
									<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 e5b5e29c Renato Botelho
								</td>
646
							</tr>
647
648 ab3c8553 Matthew Grooms
							<tr>
649
								<td width="22%" valign="top">&nbsp;</td>
650
								<td width="78%">
651 267c28ab Vinicius Coque
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
652 ab3c8553 Matthew Grooms
								</td>
653
							</tr>
654
						</table>
655
					</div>
656
				</td>
657
			</tr>
658
		</table>
659
	</form>
660 df81417f Matthew Grooms
661
<?php include("fend.inc"); ?>
662
</body>
663
</html>