Project

General

Profile

Download (20.6 KB) Statistics
| Branch: | Tag: | Revision:
1 df81417f Matthew Grooms
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_misc.php
5
	part of pfSense
6
	Copyright (C) 2005-2007 Scott Ullrich
7
8
	Copyright (C) 2008 Shrew Soft Inc
9
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35 1d333258 Scott Ullrich
/*
36
	pfSense_MODULE:	system
37
*/
38 df81417f Matthew Grooms
39
##|+PRIV
40
##|*IDENT=page-system-advanced-misc
41
##|*NAME=System: Advanced: Miscellaneous page
42
##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page.
43
##|*MATCH=system_advanced.php*
44
##|-PRIV
45
46
require("guiconfig.inc");
47 7a927e67 Scott Ullrich
require_once("functions.inc");
48
require_once("filter.inc");
49
require_once("shaper.inc");
50 127eb8e0 jim-p
require_once("ipsec.inc");
51 7b2fdac4 jim-p
require_once("vpn.inc");
52 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 f4645d7f Ermal
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
60 df81417f Matthew Grooms
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
61 127eb8e0 jim-p
$pconfig['racoondebug_enable'] = isset($config['ipsec']['racoondebug']);
62 6441fa9a Ermal
$pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']);
63
$pconfig['maxmss'] = $config['system']['maxmss'];
64 8e9fa41d Scott Ullrich
$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']);
65 09f18f59 jim-p
$pconfig['glxsb_enable'] = isset($config['system']['glxsb_enable']);
66 f204df7d Ermal Lu?i
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
67 b0cf10bf Ermal
$pconfig['kill_states'] = isset($config['system']['kill_states']);
68 df81417f Matthew Grooms
69
if ($_POST) {
70
71
    unset($input_errors);
72
    $pconfig = $_POST;
73
74
	ob_flush();
75
	flush();
76
77
	if (!$input_errors) {
78
79
		if($_POST['harddiskstandby'] <> "") {
80
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
81
			system_set_harddisk_standby();
82
		} else
83
			unset($config['system']['harddiskstandby']);
84
85 42c07003 Ermal
		if($_POST['proxyurl'] <> "")
86
			$config['system']['proxyurl'] = $_POST['proxyurl'];
87
		else
88
			unset($config['system']['proxyurl']);
89
90
		if($_POST['proxyport'] <> "")
91
			$config['system']['proxyport'] = $_POST['proxyport'];
92
		else
93
			unset($config['system']['proxyport']);
94
95
		if($_POST['proxyuser'] <> "")
96
			$config['system']['proxyuser'] = $_POST['proxyuser'];
97
		else
98
			unset($config['system']['proxyuser']);
99
100
		if($_POST['proxypass'] <> "")
101
			$config['system']['proxypass'] = $_POST['proxypass'];
102
		else
103
			unset($config['system']['proxypass']);
104
105 df81417f Matthew Grooms
		if($_POST['lb_use_sticky'] == "yes")
106
			$config['system']['lb_use_sticky'] = true;
107
		else
108
			unset($config['system']['lb_use_sticky']);
109
110 f4645d7f Ermal
		if($_POST['gw_switch_default'] == "yes")
111
			$config['system']['gw_switch_default'] = true;
112
		else
113
			unset($config['system']['gw_switch_default']);
114
115 f204df7d Ermal Lu?i
		if($_POST['preferoldsa_enable'] == "yes")
116 7b2fdac4 jim-p
			$config['ipsec']['preferoldsa'] = true;
117 ae0023be jim-p
		elseif (isset($config['ipsec']['preferoldsa']))
118 7b2fdac4 jim-p
			unset($config['ipsec']['preferoldsa']);
119 f204df7d Ermal Lu?i
120 127eb8e0 jim-p
		$need_racoon_restart = false;
121
		if($_POST['racoondebug_enable'] == "yes") {
122
			if (!isset($config['ipsec']['racoondebug'])) {
123
				$config['ipsec']['racoondebug'] = true;
124
				$need_racoon_restart = true;
125
			}
126
		} else {
127
			if (isset($config['ipsec']['racoondebug'])) {
128
				unset($config['ipsec']['racoondebug']);
129
				$need_racoon_restart = true;
130
			}
131
		}
132
133 6441fa9a Ermal
		if($_POST['maxmss_enable'] == "yes") {
134
                        $config['system']['maxmss_enable'] = true;
135
			$config['system']['maxmss'] = $_POST['maxmss'];
136
                } else {
137
                        unset($config['system']['maxmss_enable']);
138
                        unset($config['system']['maxmss']);
139
		}
140
141 f204df7d Ermal Lu?i
		if($_POST['powerd_enable'] == "yes")
142
                        $config['system']['powerd_enable'] = true;
143
                else
144
                        unset($config['system']['powerd_enable']);
145
146
		if($_POST['glxsb_enable'] == "yes")
147
                        $config['system']['glxsb_enable'] = true;
148
                else
149
                        unset($config['system']['glxsb_enable']);
150
151
		if($_POST['schedule_states'] == "yes")
152
                        $config['system']['schedule_states'] = true;
153
                else
154
                        unset($config['system']['schedule_states']);
155 df81417f Matthew Grooms
156 b0cf10bf Ermal
		if($_POST['kill_states'] == "yes")
157
                        $config['system']['kill_states'] = true;
158
                else
159
                        unset($config['system']['kill_states']);
160
161 df81417f Matthew Grooms
		write_config();
162
163
		$retval = 0;
164 6c86a39f Ermal
		system_resolvconf_generate(true);
165 df81417f Matthew Grooms
		$retval = filter_configure();
166
		if(stristr($retval, "error") <> true)
167 1eacdc8a Carlos Eduardo Ramos
		    $savemsg = get_std_save_message(gettext($retval));
168 df81417f Matthew Grooms
		else
169 1eacdc8a Carlos Eduardo Ramos
		    $savemsg = gettext($retval);
170 8e9fa41d Scott Ullrich
		
171
		activate_powerd();
172 09f18f59 jim-p
		load_glxsb();
173 7b2fdac4 jim-p
		vpn_ipsec_configure_preferoldsa();
174 127eb8e0 jim-p
		if ($need_racoon_restart)
175
			vpn_ipsec_force_reload();
176 df81417f Matthew Grooms
	}
177
}
178
179 e51ed1e9 Vinicius Coque
$pgtitle = array(gettext("System"),gettext("Advanced: Miscellaneous"));
180 df81417f Matthew Grooms
include("head.inc");
181
182
?>
183
184
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
185
<?php
186
	include("fbegin.inc");
