Project

General

Profile

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

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

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

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

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

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

    
35
require("guiconfig.inc");
36

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

    
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
			system_webgui_start();
159
		} else if (($g['platform'] == "generic-pc") && ($config['system']['harddiskstandby'] != $oldharddiskstandby)) {
160
			if (!$config['system']['harddiskstandby']) {
161
				// Reboot needed to deactivate standby due to a stupid ATA-protocol
162
				touch($d_sysrebootreqd_path);
163
				unset($config['system']['harddiskstandby']);
164
			} else {
165
				// No need to set the standby-time if a reboot is needed anyway
166
				system_set_harddisk_standby();
167
			}
168
		}
169

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

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

    
225
function update_description(itemnum) {
226
        document.forms[0].info.value=descs[itemnum];
227

    
228
}
229

    
230
// -->
231
</script>
232
</head>
233

    
234
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
235
<form action="system_advanced.php" method="post" name="iform" id="iform">
236
<?php include("fbegin.inc"); ?>
237
      <p class="pgtitle">System: Advanced functions</p>
238
            <?php if ($input_errors) print_input_errors($input_errors); ?>
239
            <?php if ($savemsg) print_info_box($savemsg); ?>
240
            <p><span class="vexpl"><span class="red"><strong>Note: </strong></span>the
241
              options on this page are intended for use by advanced users only,
242
              and there's <strong>NO</strong> support for them.</span></p><br>
243

    
244
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
245

    
246
                <tr>
247
                  <td colspan="2" valign="top" class="listtopic">Disable Rendezvous</td>
248
                </tr>
249
                <tr>
250
                  <td width="22%" valign="top" class="vncell">&nbsp;</td>
251
                  <td width="78%" class="vtable">
252
                    <input name="disablerendevouz" type="checkbox" id="disablerendevouz" value="yes" <?php if ($pconfig['disablerendevouz']) echo "checked"; ?> onclick="enable_change(false)">
253
                    <strong>Disable the Rendevouz automatic discovery protocol.</strong>
254
                    </td>
255
                </tr>
256
                <tr>
257
                  <td width="22%" valign="top">&nbsp;</td>
258
                  <td width="78%">
259
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
260
                  </td>
261
                </tr>
262
                <tr>
263
                  <td colspan="2" class="list" height="12"></td>
264
                </tr>
265

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

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

    
455
		<tr>
456
                  <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
457
                  <td width="78%" class="vtable">
458
			<select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization">
459
			<option value="normal"<?php if($config['system']['optimization']=="normal") echo " SELECTED"; ?>>normal</option>
460
			<option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " SELECTED"; ?>>high-latency</option>
461
			<option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " SELECTED"; ?>>aggressive</option>
462
			<option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " SELECTED"; ?>>conservative</option>
463
			</select>
464
			<textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
465
			</textarea>
466
			<script language="javascript">
467
			update_description(document.forms[0].optimization.selectedIndex);
468
			</script>
469
			<br><span class="vexpl"><b>Select which type of state table optimization your would like to use</b></td>
470
                </tr>
471

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

    
480
                <tr>
481
                  <td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
482
                  <td width="78%" class="vtable">
483
                    <input name="maximumstates" type="input" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" onclick="enable_change(false)"><br>
484
                    <strong>Maximum number of connections to hold in the firewall state table.</strong><br>
485
                    <span class="vexpl">NOTE!  Leave this blank for the default of 10000</span></td>
486
                </tr>
487

    
488
                <tr>
489
                  <td width="22%" valign="top">&nbsp;</td>
490
                  <td width="78%">
491
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
492
                  </td>
493
                </tr>
494
                <tr>
495
                  <td colspan="2" class="list" height="12"></td>
496
                </tr>
497

    
498

    
499

    
500

    
501

    
502

    
503
              </table>
504
</form>
505
            <script language="JavaScript">
506
<!--
507
enable_change(false);
508
enable_altfirmwareurl(false);
509
enable_altpkgconfigurl(false);
510
//-->
511
</script>
512
<?php include("fend.inc"); ?>
513
</body>
514
</html>
(91-91/109)