Project

General

Profile

Download (28 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/usr/local/bin/php
2
<?php
3
/* $Id$ */
4
/*
5
	system_advanced.php
6
        part of pfSense
7
        Copyright (C) 2005 Scott Ullrich
8

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

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

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

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

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

    
35
require("guiconfig.inc");
36

    
37
$pconfig['disablefilter'] = $config['system']['disablefilter'];
38
$pconfig['disableftpproxy'] = $config['system']['disableftpproxy'];
39
$pconfig['rfc959workaround'] = $config['system']['rfc959workaround'];
40
$pconfig['filteringbridge_enable'] = isset($config['bridge']['filteringbridge']);
41
$pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']);
42
$pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr'];
43
$pconfig['cert'] = base64_decode($config['system']['webgui']['certificate']);
44
$pconfig['key'] = base64_decode($config['system']['webgui']['private-key']);
45
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
46
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
47
$pconfig['altfirmwareurl'] = $config['system']['altfirmwareurl']['enabled'];
48
$pconfig['firmware_base_url'] = $config['system']['alt_firmware_url']['firmware_base_url'];
49
$pconfig['firmwarename'] = $config['system']['alt_firmware_url']['firmware_filename'];
50
$pconfig['altpkgconfigurl'] = $config['system']['alt_pkgconfig_url']['enabled'];
51
$pconfig['pkgconfig_base_url'] = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'];
52
$pconfig['pkgconfig_filename'] = $config['system']['alt_pkgconfig_url']['pkgconfig_filename'];
53
$pconfig['expanddiags'] = isset($config['system']['webgui']['expanddiags']);
54
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
55
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
56
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
57
$pconfig['schedulertype'] = $config['system']['schedulertype'];
58
$pconfig['maximumstates'] = $config['system']['maximumstates'];
59
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
60
$pconfig['enableserial'] = $config['system']['enableserial'];
61

    
62
if ($_POST) {
63

    
64
	unset($input_errors);
65
	$pconfig = $_POST;
66

    
67
	/* input validation */
68
	if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) {
69
		$input_errors[] = "You must specify an IP address to NAT IPv6 packets.";
70
	}
71
	if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) {
72
		$input_errors[] = "The Firewall Maximum States value must be an integer.";
73
	}
74
	if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) {
75
		$input_errors[] = "The TCP idle timeout must be an integer.";
76
	}
77
	if (($_POST['cert'] && !$_POST['key']) || ($_POST['key'] && !$_POST['cert'])) {
78
		$input_errors[] = "Certificate and key must always be specified together.";
79
	} else if ($_POST['cert'] && $_POST['key']) {
80
		if (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))
81
			$input_errors[] = "This certificate does not appear to be valid.";
82
		if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY"))
83
			$input_errors[] = "This key does not appear to be valid.";
84
	if ($_POST['altfirmwareurl'])
85
		if ($_POST['firmwareurl'] == "" || $_POST['firmwarename'] == "")
86
		$input_errors[] = "You must specify a base URL and a filename for the alternate firmware.";
87

    
88
	if ($_POST['altpkgconfigurl'])
89
		if ($_POST['pkgconfig_base_url'] == "" || $_POST['pkgconfig_filename'] == "")
90
		$input_errors[] = "You must specifiy and base URL and a filename before using an alternate pkg_config.xml.";
91
	}