187
	if ($input_errors)
188
		print_input_errors($input_errors);
189
	if ($savemsg)
190
		print_info_box($savemsg);
191
?>
192 6441fa9a Ermal
<script type="text/javascript" >
193
function maxmss_checked(obj) {
194
	if (obj.checked)
195
		$('maxmss').enable();
196
	else
197
		$('maxmss').disable();
198
}
199
</script>
200 ab3c8553 Matthew Grooms
	<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
201
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
202
			<tr>
203
				<td>
204
					<?php
205
						$tab_array = array();
206 e51ed1e9 Vinicius Coque
						$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
207
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
208
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
209
						$tab_array[] = array(gettext("Miscellaneous"), true, "system_advanced_misc.php");
210
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
211
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
212 ab3c8553 Matthew Grooms
						display_top_tabs($tab_array);
213
					?>
214
				</td>
215
			</tr>
216
			<tr>
217 2ff19bfd Matthew Grooms
				<td id="mainarea">
218
					<div class="tabcont">
219
						<span class="vexpl">
220
							<span class="red">
221 ea53e38f Renato Botelho
								<strong><?=gettext("NOTE:"); ?>&nbsp</strong>
222 2ff19bfd Matthew Grooms
							</span>
223 1eacdc8a Carlos Eduardo Ramos
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
224 2ff19bfd Matthew Grooms
							<br/>
225
						</span>
226
						<br/>
227
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
228 42c07003 Ermal
							<tr>
229
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Proxy support"); ?></td>
230
							</tr>
231
							<tr>
232
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy URL"); ?></td>
233
								<td width="78%" class="vtable">
234
									<input name="proxyurl" id="proxyurl" value="<?php if ($pconfig['proxyurl'] <> "") echo $pconfig['proxyurl']; ?>" class="formfld unknown">
235
									<br />
236 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy url for allowing %s to use this proxy to connect outside."),$g['product']); ?>
237 42c07003 Ermal
								</td>
