Project

General

Profile

Download (27.1 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['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']);
41
$pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr'];
42
$pconfig['cert'] = base64_decode($config['system']['webgui']['certificate']);
43
$pconfig['key'] = base64_decode($config['system']['webgui']['private-key']);
44
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
45
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
46
$pconfig['altfirmwareurl'] = $config['system']['altfirmwareurl']['enabled'];
47
$pconfig['firmware_base_url'] = $config['system']['alt_firmware_url']['firmware_base_url'];
48
$pconfig['firmwarename'] = $config['system']['alt_firmware_url']['firmware_filename'];
49
$pconfig['altpkgconfigurl'] = $config['system']['alt_pkgconfig_url']['enabled'];
50
$pconfig['pkgconfig_base_url'] = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'];
51
$pconfig['pkgconfig_filename'] = $config['system']['alt_pkgconfig_url']['pkgconfig_filename'];
52
$pconfig['expanddiags'] = isset($config['system']['webgui']['expanddiags']);
53
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
54
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
55
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
56
$pconfig['schedulertype'] = $config['system']['schedulertype'];
57
$pconfig['maximumstates'] = $config['system']['maximumstates'];
58
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
59
$pconfig['enableserial'] = $config['system']['enableserial'];
60

    
61
if ($_POST) {
62

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

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

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

    
92
	if (!$input_errors) {
93
		if($_POST['disablefilter'] == "yes") {
94
			$config['system']['disablefilter'] = "enabled";
95
		} else {
96
			unset($config['system']['disablefilter']);
97
		}
98
		if($_POST['disableftpproxy'] == "yes") {
99
			$config['system']['disableftpproxy'] = "enabled";
100
			unset($config['system']['rfc959workaround']);
101
		} else {
102
			unset($config['system']['disableftpproxy']);
103
		}
104
		if($_POST['rfc959workaround'] == "yes")
105
			$config['system']['rfc959workaround'] = "enabled";
106
		else
107
			unset($config['system']['rfc959workaround']);
108

    
109
		if($_POST['ipv6nat_enable'] == "yes") {
110
			$config['diag']['ipv6nat']['enable'] = true;
111
			$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
112
		} else {
113
			unset($config['diag']['ipv6nat']['enable']);
114
			unset($config['diag']['ipv6nat']['ipaddr']);
115
		}
116
		$oldcert = $config['system']['webgui']['certificate'];
117
		$oldkey = $config['system']['webgui']['private-key'];
118
		$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
119
		$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
120
		if($_POST['disableconsolemenu'] == "yes")
121
			$config['system']['disableconsolemenu'] = true;
122
		else
123
			unset($config['system']['disableconsolemenu']);
124
		if($_POST['disablefirmwarecheck'] == "yes")
125
			$config['system']['disablefirmwarecheck'] = true;
126
		else
127
			unset($config['system']['disablefirmwarecheck']);
128
		if($_POST['altfirmwareurl'] == "yes")
129
			$config['system']['altfirmwareurl'] = true;
130
		else
131
			unset($config['system']['altfirmwareurl']);
132
		if ($_POST['altfirmwareurl']) {
133
			$config['system']['alt_firmware_url'] = array();
134
			$config['system']['alt_firmware_url']['enabled'] = "";
135
			$config['system']['alt_firmware_url']['firmware_base_url'] = $_POST['firmwareurl'];
136
			$config['system']['alt_firmware_url']['firmware_filename'] = $_POST['firmwarename'];
137
		} elseif (isset($config['system']['alt_firmware_url']['firmware_base_url']) || isset($config['system']['alt_firmware_url']['firmware_filename'])) {
138
			unset($config['system']['alt_firmware_url']['enabled']);
139
		} else {
140
			unset($config['system']['alt_firmware_url']);
141
		}
142

    
143
		if ($_POST['altpkgconfigurl']) {
144
			$config['system']['alt_pkgconfig_url'] = array();
145
			$config['system']['alt_pkgconfig_url']['enabled'] = "";
146
			$config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] = $_POST['pkgconfig_base_url'];
147
			$config['system']['alt_pkgconfig_url']['pkgconfig_filename'] = $_POST['pkgconfig_filename'];
148
		} elseif (isset($config['system']['alt_pkgconfig_url']['pkgconfig_base_url']) || isset($config['system']['alt_pkgconfig_url']['pkgconfig_filename'])) {
149
			unset($config['system']['alt_pkgconfig_url']['enabled']);
150
		} else {
151
			unset($config['system']['alt_pkgconfig_url']);
152
		}
153

    
154
		if ($_POST['expanddiags'] == "yes")
155
			$config['system']['webgui']['expanddiags'] = true;
156
		else
157
			unset($config['system']['webgui']['expanddiags']);
158
		$config['system']['optimization'] = $_POST['optimization'];
159
		$config['system']['disablerendevouz'] = $_POST['disablerendevouz'];
160
		
161
		if ($_POST['enableserial'] == "yes")
162
			$config['system']['enableserial'] == "enabled";
163
		else
164
			unset($config['system']['enableserial']);
165

    
166
		if($_POST['harddiskstandby'] == "yes") {
167
			$config['system']['harddiskstandby'] = "yes";
168
			system_set_harddisk_standby();
169
		} else
170
			unset($config['system']['harddiskstandby']);
171

    
172
		if ($_POST['noantilockout'] == "yes")
173
			$config['system']['webgui']['noantilockout'] = true;
174
		else
175
			unset($config['system']['webgui']['noantilockout']);
176

    
177
		/* Firewall and ALTQ options */
178
		$config['system']['schedulertype'] = $_POST['schedulertype'];
179
		$config['system']['maximumstates'] = $_POST['maximumstates'];
180

    
181
		write_config();
182

    
183
		if (($config['system']['webgui']['certificate'] != $oldcert)
184
				|| ($config['system']['webgui']['private-key'] != $oldkey)) {
185
			system_webgui_start();
186
		}
187

    
188
			
189
		$retval = 0;
190
		if (!file_exists($d_sysrebootreqd_path)) {
191
			config_lock();
192
			$retval = filter_configure();
193
			if(stristr($retval, "error") <> true)
194
			    $savemsg = get_std_save_message($retval);
195
			else
196
			    $savemsg = $retval;
197
			$retval |= interfaces_optional_configure();
198
			config_unlock();
199
		}
200
		
201
		$etc_ttys  = return_filename_as_array("/etc/ttys");
202
		$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
203
		
204
		
205
		conf_mount_rw();
206
		
207
		$fout = fopen("/etc/ttys","w");
208
		foreach($etc_ttys as $tty) {
209
			if(stristr($tty,"ttyv0") <> true) {
210
				fwrite($fout, $tty . "\n");				
211
			}
212
		}
213
		if($pconfig['enableserial'] <> "")
214
			fwrite($fout, "ttyv0\t\"/usr/libexec/getty Pc\"\tcons25\t\ton\tsecure\n");
215
		fclose($fout);		
216
		
217
		$fout = fopen("/boot/loader.rc","w");
218
		foreach($boot_loader_rc as $blrc) {
219
			if(stristr($blrc,"comconsole") <> true) {
220
				fwrite($fout, $blrc . "\n");				
221
			}
222
		}
223
		if($pconfig['enableserial'] <> "")
224
			fwrite($fout, "set console=comconsole\n");
225
		fclose($fout);
226
		
227
		conf_mount_ro();
228
	}