92

    
93
	if (!$input_errors) {
94
		if($_POST['disablefilter'] == "yes") {
95
			$config['system']['disablefilter'] = "enabled";
96
		} else {
97
			unset($config['system']['disablefilter']);
98
		}
99
		if($_POST['disableftpproxy'] == "yes") {
100
			$config['system']['disableftpproxy'] = "enabled";
101
			unset($config['system']['rfc959workaround']);
102
		} else {
103
			unset($config['system']['disableftpproxy']);
104
		}
105
		if($_POST['rfc959workaround'] == "yes") {
106
			$config['system']['rfc959workaround'] = "enabled";
107
		}
108
		$config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false;
109
		$config['diag']['ipv6nat']['enable'] = $_POST['ipv6nat_enable'] ? true : false;
110
		$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
111
		$oldcert = $config['system']['webgui']['certificate'];
112
		$oldkey = $config['system']['webgui']['private-key'];
113
		$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
114
		$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
115
		$config['system']['disableconsolemenu'] = $_POST['disableconsolemenu'] ? true : false;
116
		$config['system']['disablefirmwarecheck'] = $_POST['disablefirmwarecheck'] ? true : false;
117
		$config['system']['altfirmwareurl'] = $_POST['altfirmwareurl'] ? true : false;
118
		if ($_POST['altfirmwareurl']) {
119
			$config['system']['alt_firmware_url'] = array();
120
			$config['system']['alt_firmware_url']['enabled'] = "";
121
			$config['system']['alt_firmware_url']['firmware_base_url'] = $_POST['firmwareurl'];
122
			$config['system']['alt_firmware_url']['firmware_filename'] = $_POST['firmwarename'];
123
		} elseif (isset($config['system']['alt_firmware_url']['firmware_base_url']) || isset($config['system']['alt_firmware_url']['firmware_filename'])) {
124
			unset($config['system']['alt_firmware_url']['enabled']);
125
		} else {
126
			unset($config['system']['alt_firmware_url']);
127
		}
128

    
129
		if ($_POST['altpkgconfigurl']) {
130
			$config['system']['alt_pkgconfig_url'] = array();
131
			$config['system']['alt_pkgconfig_url']['enabled'] = "";
132
			$config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] = $_POST['pkgconfig_base_url'];
133
			$config['system']['alt_pkgconfig_url']['pkgconfig_filename'] = $_POST['pkgconfig_filename'];
134
		} elseif (isset($config['system']['alt_pkgconfig_url']['pkgconfig_base_url']) || isset($config['system']['alt_pkgconfig_url']['pkgconfig_filename'])) {
135
			unset($config['system']['alt_pkgconfig_url']['enabled']);
136
		} else {
137
			unset($config['system']['alt_pkgconfig_url']);
138
		}
139

    
140
		$config['system']['webgui']['expanddiags'] = $_POST['expanddiags'] ? true : false;
141
		$config['system']['optimization'] = $_POST['optimization'];
142
		$config['system']['disablerendevouz'] = $_POST['disablerendevouz'];
143
		
144
		$config['system']['enableserial'] = $_POST['enableserial'];
145

    
146
		$oldharddiskstandby = $config['system']['harddiskstandby'];
147
		$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
148
		$config['system']['webgui']['noantilockout'] = $_POST['noantilockout'] ? true : false;
149

    
150
		/* Firewall and ALTQ options */
151
		$config['system']['schedulertype'] = $_POST['schedulertype'];
152
		$config['system']['maximumstates'] = $_POST['maximumstates'];
153

    
154
		write_config();
155

    
156
		if (($config['system']['webgui']['certificate'] != $oldcert)
157
				|| ($config['system']['webgui']['private-key'] != $oldkey)) {
158
			system_webgui_start();
159
		}
160

    
161
		system_set_harddisk_standby();
162
			
163
		$retval = 0;
164
		if (!file_exists($d_sysrebootreqd_path)) {
165
			config_lock();
166
			$retval = filter_configure();
167
			if(stristr($retval, "error") <> true)
168
			    $savemsg = get_std_save_message($retval);
169
			else
170
			    $savemsg = $retval;
171
			$retval |= interfaces_optional_configure();
172
			config_unlock();
173
		}
174
		
175
		$etc_ttys  = return_filename_as_array("/etc/ttys");
176
		$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
177
		
178
		
179
		conf_mount_rw();
180
		
181
		$fout = fopen("/etc/ttys","w");
182
		foreach($etc_ttys as $tty) {
183
			if(stristr($tty,"ttyp0") <> true) {
184
				fwrite($fout, $tty . "\n");				
185
			}
186
		}
187
		if($pconfig['enableserial'] <> "")
188
			fwrite($fout, "ttyv0\t\"/usr/libexec/getty Pc\"\tcons25\ton\tsecure\n");
189
		fclose($fout);		
190
		
191
		$fout = fopen("/boot/loader.rc","w");
192
		foreach($boot_loader_rc as $blrc) {
193
			if(stristr($blrc,"comconsole") <> true) {
194
				fwrite($fout, $blrc . "\n");				
195
			}
196
		}