238
							</tr>
239
							<tr>
240
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Port"); ?></td>
241
								<td width="78%" class="vtable">
242
									<input name="proxyport" id="proxyport" value="<?php if ($pconfig['proxyport'] <> "") echo $pconfig['proxyport']; ?>" class="formfld unknown">
243
									<br />
244 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy url for allowing %s to use this proxy port to connect outside. Default is 8080 for http protocol or ssl for 443."),$g['product']); ?>
245 42c07003 Ermal
								</td>
246
							</tr>
247
							<tr>
248
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Username"); ?></td>
249
								<td width="78%" class="vtable">
250
									<input name="proxyuser" id="proxyuser" value="<?php if ($pconfig['proxyuser'] <> "") echo $pconfig['proxyuser']; ?>" class="formfld unknown">
251
									<br />
252 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy username for allowing %s to use this proxy to connect outside"),$g['product']); ?>
253 42c07003 Ermal
								</td>
254
							</tr>
255
							<tr>
256 b4eec6e6 jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Proxy Pass"); ?></td>
257 42c07003 Ermal
								<td width="78%" class="vtable">
258
									<input type="password" name="proxypass" id="proxypass" value="<?php if ($pconfig['proxypass'] <> "") echo $pconfig['proxypass']; ?>" class="formfld unknown">
259
									<br />
260 d1d0a1ad Vinicius Coque
									<?php printf(gettext("Proxy password for allowing %s to use this proxy to connect outside"),$g['product']); ?>
261 42c07003 Ermal
								</td>
262
							</tr>
263 ab3c8553 Matthew Grooms
							<tr>
264 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Load Balancing"); ?></td>
265 ab3c8553 Matthew Grooms
							</tr>
266
							<tr>
267 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
268 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
269
									<input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> />
270 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use sticky connections"); ?></strong><br/>
271 f0d1af93 Carlos Eduardo Ramos
									<?=gettext("Successive connections will be redirected to the servers " .
272
									"in a round-robin manner with connections from the same " .
273
									"source being sent to the same web server. This 'sticky " .
274
									"connection' will exist as long as there are states that " .
275
									"refer to this connection. Once the states expire, so will " .
276
									"the sticky connection. Further connections from that host " .
277
									"will be redirected to the next web server in the round " .
278
									"robin."); ?>
279 ab3c8553 Matthew Grooms
								</td>
280
							</tr>
281 f4645d7f Ermal
							<tr>
282
								<td width="22%" valign="top" class="vncell"><?=gettext("Load Balancing"); ?></td>
283
								<td width="78%" class="vtable">
284 3781d809 Ermal
									<input name="gw_switch_default" type="checkbox" id="gw_switch_default" value="yes" <?php if ($pconfig['gw_switch_default']) echo "checked=\"checked\""; ?> />
285 f4645d7f Ermal
									<strong><?=gettext("Allow default gateway switching"); ?></strong><br/>
286
									<?=gettext("If the link where the default gateway resides fails " .
287
									"switch the default gateway to another available one."); ?>
288
								</td>
289
							</tr>
290 c912fe28 Scott Ullrich
							<tr>
291
								<td colspan="2" class="list" height="12">&nbsp;</td>
292
							</tr>
293 ab3c8553 Matthew Grooms
							<tr>
294 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Power savings"); ?></td>
295 ab3c8553 Matthew Grooms
							</tr>
296 8e9fa41d Scott Ullrich
							<tr>
297 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("PowerD"); ?></td>
298 8e9fa41d Scott Ullrich
								<td width="78%" class="vtable">
299
									<input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?php if ($pconfig['powerd_enable']) echo "checked"; ?> />
300 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use PowerD"); ?></strong><br/>
301 8e9fa41d Scott Ullrich
									<br />
302 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("The powerd utility monitors the system state and sets various power control " .
303 d0a00ec9 Vinicius Coque
								     "options accordingly. It offers three modes (maximum, minimum, and " .
304 f0d1af93 Carlos Eduardo Ramos
								     "adaptive) that can be individually selected while on AC power or batteries. " . 
305
								     "The modes maximum, minimum, and adaptive may be abbreviated max, " .
306
								     "min, adp.   Maximum mode chooses the highest performance values.  Minimum " .
307
								     "mode selects the lowest performance values to get the most power savings. " .
308
								     "Adaptive mode attempts to strike a balance by degrading performance when " .
309
								     "the system appears idle and increasing it when the system is busy.  It " .
310
								     "offers a good balance between a small performance loss for greatly " .
311 7e1cf139 jim-p
								     "increased power savings.  The default mode for {$g['product_name']} is adaptive."); ?>
