Project

General

Profile

Download (24 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['expanddiags'] = isset($config['system']['webgui']['expanddiags']);
46
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
47
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
48
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
49
$pconfig['schedulertype'] = $config['system']['schedulertype'];
50
$pconfig['maximumstates'] = $config['system']['maximumstates'];
51
$pconfig['theme'] = $config['system']['theme'];
52
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
53
$pconfig['enableserial'] = $config['system']['enableserial'];
54
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
55
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
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['disableftpproxy'] == "yes") {
95
			$config['system']['disableftpproxy'] = "enabled";
96
			unset($config['system']['rfc959workaround']);
97
			system_start_ftp_helpers();
98
		} else {
99
			unset($config['system']['disableftpproxy']);
100
			system_start_ftp_helpers();
101
		}
102
		if($_POST['rfc959workaround'] == "yes")
103
			$config['system']['rfc959workaround'] = "enabled";
104
		else
105
			unset($config['system']['rfc959workaround']);
106

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

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

    
138
		if($_POST['harddiskstandby'] == "yes") {
139
			$config['system']['harddiskstandby'] = "yes";
140
			system_set_harddisk_standby();
141
		} else
142
			unset($config['system']['harddiskstandby']);
143

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

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

    
153
                $config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
154
	
155
		/* pfSense themes */
156
		$config['theme'] = $_POST['theme'];
157

    
158
		write_config();
159

    
160
		if (($config['system']['webgui']['certificate'] != $oldcert)
161
				|| ($config['system']['webgui']['private-key'] != $oldkey)) {
162
			system_webgui_start();
163
		}
164

    
165
			
166
		$retval = 0;
167
		if (!file_exists($d_sysrebootreqd_path)) {
168
			config_lock();
169
			$retval = filter_configure();
170
			if(stristr($retval, "error") <> true)
171
			    $savemsg = get_std_save_message($retval);
172
			else
173
			    $savemsg = $retval;
174
			$retval |= interfaces_optional_configure();
175
			config_unlock();
176
		}
177
		
178
		$etc_ttys  = return_filename_as_array("/etc/ttys");
179
		$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
180
		
181
		conf_mount_rw();
182
		
183
		$fout = fopen("/etc/ttys","w");
184
		foreach($etc_ttys as $tty) {
185
			if(stristr($tty,"ttyv0") <> true) {
186
				fwrite($fout, $tty . "\n");				
187
			}
188
		}
189
		if(isset($pconfig['enableserial']))
190
			fwrite($fout, "ttyv0\t\"/usr/libexec/getty Pc\"\tcons25\t\ton\tsecure\n");
191
		fclose($fout);		
192
		
193
		$fout = fopen("/boot/loader.rc","w");
194
		if(!is_array($boot_loader_rc))
195
			$boot_loader_rc = array();
196
		foreach($boot_loader_rc as $blrc) {
197
			if(stristr($blrc,"comconsole") <> true) {
198
				fwrite($fout, $blrc . "\n");				
199
			}
200
		}
201
		if(isset($pconfig['enableserial']))
202
			fwrite($fout, "set console=comconsole\n");
203
		fclose($fout);
204
		
205
		conf_mount_ro();
206
	}
207
}
208

    
209
$pgtitle = "System: Advanced functions";
210
include("head.inc");
211

    
212
?>
213

    
214
<script language="JavaScript">
215
<!--
216
function enable_change(enable_over) {
217
	if (document.iform.ipv6nat_enable.checked || enable_over) {
218
		document.iform.ipv6nat_ipaddr.disabled = 0;
219
		document.iform.schedulertype.disabled = 0;
220
	} else {
221
		document.iform.ipv6nat_ipaddr.disabled = 1;
222
	}
223
}
224

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

    
231
function update_description(itemnum) {
232
        document.forms[0].info.value=descs[itemnum];
233

    
234
}
235

    
236
function openwindow(url) {
237
        var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
238
        if (oWin==null || typeof(oWin)=="undefined") {
239
                return false;
240
        } else {
241
                return true;
242
        }
243
}
244

    
245
// -->
246
</script>
247
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
248
<?php include("fbegin.inc"); ?>
249
<p class="pgtitle"><?=$pgtitle?></p>
250
<form action="system_advanced.php" method="post" name="iform" id="iform">
251
            <?php if ($input_errors) print_input_errors($input_errors); ?>
252
            <?php if ($savemsg) print_info_box($savemsg); ?>
253
            <p><span class="vexpl"><span class="red"><strong>Note: </strong></span>
254
	    the options on this page are intended for use by advanced users only.</span></p><br>
255

    
256
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
257

    
258
		<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
259
                <tr>
260
                  <td colspan="2" valign="top" class="listtopic">Enable Serial Console</td>