197
		if($pconfig['enableserial'] <> "")
198
			fwrite($fout, "set console=comconsole\n");
199
		fclose($fout);
200
		
201
		conf_mount_ro();
202
	}
203
}
204
?>
205
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
206
<html>
207
<head>
208
<title><?=gentitle("System: Advanced functions");?></title>
209
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
210
<link href="gui.css" rel="stylesheet" type="text/css">
211
<script language="JavaScript">
212
<!--
213
function enable_change(enable_over) {
214
	if (document.iform.ipv6nat_enable.checked || enable_over) {
215
		document.iform.ipv6nat_ipaddr.disabled = 0;
216
		document.iform.schedulertype.disabled = 0;
217
	} else {
218
		document.iform.ipv6nat_ipaddr.disabled = 1;
219
	}
220
}
221
function enable_altfirmwareurl(enable_over) {
222
        if (document.iform.altfirmwareurl.checked || enable_over) {
223
                document.iform.firmwareurl.disabled = 0;
224
                document.iform.firmwarename.disabled = 0;
225
        } else {
226
                document.iform.firmwareurl.disabled = 1;
227
                document.iform.firmwarename.disabled = 1;
228
        }
229
}
230
function enable_altpkgconfigurl(enable_over) {
231
	if (document.iform.altpkgconfigurl.checked || enable_over) {
232
		document.iform.pkgconfig_base_url.disabled = 0;
233
		document.iform.pkgconfig_filename.disabled = 0;
234
	} else {
235
		document.iform.pkgconfig_base_url.disabled = 1;
236
		document.iform.pkgconfig_filename.disabled = 1;
237
	}
238
}
239

    
240
var descs=new Array(5);
241
descs[0]="as the name says, it's the normal optimization algorithm";
242
descs[1]="used for high latency links, such as satellite links.  Expires idle connections later than default";
243
descs[2]="expires idle connections quicker. more efficient use of CPU and memory but can drop legitimate connections";
244
descs[3]="tries to avoid dropping any legitimate connections at the expense of increased memory usage and CPU utilization.";
245

    
246
function update_description(itemnum) {
247
        document.forms[0].info.value=descs[itemnum];
248

    
249
}
250

    
251
// -->
252
</script>
253
</head>
254

    
255
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
256
<form action="system_advanced.php" method="post" name="iform" id="iform">
257
<?php include("fbegin.inc"); ?>
258
      <p class="pgtitle">System: Advanced functions</p>
259
            <?php if ($input_errors) print_input_errors($input_errors); ?>
260
            <?php if ($savemsg) print_info_box($savemsg); ?>
261
            <p><span class="vexpl"><span class="red"><strong>Note: </strong></span>the
262
              options on this page are intended for use by advanced users only,
263
              and there's <strong>NO</strong> support for them.</span></p><br>
264

    
265
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
266

    
267
                <tr>
268
                  <td colspan="2" valign="top" class="listtopic">Enable Serial Console</td>
269
                </tr>
270
                <tr>
271
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
272
                  <td width="78%" class="vtable">
273
                    <input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if ($pconfig['enableserial']) echo "checked"; ?> onclick="enable_change(false)">
274
                    <strong>This will enable the first serial port with 9600/8/N/1</strong>
275
                    </td>
276
                </tr>
277

    
278
<!--
279
                <tr>
280
                  <td colspan="2" valign="top" class="listtopic">Disable Rendezvous</td>
281
                </tr>
282
                <tr>
283
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
284
                  <td width="78%" class="vtable">
285
                    <input name="disablerendevouz" type="checkbox" id="disablerendevouz" value="yes" <?php if ($pconfig['disablerendevouz']) echo "checked"; ?> onclick="enable_change(false)">
286
                    <strong>Disable the Rendevouz automatic discovery protocol.</strong>
287
                    </td>
288
                </tr>
289
-->
290
                <tr>
291
                  <td width="22%" valign="top">&nbsp;</td>
292
                  <td width="78%">
293
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
294
                  </td>
295
                </tr>
296
                <tr>
297
                  <td colspan="2" class="list" height="12"></td>
298
                </tr>
299

    
300
                <tr>
301
                  <td colspan="2" valign="top" class="listtopic">IPv6 tunneling</td>
