Project

General

Profile

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

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

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

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

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

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

    
34
require("guiconfig.inc");
35

    
36
$pconfig['disablefilter'] = $config['system']['disablefilter'];
37
$pconfig['disableftpproxy'] = $config['system']['disableftpproxy'];
38
$pconfig['rfc959workaround'] = $config['system']['rfc959workaround'];
39
$pconfig['filteringbridge_enable'] = isset($config['bridge']['filteringbridge']);
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
if ($g['platform'] == "generic-pc")
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

    
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
		}
107
		$config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false;
108
		$config['diag']['ipv6nat']['enable'] = $_POST['ipv6nat_enable'] ? true : false;
109
		$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
110
		$oldcert = $config['system']['webgui']['certificate'];
111
		$oldkey = $config['system']['webgui']['private-key'];
112
		$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
113
		$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
114
		$config['system']['disableconsolemenu'] = $_POST['disableconsolemenu'] ? true : false;
115
		$config['system']['disablefirmwarecheck'] = $_POST['disablefirmwarecheck'] ? true : false;
116
		$config['system']['altfirmwareurl'] = $_POST['altfirmwareurl'] ? true : false;
117
		if ($_POST['altfirmwareurl']) {
118
			$config['system']['alt_firmware_url'] = array();
119
			$config['system']['alt_firmware_url']['enabled'] = "";
120
			$config['system']['alt_firmware_url']['firmware_base_url'] = $_POST['firmwareurl'];
121
			$config['system']['alt_firmware_url']['firmware_filename'] = $_POST['firmwarename'];
122
		} elseif (isset($config['system']['alt_firmware_url']['firmware_base_url']) || isset($config['system']['alt_firmware_url']['firmware_filename'])) {
123
			unset($config['system']['alt_firmware_url']['enabled']);
124
		} else {
125
			unset($config['system']['alt_firmware_url']);
126
		}
127

    
128
		if ($_POST['altpkgconfigurl']) {
129
			$config['system']['alt_pkgconfig_url'] = array();
130
			$config['system']['alt_pkgconfig_url']['enabled'] = "";
131
			$config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] = $_POST['pkgconfig_base_url'];
132
			$config['system']['alt_pkgconfig_url']['pkgconfig_filename'] = $_POST['pkgconfig_filename'];
133
		} elseif (isset($config['system']['alt_pkgconfig_url']['pkgconfig_base_url']) || isset($config['system']['alt_pkgconfig_url']['pkgconfig_filename'])) {
134
			unset($config['system']['alt_pkgconfig_url']['enabled']);
135
		} else {
136
			unset($config['system']['alt_pkgconfig_url']);
137
		}
138
	
139
		$config['system']['webgui']['expanddiags'] = $_POST['expanddiags'] ? true : false;
140
		$config['system']['optimization'] = $_POST['optimization'];
141
		$config['system']['disablerendevouz'] = $_POST['disablerendevouz'];
142

    
143
		if ($g['platform'] == "generic-pc") {
144
			$oldharddiskstandby = $config['system']['harddiskstandby'];
145
			$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
146
		}
147
		$config['system']['webgui']['noantilockout'] = $_POST['noantilockout'] ? true : false;
148

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

    
153
		write_config();
154

    
155
		if (($config['system']['webgui']['certificate'] != $oldcert)
156
				|| ($config['system']['webgui']['private-key'] != $oldkey)) {
157
			touch($d_sysrebootreqd_path);
158
		} else if (($g['platform'] == "generic-pc") && ($config['system']['harddiskstandby'] != $oldharddiskstandby)) {
159
			if (!$config['system']['harddiskstandby']) {
160
				// Reboot needed to deactivate standby due to a stupid ATA-protocol
161
				Touch($d_sysrebootreqd_path);
162
				unset($config['system']['harddiskstandby']);
163
			} else {
164
				// No need to set the standby-time if a reboot is needed anyway
165
				system_set_harddisk_standby();
166
			}
167
		}
168

    
169
		$retval = 0;
170
		if (!file_exists($d_sysrebootreqd_path)) {
171
			config_lock();
172
			$retval = filter_configure();
173
			if(stristr($retval, "error") <> true)
174
			    $savemsg = get_std_save_message($retval);
175
			else
176
			    $savemsg = $retval;
177
			$retval |= interfaces_optional_configure();
178
			config_unlock();
179
		}
180
	}