312 8e9fa41d Scott Ullrich
								</td>
313
							</tr>
314
							<tr>
315
								<td colspan="2" class="list" height="12">&nbsp;</td>
316
							</tr>
317 09f18f59 jim-p
							<tr>
318 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("glxsb Crypto Acceleration"); ?></td>
319 09f18f59 jim-p
							</tr>
320
							<tr>
321 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("glxsb"); ?></td>
322 09f18f59 jim-p
								<td width="78%" class="vtable">
323
									<input name="glxsb_enable" type="checkbox" id="glxsb_enable" value="yes" <?php if ($pconfig['glxsb_enable']) echo "checked"; ?> />
324 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Use glxsb"); ?></strong><br/>
325 09f18f59 jim-p
									<br />
326 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("The AMD Geode LX Security Block will accelerate some cryptographic functions " .
327
								     "on systems which have the chip. Do not enable this option if you have a " .
328
								     "Hifn cryptographic acceleration card, as this will take precedence and the " .
329
								     "Hifn card will not be used. Acceleration should be automatic for IPsec " .
330
								     "when using Rijndael (AES). OpenVPN should be set for AES-128-CBC."); ?>
331 09f18f59 jim-p
								     <br/><br/>
332 f0d1af93 Carlos Eduardo Ramos
								     <?=gettext("If you do not have a glxsb chip in your system, this option will have no " .
333
								     "effect. To unload the module, uncheck this option and then reboot."); ?>
334 09f18f59 jim-p
								</td>
335
							</tr>
336
							<tr>
337
								<td colspan="2" class="list" height="12">&nbsp;</td>
338
							</tr>
339 ab3c8553 Matthew Grooms
							<tr>
340 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("IP Security"); ?></td>
341 ab3c8553 Matthew Grooms
							</tr>
342
							<tr>
343 e8c8891d jim-p
								<td width="22%" valign="top" class="vncell"><?=gettext("Security Associations"); ?></td>
344 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
345 7b2fdac4 jim-p
									<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> />
346 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
347 ab3c8553 Matthew Grooms
									<br />
348 f0d1af93 Carlos Eduardo Ramos
									<?=gettext("By default, if several SAs match, the newest one is " .
349
									"preferred if it's at least 30 seconds old. Select this " .
350
									"option to always prefer old SAs over new ones."); ?>
351 ab3c8553 Matthew Grooms
								</td>
352
							</tr>
353 127eb8e0 jim-p
							<tr>
354
								<td width="22%" valign="top" class="vncell"><?=gettext("IPsec Debug"); ?></td>
355
								<td width="78%" class="vtable">
356
									<input name="racoondebug_enable" type="checkbox" id="racoondebug_enable" value="yes" <?php if ($pconfig['racoondebug_enable']) echo "checked"; ?> />
357
									<strong><?=gettext("Start racoon in debug mode"); ?></strong>
358
									<br />
359
									<?=gettext("Launches racoon in debug mode so that more verbose logs " .
360
									"will be generated to aid in troubleshooting."); ?><br/>
361
									<?=gettext("NOTE: Changing this setting will restart racoon."); ?>
362
								</td>
363
							</tr>
364 6441fa9a Ermal
							<tr>
365
								<td width="22%" valign="top" class="vncell"><?=gettext("Maximum MSS"); ?></td>
366
								<td width="78%" class="vtable">
367
									<input name="maxmss_enable" type="checkbox" id="maxmss_enable" value="yes" <?php if ($pconfig['maxmss_enable'] == true) echo "checked"; ?> onClick="maxmss_checked(this)" />
368 f7ec62f8 Chris Buechler
									<strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong>
369 6441fa9a Ermal
									<br />
370 f7ec62f8 Chris Buechler
									<input name="maxmss" id="maxmss" value="<?php if ($pconfig['maxmss'] <> "") echo $pconfig['maxmss']; else "1400"; ?>" class="formfld unknown" <?php if ($pconfig['maxmss_enable'] == false) echo "disabled"; ?>>