302
                </tr>
303
                <tr>
304
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
305
                  <td width="78%" class="vtable">
306
                    <input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)">
307
                    <strong>NAT encapsulated IPv6 packets (IP protocol 41/RFC2893)
308
                    to:</strong><br> <br> <input name="ipv6nat_ipaddr" type="text" class="formfld" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>">
309
                    &nbsp;(IP address)<span class="vexpl"><br>
310
                    Don't forget to add a firewall rule to permit IPv6 packets!</span></td>
311
                </tr>
312
                <tr>
313
                  <td width="22%" valign="top">&nbsp;</td>
314
                  <td width="78%">
315
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
316
                  </td>
317
                </tr>
318
                <tr>
319
                  <td colspan="2" class="list" height="12"></td>
320
                </tr>
321
		<tr>
322
                  <td colspan="2" valign="top" class="listtopic">Filtering bridge</td>
323
                </tr>
324
                <tr>
325
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
326
                  <td width="78%" class="vtable">
327
                    <input name="filteringbridge_enable" type="checkbox" id="filteringbridge_enable" value="yes" <?php if ($pconfig['filteringbridge_enable']) echo "checked"; ?>>
328
                    <strong>Enable filtering bridge</strong><span class="vexpl"><br>
329
                    This will cause bridged packets to pass through the packet
330
                    filter in the same way as routed packets do (by default bridged
331
                    packets are always passed). If you enable this option, you'll
332
                    have to add filter rules to selectively permit traffic from
333
                    bridged interfaces.</span></td>
334
                </tr>
335
                <tr>
336
                  <td width="22%" valign="top">&nbsp;</td>
337
                  <td width="78%">
338
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
339
                  </td>
340
                </tr>
341
                <tr>
342
                  <td colspan="2" class="list" height="12"></td>
343
                </tr>
344
                <tr>
345
                  <td colspan="2" valign="top" class="listtopic">webGUI SSL certificate/key</td>
346
                </tr>
347
                <tr>
348
                  <td width="22%" valign="top" class="vncell">Certificate</td>
349
                  <td width="78%" class="vtable">
350
                    <textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
351
                    <br>
352
                    Paste a signed certificate in X.509 PEM format here. <A target="_new" HREF='system_advanced_create_certs.php'>Create</a> certificates automatically.</td>
353
                </tr>
354
                <tr>
355
                  <td width="22%" valign="top" class="vncell">Key</td>
356
                  <td width="78%" class="vtable">
357
                    <textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
358
                    <br>
359
                    Paste an RSA private key in PEM format here.</td>
360
                </tr>
361
                <tr>
362
                  <td width="22%" valign="top">&nbsp;</td>
363
                  <td width="78%">
364
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
365
                  </td>
366
                </tr>
367
                <tr>
368
                  <td colspan="2" class="list" height="12"></td>
369
                </tr>
370
                <tr>
371
                  <td colspan="2" valign="top" class="listtopic">Miscellaneous</td>
372
                </tr>
373
				<tr>
374
                  <td width="22%" valign="top" class="vncell">Console menu </td>
375
                  <td width="78%" class="vtable">
376
                    <input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>>
377
                    <strong>Disable console menu</strong><span class="vexpl"><br>
378
                    Changes to this option will take effect after a reboot.</span></td>
379
                </tr>
380
		<tr>
381
                  <td valign="top" class="vncell">Firmware version check </td>
382
                  <td class="vtable">
383
                    <input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked"; ?>>
384
                    <strong>Disable firmware version check</strong><span class="vexpl"><br>
385
    This will cause pfSense not to check for newer firmware versions when the <a href="system_firmware.php">System: Firmware</a> page is viewed.</span></td>
386
		</tr>
387
		<tr>
388
                  <td valign="top" class="vncell">Alternate firmware URL</td>
389
                  <td class="vtable">
390
                    <input name="altfirmwareurl" type="checkbox" id="altfirmwareurl" value="yes" onClick="enable_altfirmwareurl()" <?php if (isset($pconfig['altfirmwareurl'])) echo "checked"; ?>> Use a different URL for firmware upgrades<br>
391
		    <table>