181
}
182
?>
183
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
184
<html>
185
<head>
186
<title><?=gentitle("System: Advanced functions");?></title>
187
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
188
<link href="gui.css" rel="stylesheet" type="text/css">
189
<script language="JavaScript">
190
<!--
191
function enable_change(enable_over) {
192
	if (document.iform.ipv6nat_enable.checked || enable_over) {
193
		document.iform.ipv6nat_ipaddr.disabled = 0;
194
		document.iform.schedulertype.disabled = 0;
195
	} else {
196
		document.iform.ipv6nat_ipaddr.disabled = 1;
197
	}
198
}
199
function enable_altfirmwareurl(enable_over) {
200
        if (document.iform.altfirmwareurl.checked || enable_over) {
201
                document.iform.firmwareurl.disabled = 0;
202
                document.iform.firmwarename.disabled = 0;
203
        } else {
204
                document.iform.firmwareurl.disabled = 1;
205
                document.iform.firmwarename.disabled = 1;
206
        }
207
}
208
function enable_altpkgconfigurl(enable_over) {
209
	if (document.iform.altpkgconfigurl.checked || enable_over) {
210
		document.iform.pkgconfig_base_url.disabled = 0;
211
		document.iform.pkgconfig_filename.disabled = 0;
212
	} else {
213
		document.iform.pkgconfig_base_url.disabled = 1;
214
		document.iform.pkgconfig_filename.disabled = 1;
215
	}
216
}
217

    
218
// -->
219
</script>
220
</head>
221

    
222
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
223
<form action="system_advanced.php" method="post" name="iform" id="iform">
224
<?php include("fbegin.inc"); ?>
225
      <p class="pgtitle">System: Advanced functions</p>
226
            <?php if ($input_errors) print_input_errors($input_errors); ?>
227
            <?php if ($savemsg) print_info_box($savemsg); ?>
228
            <p><span class="vexpl"><span class="red"><strong>Note: </strong></span>the
229
              options on this page are intended for use by advanced users only,
230
              and there's <strong>NO</strong> support for them.</span></p><br>
231

    
232
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
233

    
234
                <tr>
235
                  <td colspan="2" valign="top" class="listtopic">Disable Rendezvous</td>
236
                </tr>
237
                <tr>
238
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
239
                  <td width="78%" class="vtable">
240
                    <input name="disablerendevouz" type="checkbox" id="disablerendevouz" value="yes" <?php if ($pconfig['disablerendevouz']) echo "checked"; ?> onclick="enable_change(false)">
241
                    <strong>Disable the Rendevouz automatic discovery protocol.</strong>
242
                    </td>
243
                </tr>
244
                <tr>
245
                  <td width="22%" valign="top">&nbsp;</td>
246
                  <td width="78%">
247
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
248
                  </td>
249
                </tr>
250
                <tr>
251
                  <td colspan="2" class="list" height="12"></td>
252
                </tr>
253

    
254
                <tr>
255
                  <td colspan="2" valign="top" class="listtopic">IPv6 tunneling</td>
256
                </tr>
257
                <tr>
258
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
259
                  <td width="78%" class="vtable">
260
                    <input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)">
261
                    <strong>NAT encapsulated IPv6 packets (IP protocol 41/RFC2893)
262
                    to:</strong><br> <br> <input name="ipv6nat_ipaddr" type="text" class="formfld" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>">
263
                    &nbsp;(IP address)<span class="vexpl"><br>
264
                    Don't forget to add a firewall rule to permit IPv6 packets!</span></td>
265
                </tr>
266
                <tr>
267
                  <td width="22%" valign="top">&nbsp;</td>
268
                  <td width="78%">
269
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
270
                  </td>
271
                </tr>
272
                <tr>
273
                  <td colspan="2" class="list" height="12"></td>
274
                </tr>
275
		<tr>
276
                  <td colspan="2" valign="top" class="listtopic">Filtering bridge</td>
277
                </tr>
278
                <tr>
279
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
280
                  <td width="78%" class="vtable">
281
                    <input name="filteringbridge_enable" type="checkbox" id="filteringbridge_enable" value="yes" <?php if ($pconfig['filteringbridge_enable']) echo "checked"; ?>>
282
                    <strong>Enable filtering bridge</strong><span class="vexpl"><br>
283
                    This will cause bridged packets to pass through the packet
284
                    filter in the same way as routed packets do (by default bridged
285
                    packets are always passed). If you enable this option, you'll
286
                    have to add filter rules to selectively permit traffic from
287
                    bridged interfaces.</span></td>
288
                </tr>
289
                <tr>