371 6441fa9a Ermal
									<br />
372 f7ec62f8 Chris Buechler
									<?=gettext("Enable MSS clamping on TCP flows over VPN. " .
373
									"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?>
374 6441fa9a Ermal
								</td>
375
							</tr>
376 f204df7d Ermal Lu?i
                                                        <tr>
377
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
378
                                                        </tr>
379
                                                        <tr>
380 1eacdc8a Carlos Eduardo Ramos
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedules"); ?></td>
381 f204df7d Ermal Lu?i
                                                        </tr>
382
                                                        <tr>
383 1eacdc8a Carlos Eduardo Ramos
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("Schedule States"); ?></td>
384 f204df7d Ermal Lu?i
                                                                <td width="78%" class="vtable">
385
                                                                        <input name="schedule_states" type="checkbox" id="schedule_states" value="yes" <?php if ($pconfig['schedule_states']) echo "checked"; ?> />
386
                                                                        <br />
387 4d473c89 Vinicius Coque
									<?=gettext("By default schedules clear the states of existing connections when expiry time has come. ".
388
									"This option allows to override this setting by not clearing states for existing connections."); ?>
389 b0cf10bf Ermal
                                                                </td>
390
                                                        </tr>
391
                                                        <tr>
392
                                                                <td colspan="2" class="list" height="12">&nbsp;</td>
393
                                                        </tr>
394
                                                        <tr>
395
                                                                <td colspan="2" valign="top" class="listtopic"><?=gettext("Gateway Monitoring"); ?></td>
396
                                                        </tr>
397
                                                        <tr>
398
                                                                <td width="22%" valign="top" class="vncell"><?=gettext("States"); ?></td>
399
                                                                <td width="78%" class="vtable">
400
                                                                        <input name="kill_states" type="checkbox" id="kill_states" value="yes" <?php if ($pconfig['kill_states']) echo "checked"; ?> />
401
                                                                        <br />
402
									<?=gettext("By default the monitoring process will flush states for a gateway that goes down. ".
403
									"This option allows to override this setting by not clearing states for existing connections."); ?>
404 f204df7d Ermal Lu?i
                                                                </td>
405
                                                        </tr>
406 ab3c8553 Matthew Grooms
							<tr>
407
								<td colspan="2" class="list" height="12">&nbsp;</td>
408
							</tr>
409
							<?php if($g['platform'] == "pfSenseDISABLED"): ?>
410
							<tr>
411 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Hardware Settings"); ?></td>
412 ab3c8553 Matthew Grooms
							</tr>
413
							<tr>
414 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Hard disk standby time "); ?></td>
415 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
416
									<select name="harddiskstandby" class="formselect">
417
										<?php
418
										 	## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66)
419
											$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");
420
										?>
421 1eacdc8a Carlos Eduardo Ramos
										<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>><?=gettext("Always on"); ?></option>
422 ab3c8553 Matthew Grooms
										<?php
423
											foreach ($sbvals as $sbval):
424
												list($min,$val) = explode(",", $sbval);
425
										?>
426 1eacdc8a Carlos Eduardo Ramos
										<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> <?=gettext("minutes"); ?></option>
427 ab3c8553 Matthew Grooms
										<?php endforeach; ?>
428
									</select>
429
									<br/>
430 4d473c89 Vinicius Coque
									<?=gettext("Puts the hard disk into standby mode when the selected amount of time after the last ".
431
									"access has elapsed."); ?> <em><?=gettext("Do not set this for CF cards."); ?></em>
432 ab3c8553 Matthew Grooms
								</td>
433
							</tr>
434
							<tr>
435
								<td colspan="2" class="list" height="12">&nbsp;</td>
436
							</tr>
437
							<?php endif; ?>
438
439
							<tr>
440
								<td width="22%" valign="top">&nbsp;</td>
441
								<td width="78%">
442 267c28ab Vinicius Coque
									<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
443 ab3c8553 Matthew Grooms
								</td>
444
							</tr>
445
						</table>
446
					</div>
447
				</td>
448
			</tr>
449
		</table>
450
	</form>
451 df81417f Matthew Grooms
452
<?php include("fend.inc"); ?>
453
</body>
454
</html>