229
}
230
?>
231
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
232
<html>
233
<head>
234
<title><?=gentitle("System: Advanced functions");?></title>
235
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
236
<link href="gui.css" rel="stylesheet" type="text/css">
237
<script language="JavaScript">
238
<!--
239
function enable_change(enable_over) {
240
	if (document.iform.ipv6nat_enable.checked || enable_over) {
241
		document.iform.ipv6nat_ipaddr.disabled = 0;
242
		document.iform.schedulertype.disabled = 0;
243
	} else {
244
		document.iform.ipv6nat_ipaddr.disabled = 1;
245
	}
246
}
247
function enable_altfirmwareurl(enable_over) {
248
        if (document.iform.altfirmwareurl.checked || enable_over) {
249
                document.iform.firmwareurl.disabled = 0;
250
                document.iform.firmwarename.disabled = 0;
251
        } else {
252
                document.iform.firmwareurl.disabled = 1;
253
                document.iform.firmwarename.disabled = 1;
254
        }
255
}
256
function enable_altpkgconfigurl(enable_over) {
257
	if (document.iform.altpkgconfigurl.checked || enable_over) {
258
		document.iform.pkgconfig_base_url.disabled = 0;
259
		document.iform.pkgconfig_filename.disabled = 0;
260
	} else {
261
		document.iform.pkgconfig_base_url.disabled = 1;
262
		document.iform.pkgconfig_filename.disabled = 1;
263
	}
264
}
265

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

    
272
function update_description(itemnum) {
273
        document.forms[0].info.value=descs[itemnum];
274

    
275
}
276

    
277
// -->
278
</script>
279
</head>
280

    
281
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
282
<form action="system_advanced.php" method="post" name="iform" id="iform">
283
<?php include("fbegin.inc"); ?>
284
      <p class="pgtitle">System: Advanced functions</p>
