Project

General

Profile

Download (24.9 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['harddiskstandby'] = $config['system']['harddiskstandby'];
46
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
47
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
48
$pconfig['schedulertype'] = $config['system']['schedulertype'];
49
$pconfig['maximumstates'] = $config['system']['maximumstates'];
50
$pconfig['theme'] = $config['system']['theme'];
51
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
52
$pconfig['enableserial'] = $config['system']['enableserial'];
53
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
54
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
55
$pconfig['enablesshd'] = $config['system']['enablesshd'];
56

    
57
if ($_POST) {
58

    
59
	unset($input_errors);
60
	$pconfig = $_POST;
61

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

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

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

    
112
		if($_POST['ipv6nat_enable'] == "yes") {
113
			$config['diag']['ipv6nat']['enable'] = true;
114
			$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
115
		} else {
116
			unset($config['diag']['ipv6nat']['enable']);
117
			unset($config['diag']['ipv6nat']['ipaddr']);
118
		}
119
		$oldcert = $config['system']['webgui']['certificate'];
120
		$oldkey = $config['system']['webgui']['private-key'];
121
		$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
122
		$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
123
		if($_POST['disableconsolemenu'] == "yes")
124
			$config['system']['disableconsolemenu'] = true;
125
		else
126
			unset($config['system']['disableconsolemenu']);
127
		unset($config['system']['webgui']['expanddiags']);
128
		$config['system']['optimization'] = $_POST['optimization'];
129
		
130
		if($_POST['disablefirmwarecheck'] == "yes")
131
			$config['system']['disablefirmwarecheck'] = true;
132
		else
133
			unset($config['system']['disablefirmwarecheck']);
134

    
135
		if ($_POST['enableserial'] == "yes")
136
			$config['system']['enableserial'] = true;
137
		else
138
			unset($config['system']['enableserial']);
139

    
140
		if($_POST['harddiskstandby'] <> "") {
141
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
142
			system_set_harddisk_standby();
143
		} else
144
			unset($config['system']['harddiskstandby']);
145

    
146
		if ($_POST['noantilockout'] == "yes")
147
			$config['system']['webgui']['noantilockout'] = true;
148
		else
149
			unset($config['system']['webgui']['noantilockout']);
150

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

    
155
		if($_POST['enablesshd'] == "yes") {
156
			$config['system']['enablesshd'] = $_POST['enablesshd'];
157
		} else {
158
			unset($config['system']['enablesshd']);
159
		}
160

    
161
                $config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
162
	
163
		/* pfSense themes */
164
		$config['theme'] = $_POST['theme'];
165

    
166
		write_config();
167

    
168
		if (($config['system']['webgui']['certificate'] != $oldcert)
169
				|| ($config['system']['webgui']['private-key'] != $oldkey)) {
170
			system_webgui_start();
171
		}
172

    
173
			
174
		$retval = 0;
175
		config_lock();
176
		$retval = filter_configure();
177
		if(stristr($retval, "error") <> true)
178
		    $savemsg = get_std_save_message($retval);
179
		else
180
		    $savemsg = $retval;
181
		$retval |= interfaces_optional_configure();
182
		config_unlock();
183
		
184
		$etc_ttys  = return_filename_as_array("/etc/ttys");
185
		$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
186
		
187
		conf_mount_rw();
188
		
189
		$fout = fopen("/etc/ttys","w");
190
		if(!$fout) {
191
			echo "Cannot open /etc/ttys for writing.  Floppy inserted?\n";	
192
		} else {		
193
			foreach($etc_ttys as $tty) {
194
				if(stristr($tty,"ttyv0") <> true) {
195
					fwrite($fout, $tty . "\n");				
196
				}
197
			}
198
			if(isset($pconfig['enableserial']))
199
				fwrite($fout, "ttyv0\t\"/usr/libexec/getty Pc\"\tcons25\t\ton\tsecure\n");
200
			fclose($fout);		
201
		}
202
		
203
		$fout = fopen("/boot/loader.rc","w");
204
		if(!is_array($boot_loader_rc))
205
			$boot_loader_rc = array();
206
		foreach($boot_loader_rc as $blrc) {
207
			if(stristr($blrc,"comconsole") <> true) {
208
				fwrite($fout, $blrc . "\n");				
209
			}
210
		}
211
		if(isset($pconfig['enableserial']))
212
			fwrite($fout, "set console=comconsole\n");
213
		fclose($fout);
214
		
215
		mwexec("/etc/sshd");
216
		
217
		conf_mount_ro();
218
	}
219
}
220

    
221
$pgtitle = "System: Advanced functions";
222
include("head.inc");
223

    
224
?>
225

    
226
<script language="JavaScript">
227
<!--
228
function enable_change(enable_over) {
229
	if (document.iform.ipv6nat_enable.checked || enable_over) {
230
		document.iform.ipv6nat_ipaddr.disabled = 0;
231
		document.iform.schedulertype.disabled = 0;
232
	} else {
233
		document.iform.ipv6nat_ipaddr.disabled = 1;
234
	}
235
}
236

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

    
243
function update_description(itemnum) {
244
        document.forms[0].info.value=descs[itemnum];
245

    
246
}
247

    
248
function openwindow(url) {
249
        var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
250
        if (oWin==null || typeof(oWin)=="undefined") {
251
                return false;
252
        } else {
253
                return true;
254
        }
255
}
256

    
257
// -->
258
</script>
259
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
260
<?php include("fbegin.inc"); ?>
261
<p class="pgtitle"><?=$pgtitle?></p>
262
<form action="system_advanced.php" method="post" name="iform" id="iform">
263
            <?php if ($input_errors) print_input_errors($input_errors); ?>
