Project

General

Profile

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

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

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

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

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

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

    
35
require("guiconfig.inc");
36

    
37
$pconfig['disablefilter'] = $config['system']['disablefilter'];
38
$pconfig['disableftpproxy'] = $config['system']['disableftpproxy'];
39
$pconfig['rfc959workaround'] = $config['system']['rfc959workaround'];
40
$pconfig['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
if ($g['platform'] == "generic-pc")
55
	$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
56
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
57
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
58
$pconfig['schedulertype'] = $config['system']['schedulertype'];
59
$pconfig['maximumstates'] = $config['system']['maximumstates'];
60
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
61

    
62
if ($_POST) {
63

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

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

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

    
93
	if (!$input_errors) {
94
		if($_POST['disablefilter'] == "yes") {
95
			$config['system']['disablefilter'] = "enabled";
96
		} else {
97
			unset($config['system']['disablefilter']);
98
		}
99
		if($_POST['disableftpproxy'] == "yes") {
100
			$config['system']['disableftpproxy'] = "enabled";
101
			unset($config['system']['rfc959workaround']);
102
		} else {
103
			unset($config['system']['disableftpproxy']);
104
		}
105
		if($_POST['rfc959workaround'] == "yes") {
106
			$config['system']['rfc959workaround'] = "enabled";
107
		}
108
		$config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false;
109
		$config['diag']['ipv6nat']['enable'] = $_POST['ipv6nat_enable'] ? true : false;
110
		$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
111
		$oldcert = $config['system']['webgui']['certificate'];
112
		$oldkey = $config['system']['webgui']['private-key'];
113
		$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
114
		$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
115
		$config['system']['disableconsolemenu'] = $_POST['disableconsolemenu'] ? true : false;
116
		$config['system']['disablefirmwarecheck'] = $_POST['disablefirmwarecheck'] ? true : false;
117
		$config['system']['altfirmwareurl'] = $_POST['altfirmwareurl'] ? true : false;
118
		if ($_POST['altfirmwareurl']) {
119
			$config['system']['alt_firmware_url'] = array();
120
			$config['system']['alt_firmware_url']['enabled'] = "";
121
			$config['system']['alt_firmware_url']['firmware_base_url'] = $_POST['firmwareurl'];
122
			$config['system']['alt_firmware_url']['firmware_filename'] = $_POST['firmwarename'];
123
		} elseif (isset($config['system']['alt_firmware_url']['firmware_base_url']) || isset($config['system']['alt_firmware_url']['firmware_filename'])) {
124
			unset($config['system']['alt_firmware_url']['enabled']);
125
		} else {
126
			unset($config['system']['alt_firmware_url']);
127
		}
128

    
129
		if ($_POST['altpkgconfigurl']) {
130
			$config['system']['alt_pkgconfig_url'] = array();
131
			$config['system']['alt_pkgconfig_url']['enabled'] = "";
132
			$config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] = $_POST['pkgconfig_base_url'];
133
			$config['system']['alt_pkgconfig_url']['pkgconfig_filename'] = $_POST['pkgconfig_filename'];
134
		} elseif (isset($config['system']['alt_pkgconfig_url']['pkgconfig_base_url']) || isset($config['system']['alt_pkgconfig_url']['pkgconfig_filename'])) {
135
			unset($config['system']['alt_pkgconfig_url']['enabled']);
136
		} else {
137
			unset($config['system']['alt_pkgconfig_url']);
138
		}
139

    
140
		$config['system']['webgui']['expanddiags'] = $_POST['expanddiags'] ? true : false;
141
		$config['system']['optimization'] = $_POST['optimization'];
142
		$config['system']['disablerendevouz'] = $_POST['disablerendevouz'];
143

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

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

    
154
		write_config();
155

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

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

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

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

    
229
}
230

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

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

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

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

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

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

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

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

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

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

    
499

    
500

    
501

    
502

    
503

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