392
                    <tr><td>Base URL:</td><td><input name="firmwareurl" type="input" id="firmwareurl" size="64" value="<?php if ($pconfig['firmwareurl']) echo $pconfig['firmwareurl']; else echo $g['firmwarebaseurl']; ?>"></td></tr>
393
                    <tr><td>Filename:</td><td><input name="firmwarename" type="input" id="firmwarename" size="32" value="<?php if ($pconfig['firmwarename']) echo $pconfig['firmwarename']; else echo $g['firmwarefilename']; ?>"></td></tr>
394
		    </table>
395
                    <span class="vexpl">
396
    This is where pfSense will check for newer firmware versions when <a href="system_firmware.php">System: Firmware</a> page is viewed.</span></td>
397
		</tr>
398
                <tr>
399
                  <td valign="top" class="vncell">Alternate pkg_config.xml URL</td>
400
                  <td class="vtable">
401
                    <input name="altpkgconfigurl" type="checkbox" id="altpkgconfigurl" value="yes" onClick="enable_altpkgconfigurl()" <?php if (isset($pconfig['altpkgconfigurl'])) echo "checked"; ?>> Retrieve the package list from a different URL<br>
402
                    <table>
403
                    <tr><td>Base URL:</td><td><input name="pkgconfig_base_url" type="input" id="pkgconfig_base_url" size="64" value="<?php if ($pconfig['pkg_config_base_url']) echo $pconfig['pkg_config_base_url']; else echo $g['pkg_config_base_url']; ?>"></td></tr>
404
                    <tr><td>Filename:</td><td><input name="pkgconfig_filename" type="input" id="pkgconfig_filename" size="32" value="<?php if ($pconfig['pkg_config_filename']) echo $pconfig['pkg_config_filename']; else echo $g['pkg_config_filename']; ?>"></td></tr>
405
                    </table>
406
                    <span class="vexpl">
407
    This is where pfSense will fetch its package list from.</span></td>
408
                </tr>
409
		<tr>
410
                  <td width="22%" valign="top" class="vncell">Hard disk standby time </td>
411
                  <td width="78%" class="vtable">
412
                    <select name="harddiskstandby" class="formfld">
413
					<?php
414
                        /* Values from ATA-2
415
                           http://www.t13.org/project/d0948r3-ATA-2.pdf
416
                           Page 66 */
417
						$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");
418
					?>
419
                      <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
420
					<?php
421
					foreach ($sbvals as $sbval):
422
						list($min,$val) = explode(",", $sbval); ?>
423
                      <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
424
					<?php endforeach; ?>
425
                    </select>
426
                    <br>
427
                    Puts the hard disk into standby mode when the selected amount of time after the last
428
                    access has elapsed. <em>Do not set this for CF cards.</em></td>
429
				</tr>
430
				<tr>
431
                  <td width="22%" valign="top" class="vncell">Navigation</td>
432
                  <td width="78%" class="vtable">
433
                    <input name="expanddiags" type="checkbox" id="expanddiags" value="yes" <?php if ($pconfig['expanddiags']) echo "checked"; ?>>
434
                    <strong>Keep diagnostics in navigation expanded </strong></td>
435
                </tr>
436
		<tr>
437
                  <td width="22%" valign="top" class="vncell">webGUI anti-lockout</td>
438
                  <td width="78%" class="vtable">
439
                    <input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?>>
440
                    <strong>Disable webGUI anti-lockout rule</strong><br>
441
					By default, access to the webGUI on the LAN interface is always permitted, regardless of the user-defined filter rule set. Enable this feature to control webGUI access (make sure to have a filter rule in place that allows you in, or you will lock yourself out!).<br>
442
					Hint:
443
					the &quot;set LAN IP address&quot; option in the console menu  resets this setting as well.</td>
444
                </tr>
445
                <tr>
446
                  <td width="22%" valign="top">&nbsp;</td>
447
                  <td width="78%">
448
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
449
                  </td>
450
                </tr>
451
                <tr>
452
                  <td colspan="2" class="list" height="12"></td>
453
                </tr>
454
                <tr>
455
                  <td colspan="2" valign="top" class="listtopic">Traffic Shaper and Firewall Advanced</td>
456
                </tr>
457
                <tr>
458
                  <td width="22%" valign="top" class="vncell">FTP Helper</td>