285
            <?php if ($input_errors) print_input_errors($input_errors); ?>
286
            <?php if ($savemsg) print_info_box($savemsg); ?>
287
            <p><span class="vexpl"><span class="red"><strong>Note: </strong></span>
288
	    the options on this page are intended for use by advanced users only.</span></p><br>
289

    
290
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
291

    
292
                <tr>
293
                  <td colspan="2" valign="top" class="listtopic">Enable Serial Console</td>
294
                </tr>
295
                <tr>
296
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
297
                  <td width="78%" class="vtable">
298
                    <input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if ($pconfig['enableserial']) echo "checked"; ?> onclick="enable_change(false)">
299
                    <strong>This will enable the first serial port with 9600/8/N/1</strong>
300
                    </td>
301
                </tr>
302

    
303
<!--
304
                <tr>
305
                  <td colspan="2" valign="top" class="listtopic">Disable Rendezvous</td>
306
                </tr>
307
                <tr>
308
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
309
                  <td width="78%" class="vtable">
310
                    <input name="disablerendevouz" type="checkbox" id="disablerendevouz" value="yes" <?php if ($pconfig['disablerendevouz']) echo "checked"; ?> onclick="enable_change(false)">
311
                    <strong>Disable the Rendevouz automatic discovery protocol.</strong>
312
                    </td>
313
                </tr>
314
-->
315
                <tr>
316
                  <td width="22%" valign="top">&nbsp;</td>
317
                  <td width="78%">
318
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
319
                  </td>
320
                </tr>
321
                <tr>
322
                  <td colspan="2" class="list" height="12"></td>
323
                </tr>
324

    
325
                <tr>
326
                  <td colspan="2" valign="top" class="listtopic">IPv6 tunneling</td>
327
                </tr>
328
                <tr>
329
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
330
                  <td width="78%" class="vtable">
331
                    <input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)">
332
                    <strong>NAT encapsulated IPv6 packets (IP protocol 41/RFC2893)
333
                    to:</strong><br> <br> <input name="ipv6nat_ipaddr" type="text" class="formfld" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>">
334
                    &nbsp;(IP address)<span class="vexpl"><br>
335
                    Don't forget to add a firewall rule to permit IPv6 packets!</span></td>
336
                </tr>
337
                <tr>
338
                  <td width="22%" valign="top">&nbsp;</td>
339
                  <td width="78%">
340
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
341
                  </td>
342
                </tr>
343
                <tr>
344
                  <td colspan="2" class="list" height="12"></td>
345
                </tr>
346
                <tr>
347
                  <td colspan="2" valign="top" class="listtopic">webGUI SSL certificate/key</td>
348
                </tr>
349
                <tr>
350
                  <td width="22%" valign="top" class="vncell">Certificate</td>
351
                  <td width="78%" class="vtable">
352
                    <textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
353
                    <br>
354
                    Paste a signed certificate in X.509 PEM format here. <A target="_new" HREF='system_advanced_create_certs.php'>Create</a> certificates automatically.</td>
355
                </tr>
356
                <tr>
357
                  <td width="22%" valign="top" class="vncell">Key</td>
358
                  <td width="78%" class="vtable">
359
                    <textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
360
                    <br>
361
                    Paste an RSA private key in PEM format here.</td>
362
                </tr>
363
                <tr>
364
                  <td width="22%" valign="top">&nbsp;</td>
365
                  <td width="78%">
366
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
367
                  </td>
368
                </tr>
369
                <tr>
370
                  <td colspan="2" class="list" height="12"></td>