264
            <?php if ($savemsg) print_info_box($savemsg); ?>
265
            <p><span class="vexpl"><span class="red"><strong>Note: </strong></span>
266
	    the options on this page are intended for use by advanced users only.</span></p><br>
267

    
268
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
269

    
270
		<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
271
                <tr>
272
                  <td colspan="2" valign="top" class="listtopic">Enable Serial Console</td>
273
                </tr>
274
                <tr>
275
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
276
                  <td width="78%" class="vtable">
277
                    <input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> onclick="enable_change(false)">
278
                    <strong>This will enable the first serial port with 9600/8/N/1</strong>
279
                    </td>
280
                </tr>
281
                <tr>
282
                  <td width="22%" valign="top">&nbsp;</td>
283
                  <td width="78%">
284
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
285
                  </td>
286
                </tr>
287
                </tr>
288
                <tr>
289
                  <td colspan="2" class="list" height="12"></td>
290
                </tr>		
291
		<?php endif ?>
292

    
293
                <tr>
294
                  <td colspan="2" valign="top" class="listtopic">Secure Shell</td>
295
                </tr>
296
                <tr>
297
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
298
                  <td width="78%" class="vtable">
299
                    <input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> onclick="enable_change(false)">
300
                    <strong>Enable Secure Shell</strong>
301
                    </td>
302
                </tr>
303
                <tr>
304
                  <td width="22%" valign="top">&nbsp;</td>
305
                  <td width="78%">
306
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
307
                  </td>
308
                </tr>
309
                </tr>
310
                <tr>
311
                  <td colspan="2" class="list" height="12"></td>
312
                </tr>	
313

    
314
                <tr>
315
                  <td colspan="2" valign="top" class="listtopic">Theme</td>
316
                </tr>
317
                <tr>
318
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
319
                  <td width="78%" class="vtable">
320
		    <select name="theme">
321
<?php
322
			$files = return_dir_as_array("/usr/local/www/themes/");
323
			foreach($files as $f) {
324
				if($f == "CVS") continue;
325
				$selected = "";
326
				if($f == $config['theme'])
327
					$selected = " SELECTED";
328
				if($config['theme'] == "" and $f == "pfsense")
329
					$selceted = " SELECTED";
330
				echo "<option{$selected}>{$f}</option>\n";
331
			}
332
?>
333
		    </select>
334
                    <strong>This will change the look and feel of pfSense</strong>
335
                    </td>
336
                </tr>
337

    
338

    
339

    
340
                <tr>
341
                  <td width="22%" valign="top">&nbsp;</td>
342
                  <td width="78%">
343
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
344
                  </td>
345
                </tr>
346
                <tr>
347
                  <td colspan="2" class="list" height="12"></td>
348
                </tr>
349

    
350
                <tr>
351
                  <td colspan="2" valign="top" class="listtopic">IPv6 tunneling</td>
352
                </tr>
353
                <tr>
354
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
355
                  <td width="78%" class="vtable">
356
                    <input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)">
357
                    <strong>NAT encapsulated IPv6 packets (IP protocol 41/RFC2893)
358
                    to:</strong><br> <br> <input name="ipv6nat_ipaddr" type="text" class="formfld" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>">
359
                    &nbsp;(IP address)<span class="vexpl"><br>
360
                    Don't forget to add a firewall rule to permit IPv6 packets!</span></td>
361
                </tr>
362
                <tr>
363
                  <td width="22%" valign="top">&nbsp;</td>
364
                  <td width="78%">
365
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
366
                  </td>
367
                </tr>
368
                <tr>
369
                  <td colspan="2" class="list" height="12"></td>
370
                </tr>
371
                <tr>
372
                  <td colspan="2" valign="top" class="listtopic">webGUI SSL certificate/key</td>
373
                </tr>
374
                <tr>