290
                  <td width="22%" valign="top">&nbsp;</td>
291
                  <td width="78%">
292
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
293
                  </td>
294
                </tr>
295
                <tr>
296
                  <td colspan="2" class="list" height="12"></td>
297
                </tr>
298
                <tr>
299
                  <td colspan="2" valign="top" class="listtopic">webGUI SSL certificate/key</td>
300
                </tr>
301
                <tr>
302
                  <td width="22%" valign="top" class="vncell">Certificate</td>
303
                  <td width="78%" class="vtable">
304
                    <textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
305
                    <br>
306
                    Paste a signed certificate in X.509 PEM format here. <A target="_new" HREF='system_advanced_create_certs.php'>Create</a> certificates automatically.</td>
307
                </tr>
308
                <tr>
309
                  <td width="22%" valign="top" class="vncell">Key</td>
310
                  <td width="78%" class="vtable">
311
                    <textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
312
                    <br>
313
                    Paste an RSA private key in PEM format here.</td>
314
                </tr>
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
                <tr>
325
                  <td colspan="2" valign="top" class="listtopic">Miscellaneous</td>
326
                </tr>
327
				<tr>
328
                  <td width="22%" valign="top" class="vncell">Console menu </td>
329
                  <td width="78%" class="vtable">
330
                    <input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>>
331
                    <strong>Disable console menu</strong><span class="vexpl"><br>
332
                    Changes to this option will take effect after a reboot.</span></td>
333
                </tr>
334
		<tr>
335
                  <td valign="top" class="vncell">Firmware version check </td>
336
                  <td class="vtable">
337
                    <input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked"; ?>>
338
                    <strong>Disable firmware version check</strong><span class="vexpl"><br>
339
    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>
340
		</tr>
341
		<tr>
342
                  <td valign="top" class="vncell">Alternate firmware URL</td>
343
                  <td class="vtable">
344
                    <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>
345
		    <table>
346
                    <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>
347
                    <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>
348
		    </table>
349
                    <span class="vexpl">
350
    This is where pfSense will check for newer firmware versions when <a href="system_firmware.php">System: Firmware</a> page is viewed.</span></td>
351
		</tr>
352
                <tr>
353
                  <td valign="top" class="vncell">Alternate pkg_config.xml URL</td>
354
                  <td class="vtable">
355
                    <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>
356
                    <table>
357
                    <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>
358
                    <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>
359
                    </table>
360
                    <span class="vexpl">
361
    This is where pfSense will fetch its package list from.</span></td>
362
                </tr>
363
		<tr>
364
                  <td width="22%" valign="top" class="vncell">Hard disk standby time </td>
365
                  <td width="78%" class="vtable">
366
                    <select name="harddiskstandby" class="formfld">
367
					<?php
368
                        /* Values from ATA-2
369
                           http://www.t13.org/project/d0948r3-ATA-2.pdf
370
                           Page 66 */
371
						$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");
372
					?>
373
                      <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
374
					<?php
375
					foreach ($sbvals as $sbval):
376
						list($min,$val) = explode(",", $sbval); ?>
377
                      <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
378
					<?php endforeach; ?>
379
                    </select>
380
                    <br>
381
                    Puts the hard disk into standby mode when the selected amount of time after the last
382
                    access has elapsed. <em>Do not set this for CF cards.</em></td>
383
				</tr>
384
				<tr>
385
                  <td width="22%" valign="top" class="vncell">Navigation</td>
386
                  <td width="78%" class="vtable">
387
                    <input name="expanddiags" type="checkbox" id="expanddiags" value="yes" <?php if ($pconfig['expanddiags']) echo "checked"; ?>>
388
                    <strong>Keep diagnostics in navigation expanded </strong></td>
389
                </tr>
390
		<tr>
391
                  <td width="22%" valign="top" class="vncell">webGUI anti-lockout</td>
392
                  <td width="78%" class="vtable">
393
                    <input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?>>
394
                    <strong>Disable webGUI anti-lockout rule</strong><br>
395
					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>
396
					Hint:
397
					the &quot;set LAN IP address&quot; option in the console menu  resets this setting as well.</td>
398
                </tr>
399
                <tr>
400
                  <td width="22%" valign="top">&nbsp;</td>
401
                  <td width="78%">
402
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
403
                  </td>
404
                </tr>
405
                <tr>
406
                  <td colspan="2" class="list" height="12"></td>
407
                </tr>
408
                <tr>