371
                </tr>
372
                <tr>
373
                  <td colspan="2" valign="top" class="listtopic">Miscellaneous</td>
374
                </tr>
375
				<tr>
376
                  <td width="22%" valign="top" class="vncell">Console menu </td>
377
                  <td width="78%" class="vtable">
378
                    <input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>>
379
                    <strong>Disable console menu</strong><span class="vexpl"><br>
380
                    Changes to this option will take effect after a reboot.</span></td>
381
                </tr>
382
		<tr>
383
                  <td valign="top" class="vncell">Firmware version check </td>
384
                  <td class="vtable">
385
                    <input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked"; ?>>
386
                    <strong>Disable firmware version check</strong><span class="vexpl"><br>
387
    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>
388
		</tr>
389
		<tr>
390
                  <td valign="top" class="vncell">Alternate firmware URL</td>
391
                  <td class="vtable">
392
                    <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>
393
		    <table>
394
                    <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>
395
                    <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>
396
		    </table>
397
                    <span class="vexpl">
398
    This is where pfSense will check for newer firmware versions when <a href="system_firmware.php">System: Firmware</a> page is viewed.</span></td>
399
		</tr>
400
                <tr>
401
                  <td valign="top" class="vncell">Alternate pkg_config.xml URL</td>
402
                  <td class="vtable">
403
                    <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>
404
                    <table>
405
                    <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>
406
                    <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>
407
                    </table>
408
                    <span class="vexpl">
409
    This is where pfSense will fetch its package list from.</span></td>
410
                </tr>
411
		<tr>
412
                  <td width="22%" valign="top" class="vncell">Hard disk standby time </td>
413
                  <td width="78%" class="vtable">
414
                    <select name="harddiskstandby" class="formfld">
415
					<?php
416
                        /* Values from ATA-2
417
                           http://www.t13.org/project/d0948r3-ATA-2.pdf
418
                           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
                      <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
422
					<?php
423
					foreach ($sbvals as $sbval):
424
						list($min,$val) = explode(",", $sbval); ?>
425
                      <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
426
					<?php endforeach; ?>
427
                    </select>
428
                    <br>
429
                    Puts the hard disk into standby mode when the selected amount of time after the last
430
                    access has elapsed. <em>Do not set this for CF cards.</em></td>
431
				</tr>
432
				<tr>
433
                  <td width="22%" valign="top" class="vncell">Navigation</td>
434
                  <td width="78%" class="vtable">
435
                    <input name="expanddiags" type="checkbox" id="expanddiags" value="yes" <?php if ($pconfig['expanddiags']) echo "checked"; ?>>
436
                    <strong>Keep diagnostics in navigation expanded </strong></td>
437
                </tr>
438
		<tr>
439
                  <td width="22%" valign="top" class="vncell">webGUI anti-lockout</td>
440
                  <td width="78%" class="vtable">
441
                    <input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?>>
442
                    <strong>Disable webGUI anti-lockout rule</strong><br>
443
					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>
444
					Hint:
445
					the &quot;set LAN IP address&quot; option in the console menu  resets this setting as well.</td>
446
                </tr>
447
                <tr>
448
                  <td width="22%" valign="top">&nbsp;</td>
449
                  <td width="78%">
450
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
451
                  </td>
452
                </tr>
453
                <tr>
454
                  <td colspan="2" class="list" height="12"></td>
455
                </tr>
456
                <tr>
457
                  <td colspan="2" valign="top" class="listtopic">Traffic Shaper and Firewall Advanced</td>
458
                </tr>
459
                <tr>
460
                  <td width="22%" valign="top" class="vncell">FTP Helper</td>
461
                  <td width="78%" class="vtable">
462
                    <input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if (isset($config['system']['disableftpproxy'])) echo "checked"; ?> onclick="enable_change(false)">
463
                    <strong class="vexpl">Disable the userland FTP-Proxy application</strong><br>
464
                </tr>
465
                <tr>
466
                  <td width="22%" valign="top" class="vncell">FTP RFC 959 data port violation workaround</td>
467
                  <td width="78%" class="vtable">
468
                    <input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> onclick="enable_change(false)">
469
                    <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>
470
                </tr>
471

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

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

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

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

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

    
534

    
535

    
536

    
537

    
538

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