375
                  <td width="22%" valign="top" class="vncell">Certificate</td>
376
                  <td width="78%" class="vtable">
377
                    <textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
378
                    <br>
379
                    Paste a signed certificate in X.509 PEM format here. <a href="javascript:if(openwindow('system_advanced_create_certs.php') == false) alert('Popup blocker detected.  Action aborted.');" >Create</a> certificates automatically.</td>
380
                </tr>
381
                <tr>
382
                  <td width="22%" valign="top" class="vncell">Key</td>
383
                  <td width="78%" class="vtable">
384
                    <textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
385
                    <br>
386
                    Paste an RSA private key in PEM format here.</td>
387
                </tr>
388
                <tr>
389
                  <td width="22%" valign="top">&nbsp;</td>
390
                  <td width="78%">
391
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
392
                  </td>
393
                </tr>
394
                <tr>
395
                  <td colspan="2" class="list" height="12"></td>
396
                </tr>
397
                <tr>
398
                  <td colspan="2" valign="top" class="listtopic">Miscellaneous</td>
399
                </tr>
400
				<tr>
401
                  <td width="22%" valign="top" class="vncell">Console menu </td>
402
                  <td width="78%" class="vtable">
403
                    <input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>>
404
                    <strong>Disable console menu</strong><span class="vexpl"><br>
405
                    Changes to this option will take effect after a reboot.</span></td>
406
                </tr>
407
		<tr>
408
                  <td valign="top" class="vncell">Firmware version check </td>
409
                  <td class="vtable">
410
                    <input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked"; ?>>
411
                    <strong>Disable firmware version check</strong><span class="vexpl"><br>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>
412
		</tr>		
413
		<tr>
414
                  <td width="22%" valign="top" class="vncell">Hard disk standby time </td>
415
                  <td width="78%" class="vtable">
416
                    <select name="harddiskstandby" class="formfld">
417
					<?php
418
                        /* Values from ATA-2
419
                           http://www.t13.org/project/d0948r3-ATA-2.pdf
420
                           Page 66 */
421
						$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");
422
					?>
423
                      <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
424
					<?php
425
					foreach ($sbvals as $sbval):
426
						list($min,$val) = explode(",", $sbval); ?>
427
                      <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
428
					<?php endforeach; ?>
429
                    </select>
430
                    <br>
431
                    Puts the hard disk into standby mode when the selected amount of time after the last
432
                    access has elapsed. <em>Do not set this for CF cards.</em></td>
433
				</tr>
434
		<tr>
435
                  <td width="22%" valign="top" class="vncell">webGUI anti-lockout</td>
436
                  <td width="78%" class="vtable">
437
                    <input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?>>
438
                    <strong>Disable webGUI anti-lockout rule</strong><br>
439
					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>
440
					Hint:
441
					the &quot;set LAN IP address&quot; option in the console menu  resets this setting as well.</td>
442
                </tr>
443
		<tr>
444
                  <td width="22%" valign="top" class="vncell">IPsec SA preferral</td>
445
                  <td width="78%" class="vtable">
446
                    <input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?>>
447
                    <strong>Prefer old IPsec SAs</strong><br>By default, if several SAs match, the newest one is preferred if it's at least 30 seconds old.Select this option to always prefer old SAs over new ones.
448
                  </td>
449
                </tr>		
450
                <tr>
451
                  <td width="22%" valign="top">&nbsp;</td>
452
                  <td width="78%">
453
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
454
                  </td>
455
                </tr>
456
                <tr>
457
                  <td colspan="2" class="list" height="12"></td>
458
                </tr>
459
                <tr>
460
                  <td colspan="2" valign="top" class="listtopic">Traffic Shaper and Firewall Advanced</td>
461
                </tr>
462
                <tr>
463
                  <td width="22%" valign="top" class="vncell">FTP Helper</td>
464
                  <td width="78%" class="vtable">
465
                    <input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if (isset($config['system']['disableftpproxy'])) echo "checked"; ?> onclick="enable_change(false)">
466
                    <strong class="vexpl">Disable the userland FTP-Proxy application</strong><br>
467
                </tr>
468
                <tr>
469
                  <td width="22%" valign="top" class="vncell">FTP RFC 959 data port violation workaround</td>
470
                  <td width="78%" class="vtable">
471
                    <input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> onclick="enable_change(false)">
472
                    <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>
473
                </tr>
474

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

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

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

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

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

    
538

    
539

    
540

    
541

    
542

    
543
              </table>
544
</form>
545
            <script language="JavaScript">
546
<!--
547
enable_change(false);
548
//enable_altfirmwareurl(false);
549
//enable_altpkgconfigurl(false);
550
//-->
551
</script>
552
<?php include("fend.inc"); ?>
553
</body>
554
</html>
(114-114/143)