409
                  <td colspan="2" valign="top" class="listtopic">Traffic Shaper and Firewall Advanced</td>
410
                </tr>
411
                <tr>
412
                  <td width="22%" valign="top" class="vncell">FTP Helper</td>
413
                  <td width="78%" class="vtable">
414
                    <input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if (isset($config['system']['disableftpproxy'])) echo "checked"; ?> onclick="enable_change(false)">
415
                    <strong class="vexpl">Disable the userland FTP-Proxy application</strong><br>
416
                </tr>
417
                <tr>
418
                  <td width="22%" valign="top" class="vncell">FTP RFC 959 data port violation workaround</td>
419
                  <td width="78%" class="vtable">
420
                    <input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> onclick="enable_change(false)">
421
                    <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>
422
                </tr>
423

    
424
		<tr>
425
		  <td width="22%" valign="top" class="vncell">Traffic Shaper Scheduler</td>
426
		  <td width="78%" class="vtable">
427
		    <select id="schedulertype" name="schedulertype" <?= $style ?>>
428
		    <?php
429
			    if($pconfig['schedulertype'] == 'priq')
430
				    echo "<option value=\"priq\">Priority based queueing</option>";
431
			    if($pconfig['schedulertype'] == 'cbq')
432
				    echo "<option value=\"cbq\">Class based queueing</option>";
433
			    if($pconfig['schedulertype'] == 'hfsc')
434
				    echo "<option value=\"hfsc\">Hierarchical Fair Service Curve queueing</option>";
435
		    ?>
436
			    <option value="priq">Priority based queueing</option>
437
			    <option value="cbq">Class based queueing</option>
438
			    <option value="hfsc">Hierarchical Fair Service Curve queueing</option>
439
		    </select>
440
		    <br> <span class="vexpl"><b>Select which type of queueing you would like to use</b>
441
		  <?php if (is_array($config['shaper']['queue']) > 0): ?>
442
			<script language="javascript">
443
			document.iform.schedulertype.disabled = 1;
444
			</script>
445
			<br>
446
			NOTE: This option is disabled since there are queues defined.
447
		  <?php endif; ?>
448
		    </span></td>
449
		</tr>
450

    
451
		<tr>
452
                  <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
453
                  <td width="78%" class="vtable">
454
		    <select name="optimization" id="optimization">
455
			<option value="normal"<?php if($config['system']['optimization']=="normal") echo " SELECTED"; ?>>normal - as the name says, it's the normal optimization algorithm.</option>
456
			<option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " SELECTED"; ?>>high-latency - used for high latency links, such as satellite links.  Expires idle connections later than default.</option>
457
			<option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " SELECTED"; ?>>aggressive - expires idle connections earlier than default; using less memory and CPU time while possibly dropping some legitimate connections.</option>
458
			<option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " SELECTED"; ?>>conservative - tries to avoid dropping any legitimate connections at the expense of increased memory usage and CPU utilization.</option>
459
		    </select>
460
		    <br> <span class="vexpl"><b>Select which type of state table optimization your would like to use</b></td>
461
                </tr>
462
                <tr>
463
                  <td width="22%" valign="top" class="vncell">Disable Firewall</td>
464
                  <td width="78%" class="vtable">
465
                    <input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> onclick="enable_change(false)">
466
                    <strong>Disable the firewalls filter altogether.</strong><br>
467
                    <span class="vexpl">NOTE!  This basically converts pfSense into a routing only platform!</span></td>
468
                </tr>
469

    
470
                <tr>
471
                  <td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
472
                  <td width="78%" class="vtable">
473
                    <input name="maximumstates" type="input" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" onclick="enable_change(false)"><br>
474
                    <strong>Maximum number of connections to hold in the firewall state table.</strong><br>
475
                    <span class="vexpl">NOTE!  Leave this blank for the default of 10000</span></td>
476
                </tr>
477

    
478
                <tr>
479
                  <td width="22%" valign="top">&nbsp;</td>
480
                  <td width="78%">
481
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
482
                  </td>
483
                </tr>
484
                <tr>
485
                  <td colspan="2" class="list" height="12"></td>
486
                </tr>
487

    
488

    
489

    
490

    
491

    
492

    
493
              </table>
494
</form>
495
            <script language="JavaScript">
496
<!--
497
enable_change(false);
498
enable_altfirmwareurl(false);
499
enable_altpkgconfigurl(false);
500
//-->
501
</script>
502
<?php include("fend.inc"); ?>
503
</body>
504
</html>
(89-89/106)