261
                </tr>
262
                <tr>
263
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
264
                  <td width="78%" class="vtable">
265
                    <input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> onclick="enable_change(false)">
266
                    <strong>This will enable the first serial port with 9600/8/N/1</strong>
267
                    </td>
268
                </tr>
269
                <tr>
270
                  <td width="22%" valign="top">&nbsp;</td>
271
                  <td width="78%">
272
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
273
                  </td>
274
                </tr>
275
                </tr>
276
                <tr>
277
                  <td colspan="2" class="list" height="12"></td>
278
                </tr>		
279
		<?php endif ?>
280

    
281

    
282

    
283
                <tr>
284
                  <td colspan="2" valign="top" class="listtopic">Theme</td>
285
                </tr>
286
                <tr>
287
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
288
                  <td width="78%" class="vtable">
289
		    <select name="theme">
290
<?php
291
			$files = return_dir_as_array("/usr/local/www/themes/");
292
			foreach($files as $f) {
293
				if($f == "CVS") continue;
294
				$selected = "";
295
				if($f == $config['theme'])
296
					$selected = " SELECTED";
297
				if($config['theme'] == "" and $f == "pfsense")
298
					$selceted = " SELECTED";
299
				echo "<option{$selected}>{$f}</option>\n";
300
			}
301
?>
302
		    </select>
303
                    <strong>This will change the look and feel of pfSense</strong>
304
                    </td>
305
                </tr>
306

    
307

    
308

    
309
                <tr>
310
                  <td width="22%" valign="top">&nbsp;</td>
311
                  <td width="78%">
312
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
313
                  </td>
314
                </tr>
315
                <tr>
316
                  <td colspan="2" class="list" height="12"></td>
317
                </tr>
318

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

    
450
		<tr>
451
		  <td width="22%" valign="top" class="vncell">Traffic Shaper Scheduler</td>
452
		  <td width="78%" class="vtable">
453
		    <select id="schedulertype" name="schedulertype" <?= $style ?>>
454
			    <option value="priq"<?php if($pconfig['schedulertype'] == 'priq') echo " SELECTED"; ?>>Priority based queueing</option>
455
			    <option value="cbq"<?php if($pconfig['schedulertype'] == 'cbq') echo " SELECTED"; ?>>Class based queueing</option>
456
			    <option value="hfsc"<?php if($pconfig['schedulertype'] == 'hfsc') echo " SELECTED"; ?>>Hierarchical Fair Service Curve queueing</option>
457
		    </select>
458
		    <br> <span class="vexpl"><b>Select which type of queueing you would like to use</b>
459
		  <?php if (is_array($config['shaper']['queue']) > 0): ?>
460
			<script language="javascript">
461
			document.iform.schedulertype.disabled = 1;
462
			</script>
463
			<br>
464
			NOTE: This option is disabled since there are queues defined.
465
		  <?php endif; ?>
466
		    </span></td>
467
		</tr>
468

    
469
		<tr>
470
                  <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
471
                  <td width="78%" class="vtable">
472
			<select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization">
473
			<option value="normal"<?php if($config['system']['optimization']=="normal") echo " SELECTED"; ?>>normal</option>
474
			<option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " SELECTED"; ?>>high-latency</option>
475
			<option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " SELECTED"; ?>>aggressive</option>
476
			<option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " SELECTED"; ?>>conservative</option>
477
			</select>
478
			<textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
479
			</textarea>
480
			<script language="javascript">
481
			update_description(document.forms[0].optimization.selectedIndex);
482
			</script>
483
			<br><span class="vexpl"><b>Select which type of state table optimization your would like to use</b></td>
484
                </tr>
485

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

    
494
                <tr>
495
                  <td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
496
                  <td width="78%" class="vtable">
497
                    <input name="maximumstates" type="input" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" onclick="enable_change(false)"><br>
498
                    <strong>Maximum number of connections to hold in the firewall state table.</strong><br>
499
                    <span class="vexpl">Note:  Leave this blank for the default of 10000</span></td>
500
                </tr>
501

    
502
                <tr>
503
                  <td width="22%" valign="top">&nbsp;</td>
504
                  <td width="78%">
505
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
506
                  </td>
507
                </tr>
508
                <tr>
509
                  <td colspan="2" class="list" height="12"></td>
510
                </tr>
511

    
512

    
513

    
514

    
515

    
516

    
517
              </table>
518
</form>
519
            <script language="JavaScript">
520
<!--
521
enable_change(false);
522
//enable_altfirmwareurl(false);
523
//enable_altpkgconfigurl(false);
524
//-->
525
</script>
526
<?php include("fend.inc"); ?>
527
</body>
528
</html>
(108-108/133)