459
                  <td width="78%" class="vtable">
460
                    <input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if (isset($config['system']['disableftpproxy'])) echo "checked"; ?> onclick="enable_change(false)">
461
                    <strong class="vexpl">Disable the userland FTP-Proxy application</strong><br>
462
                </tr>
463
                <tr>
464
                  <td width="22%" valign="top" class="vncell">FTP RFC 959 data port violation workaround</td>
465
                  <td width="78%" class="vtable">
466
                    <input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> onclick="enable_change(false)">
467
                    <strong class="vexpl">Workaround for sites that violate RFC 959 which specifies that the data connection be sourced from the command port - 1 (typically port 20).  This workaround doesn't expose you to any extra risk as the firewall will still only allow connections on a port that the ftp-proxy is listening on.</strong><br>
468
                </tr>
469

    
470
		<tr>
471
		  <td width="22%" valign="top" class="vncell">Traffic Shaper Scheduler</td>
472
		  <td width="78%" class="vtable">
473
		    <select id="schedulertype" name="schedulertype" <?= $style ?>>
474
			    <option value="priq"<?php if($pconfig['schedulertype'] == 'priq') echo " SELECTED"; ?>>Priority based queueing</option>
475
			    <option value="cbq"<?php if($pconfig['schedulertype'] == 'cbq') echo " SELECTED"; ?>>Class based queueing</option>
476
			    <option value="hfsc"<?php if($pconfig['schedulertype'] == 'hfsc') echo " SELECTED"; ?>>Hierarchical Fair Service Curve queueing</option>
477
		    </select>
478
		    <br> <span class="vexpl"><b>Select which type of queueing you would like to use</b>
479
		  <?php if (is_array($config['shaper']['queue']) > 0): ?>
480
			<script language="javascript">
481
			document.iform.schedulertype.disabled = 1;
482
			</script>
483
			<br>
484
			NOTE: This option is disabled since there are queues defined.
485
		  <?php endif; ?>
486
		    </span></td>
487
		</tr>
488

    
489
		<tr>
490
                  <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
491
                  <td width="78%" class="vtable">
492
			<select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization">
493
			<option value="normal"<?php if($config['system']['optimization']=="normal") echo " SELECTED"; ?>>normal</option>
494
			<option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " SELECTED"; ?>>high-latency</option>
495
			<option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " SELECTED"; ?>>aggressive</option>
496
			<option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " SELECTED"; ?>>conservative</option>
497
			</select>
498
			<textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
499
			</textarea>
500
			<script language="javascript">
501
			update_description(document.forms[0].optimization.selectedIndex);
502
			</script>
503
			<br><span class="vexpl"><b>Select which type of state table optimization your would like to use</b></td>
504
                </tr>
505

    
506
                <tr>
507
                  <td width="22%" valign="top" class="vncell">Disable Firewall</td>
508
                  <td width="78%" class="vtable">
509
                    <input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> onclick="enable_change(false)">
510
                    <strong>Disable the firewalls filter altogether.</strong><br>
511
                    <span class="vexpl">NOTE!  This basically converts pfSense into a routing only platform!</span></td>
512
                </tr>
513

    
514
                <tr>
515
                  <td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
516
                  <td width="78%" class="vtable">
517
                    <input name="maximumstates" type="input" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" onclick="enable_change(false)"><br>
518
                    <strong>Maximum number of connections to hold in the firewall state table.</strong><br>
519
                    <span class="vexpl">NOTE!  Leave this blank for the default of 10000</span></td>
520
                </tr>
521

    
522
                <tr>
523
                  <td width="22%" valign="top">&nbsp;</td>
524
                  <td width="78%">
525
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
526
                  </td>
527
                </tr>
528
                <tr>
529
                  <td colspan="2" class="list" height="12"></td>
530
                </tr>
531

    
532

    
533

    
534

    
535

    
536

    
537
              </table>
538
</form>
539
            <script language="JavaScript">
540
<!--
541
enable_change(false);
542
enable_altfirmwareurl(false);
543
enable_altpkgconfigurl(false);
544
//-->
545
</script>
546
<?php include("fend.inc"); ?>
547
</body>
548
</html>
(92-92/112)