1
|
#!/usr/local/bin/php
|
2
|
<?php
|
3
|
/* $Id$ */
|
4
|
/*
|
5
|
system_advanced.php
|
6
|
part of pfSense
|
7
|
Copyright (C) 2005 Scott Ullrich
|
8
|
|
9
|
originally part of m0n0wall (http://m0n0.ch/wall)
|
10
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
11
|
All rights reserved.
|
12
|
|
13
|
Redistribution and use in source and binary forms, with or without
|
14
|
modification, are permitted provided that the following conditions are met:
|
15
|
|
16
|
1. Redistributions of source code must retain the above copyright notice,
|
17
|
this list of conditions and the following disclaimer.
|
18
|
|
19
|
2. Redistributions in binary form must reproduce the above copyright
|
20
|
notice, this list of conditions and the following disclaimer in the
|
21
|
documentation and/or other materials provided with the distribution.
|
22
|
|
23
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
24
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
25
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
26
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
27
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
POSSIBILITY OF SUCH DAMAGE.
|
33
|
*/
|
34
|
|
35
|
require("guiconfig.inc");
|
36
|
|
37
|
$pconfig['disablefilter'] = $config['system']['disablefilter'];
|
38
|
$pconfig['disableftpproxy'] = $config['system']['disableftpproxy'];
|
39
|
$pconfig['rfc959workaround'] = $config['system']['rfc959workaround'];
|
40
|
$pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']);
|
41
|
$pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr'];
|
42
|
$pconfig['cert'] = base64_decode($config['system']['webgui']['certificate']);
|
43
|
$pconfig['key'] = base64_decode($config['system']['webgui']['private-key']);
|
44
|
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
|
45
|
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
|
46
|
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
|
47
|
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
|
48
|
$pconfig['schedulertype'] = $config['system']['schedulertype'];
|
49
|
$pconfig['maximumstates'] = $config['system']['maximumstates'];
|
50
|
$pconfig['theme'] = $config['system']['theme'];
|
51
|
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
|
52
|
$pconfig['enableserial'] = $config['system']['enableserial'];
|
53
|
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
|
54
|
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
|
55
|
$pconfig['enablesshd'] = $config['system']['enablesshd'];
|
56
|
|
57
|
if ($_POST) {
|
58
|
|
59
|
unset($input_errors);
|
60
|
$pconfig = $_POST;
|
61
|
|
62
|
/* input validation */
|
63
|
if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) {
|
64
|
$input_errors[] = "You must specify an IP address to NAT IPv6 packets.";
|
65
|
}
|
66
|
if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) {
|
67
|
$input_errors[] = "The Firewall Maximum States value must be an integer.";
|
68
|
}
|
69
|
if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) {
|
70
|
$input_errors[] = "The TCP idle timeout must be an integer.";
|
71
|
}
|
72
|
if (($_POST['cert'] && !$_POST['key']) || ($_POST['key'] && !$_POST['cert'])) {
|
73
|
$input_errors[] = "Certificate and key must always be specified together.";
|
74
|
} else if ($_POST['cert'] && $_POST['key']) {
|
75
|
if (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))
|
76
|
$input_errors[] = "This certificate does not appear to be valid.";
|
77
|
if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY"))
|
78
|
$input_errors[] = "This key does not appear to be valid.";
|
79
|
if ($_POST['altfirmwareurl'])
|
80
|
if ($_POST['firmwareurl'] == "" || $_POST['firmwarename'] == "")
|
81
|
$input_errors[] = "You must specify a base URL and a filename for the alternate firmware.";
|
82
|
if ($_POST['altpkgconfigurl'])
|
83
|
if ($_POST['pkgconfig_base_url'] == "" || $_POST['pkgconfig_filename'] == "")
|
84
|
$input_errors[] = "You must specifiy and base URL and a filename before using an alternate pkg_config.xml.";
|
85
|
}
|
86
|
if ($_POST['maximumstates'] <> "") {
|
87
|
if ($_POST['maximumstates'] < 1000)
|
88
|
$input_errors[] = "States must be above 1000 and below 100000000";
|
89
|
if ($_POST['maximumstates'] > 100000000)
|
90
|
$input_errors[] = "States must be above 1000 and below 100000000";
|
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['enablesshd'] == "yes") {
|
100
|
$config['system']['enablesshd'] = "enabled";
|
101
|
} else {
|
102
|
unset($config['system']['enablesshd']);
|
103
|
}
|
104
|
if($_POST['disableftpproxy'] == "yes") {
|
105
|
$config['system']['disableftpproxy'] = "enabled";
|
106
|
unset($config['system']['rfc959workaround']);
|
107
|
system_start_ftp_helpers();
|
108
|
} else {
|
109
|
unset($config['system']['disableftpproxy']);
|
110
|
system_start_ftp_helpers();
|
111
|
}
|
112
|
if($_POST['rfc959workaround'] == "yes")
|
113
|
$config['system']['rfc959workaround'] = "enabled";
|
114
|
else
|
115
|
unset($config['system']['rfc959workaround']);
|
116
|
|
117
|
if($_POST['ipv6nat_enable'] == "yes") {
|
118
|
$config['diag']['ipv6nat']['enable'] = true;
|
119
|
$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
|
120
|
} else {
|
121
|
unset($config['diag']['ipv6nat']['enable']);
|
122
|
unset($config['diag']['ipv6nat']['ipaddr']);
|
123
|
}
|
124
|
$oldcert = $config['system']['webgui']['certificate'];
|
125
|
$oldkey = $config['system']['webgui']['private-key'];
|
126
|
$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
|
127
|
$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
|
128
|
if($_POST['disableconsolemenu'] == "yes")
|
129
|
$config['system']['disableconsolemenu'] = true;
|
130
|
else
|
131
|
unset($config['system']['disableconsolemenu']);
|
132
|
unset($config['system']['webgui']['expanddiags']);
|
133
|
$config['system']['optimization'] = $_POST['optimization'];
|
134
|
|
135
|
if($_POST['disablefirmwarecheck'] == "yes")
|
136
|
$config['system']['disablefirmwarecheck'] = true;
|
137
|
else
|
138
|
unset($config['system']['disablefirmwarecheck']);
|
139
|
|
140
|
if ($_POST['enableserial'] == "yes")
|
141
|
$config['system']['enableserial'] = true;
|
142
|
else
|
143
|
unset($config['system']['enableserial']);
|
144
|
|
145
|
if($_POST['harddiskstandby'] <> "") {
|
146
|
$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
|
147
|
system_set_harddisk_standby();
|
148
|
} else
|
149
|
unset($config['system']['harddiskstandby']);
|
150
|
|
151
|
if ($_POST['noantilockout'] == "yes")
|
152
|
$config['system']['webgui']['noantilockout'] = true;
|
153
|
else
|
154
|
unset($config['system']['webgui']['noantilockout']);
|
155
|
|
156
|
/* Firewall and ALTQ options */
|
157
|
$config['system']['schedulertype'] = $_POST['schedulertype'];
|
158
|
$config['system']['maximumstates'] = $_POST['maximumstates'];
|
159
|
|
160
|
if($_POST['enablesshd'] == "yes") {
|
161
|
$config['system']['enablesshd'] = $_POST['enablesshd'];
|
162
|
} else {
|
163
|
unset($config['system']['enablesshd']);
|
164
|
}
|
165
|
|
166
|
$config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
|
167
|
|
168
|
/* pfSense themes */
|
169
|
$config['theme'] = $_POST['theme'];
|
170
|
|
171
|
write_config();
|
172
|
|
173
|
if (($config['system']['webgui']['certificate'] != $oldcert)
|
174
|
|| ($config['system']['webgui']['private-key'] != $oldkey)) {
|
175
|
system_webgui_start();
|
176
|
}
|
177
|
|
178
|
|
179
|
$retval = 0;
|
180
|
config_lock();
|
181
|
$retval = filter_configure();
|
182
|
if(stristr($retval, "error") <> true)
|
183
|
$savemsg = get_std_save_message($retval);
|
184
|
else
|
185
|
$savemsg = $retval;
|
186
|
$retval |= interfaces_optional_configure();
|
187
|
config_unlock();
|
188
|
|
189
|
$etc_ttys = return_filename_as_array("/etc/ttys");
|
190
|
$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
|
191
|
|
192
|
conf_mount_rw();
|
193
|
|
194
|
$fout = fopen("/etc/ttys","w");
|
195
|
if(!$fout) {
|
196
|
echo "Cannot open /etc/ttys for writing. Floppy inserted?\n";
|
197
|
} else {
|
198
|
foreach($etc_ttys as $tty) {
|
199
|
if(stristr($tty,"ttyv0") <> true) {
|
200
|
fwrite($fout, $tty . "\n");
|
201
|
}
|
202
|
}
|
203
|
if(isset($pconfig['enableserial']))
|
204
|
fwrite($fout, "ttyv0\t\"/usr/libexec/getty Pc\"\tcons25\t\ton\tsecure\n");
|
205
|
fclose($fout);
|
206
|
}
|
207
|
|
208
|
$fout = fopen("/boot/loader.rc","w");
|
209
|
if(!is_array($boot_loader_rc))
|
210
|
$boot_loader_rc = array();
|
211
|
foreach($boot_loader_rc as $blrc) {
|
212
|
if(stristr($blrc,"comconsole") <> true) {
|
213
|
fwrite($fout, $blrc . "\n");
|
214
|
}
|
215
|
}
|
216
|
if(isset($pconfig['enableserial']))
|
217
|
fwrite($fout, "set console=comconsole\n");
|
218
|
fclose($fout);
|
219
|
|
220
|
mwexec("/etc/sshd");
|
221
|
|
222
|
conf_mount_ro();
|
223
|
}
|
224
|
}
|
225
|
|
226
|
$pgtitle = "System: Advanced functions";
|
227
|
include("head.inc");
|
228
|
|
229
|
?>
|
230
|
|
231
|
<script language="JavaScript">
|
232
|
<!--
|
233
|
function enable_change(enable_over) {
|
234
|
if (document.iform.ipv6nat_enable.checked || enable_over) {
|
235
|
document.iform.ipv6nat_ipaddr.disabled = 0;
|
236
|
document.iform.schedulertype.disabled = 0;
|
237
|
} else {
|
238
|
document.iform.ipv6nat_ipaddr.disabled = 1;
|
239
|
}
|
240
|
}
|
241
|
|
242
|
var descs=new Array(5);
|
243
|
descs[0]="as the name says, it's the normal optimization algorithm";
|
244
|
descs[1]="used for high latency links, such as satellite links. Expires idle connections later than default";
|
245
|
descs[2]="expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate connections";
|
246
|
descs[3]="tries to avoid dropping any legitimate connections at the expense of increased memory usage and CPU utilization.";
|
247
|
|
248
|
function update_description(itemnum) {
|
249
|
document.forms[0].info.value=descs[itemnum];
|
250
|
|
251
|
}
|
252
|
|
253
|
function openwindow(url) {
|
254
|
var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
|
255
|
if (oWin==null || typeof(oWin)=="undefined") {
|
256
|
return false;
|
257
|
} else {
|
258
|
return true;
|
259
|
}
|
260
|
}
|
261
|
|
262
|
// -->
|
263
|
</script>
|
264
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
265
|
<?php include("fbegin.inc"); ?>
|
266
|
<p class="pgtitle"><?=$pgtitle?></p>
|
267
|
<form action="system_advanced.php" method="post" name="iform" id="iform">
|
268
|
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
269
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
270
|
<p><span class="vexpl"><span class="red"><strong>Note: </strong></span>
|
271
|
the options on this page are intended for use by advanced users only.</span></p><br>
|
272
|
|
273
|
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
274
|
|
275
|
<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
|
276
|
<tr>
|
277
|
<td colspan="2" valign="top" class="listtopic">Enable Serial Console</td>
|
278
|
</tr>
|
279
|
<tr>
|
280
|
<td width="22%" valign="top" class="vncell"> </td>
|
281
|
<td width="78%" class="vtable">
|
282
|
<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> onclick="enable_change(false)">
|
283
|
<strong>This will enable the first serial port with 9600/8/N/1</strong>
|
284
|
</td>
|
285
|
</tr>
|
286
|
<tr>
|
287
|
<td width="22%" valign="top"> </td>
|
288
|
<td width="78%">
|
289
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
290
|
</td>
|
291
|
</tr>
|
292
|
</tr>
|
293
|
<tr>
|
294
|
<td colspan="2" class="list" height="12"></td>
|
295
|
</tr>
|
296
|
<?php endif ?>
|
297
|
|
298
|
<tr>
|
299
|
<td colspan="2" valign="top" class="listtopic">Secure Shell</td>
|
300
|
</tr>
|
301
|
<tr>
|
302
|
<td width="22%" valign="top" class="vncell"> </td>
|
303
|
<td width="78%" class="vtable">
|
304
|
<input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> onclick="enable_change(false)">
|
305
|
<strong>Enable Secure Shell</strong>
|
306
|
</td>
|
307
|
</tr>
|
308
|
<tr>
|
309
|
<td width="22%" valign="top"> </td>
|
310
|
<td width="78%">
|
311
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
312
|
</td>
|
313
|
</tr>
|
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">Theme</td>
|
321
|
</tr>
|
322
|
<tr>
|
323
|
<td width="22%" valign="top" class="vncell"> </td>
|
324
|
<td width="78%" class="vtable">
|
325
|
<select name="theme">
|
326
|
<?php
|
327
|
$files = return_dir_as_array("/usr/local/www/themes/");
|
328
|
foreach($files as $f) {
|
329
|
if ( (substr($f, 0, 1) == "_") && !isset($config['system']['developer']) ) continue;
|
330
|
if($f == "CVS") continue;
|
331
|
$selected = "";
|
332
|
if($f == $config['theme'])
|
333
|
$selected = " SELECTED";
|
334
|
if($config['theme'] == "" and $f == "pfsense")
|
335
|
$selceted = " SELECTED";
|
336
|
echo "<option{$selected}>{$f}</option>\n";
|
337
|
}
|
338
|
?>
|
339
|
</select>
|
340
|
<strong>This will change the look and feel of pfSense</strong>
|
341
|
</td>
|
342
|
</tr>
|
343
|
|
344
|
|
345
|
|
346
|
<tr>
|
347
|
<td width="22%" valign="top"> </td>
|
348
|
<td width="78%">
|
349
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
350
|
</td>
|
351
|
</tr>
|
352
|
<tr>
|
353
|
<td colspan="2" class="list" height="12"></td>
|
354
|
</tr>
|
355
|
|
356
|
<tr>
|
357
|
<td colspan="2" valign="top" class="listtopic">IPv6 tunneling</td>
|
358
|
</tr>
|
359
|
<tr>
|
360
|
<td width="22%" valign="top" class="vncell"> </td>
|
361
|
<td width="78%" class="vtable">
|
362
|
<input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)">
|
363
|
<strong>NAT encapsulated IPv6 packets (IP protocol 41/RFC2893)
|
364
|
to:</strong><br> <br> <input name="ipv6nat_ipaddr" type="text" class="formfld" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>">
|
365
|
(IP address)<span class="vexpl"><br>
|
366
|
Don't forget to add a firewall rule to permit IPv6 packets!</span></td>
|
367
|
</tr>
|
368
|
<tr>
|
369
|
<td width="22%" valign="top"> </td>
|
370
|
<td width="78%">
|
371
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
372
|
</td>
|
373
|
</tr>
|
374
|
<tr>
|
375
|
<td colspan="2" class="list" height="12"></td>
|
376
|
</tr>
|
377
|
<tr>
|
378
|
<td colspan="2" valign="top" class="listtopic">webGUI SSL certificate/key</td>
|
379
|
</tr>
|
380
|
<tr>
|
381
|
<td width="22%" valign="top" class="vncell">Certificate</td>
|
382
|
<td width="78%" class="vtable">
|
383
|
<textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
|
384
|
<br>
|
385
|
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>
|
386
|
</tr>
|
387
|
<tr>
|
388
|
<td width="22%" valign="top" class="vncell">Key</td>
|
389
|
<td width="78%" class="vtable">
|
390
|
<textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
|
391
|
<br>
|
392
|
Paste an RSA private key in PEM format here.</td>
|
393
|
</tr>
|
394
|
<tr>
|
395
|
<td width="22%" valign="top"> </td>
|
396
|
<td width="78%">
|
397
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
398
|
</td>
|
399
|
</tr>
|
400
|
<tr>
|
401
|
<td colspan="2" class="list" height="12"></td>
|
402
|
</tr>
|
403
|
<tr>
|
404
|
<td colspan="2" valign="top" class="listtopic">Miscellaneous</td>
|
405
|
</tr>
|
406
|
<tr>
|
407
|
<td width="22%" valign="top" class="vncell">Console menu </td>
|
408
|
<td width="78%" class="vtable">
|
409
|
<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>>
|
410
|
<strong>Disable console menu</strong><span class="vexpl"><br>
|
411
|
Changes to this option will take effect after a reboot.</span></td>
|
412
|
</tr>
|
413
|
<tr>
|
414
|
<td valign="top" class="vncell">Firmware version check </td>
|
415
|
<td class="vtable">
|
416
|
<input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked"; ?>>
|
417
|
<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>
|
418
|
</tr>
|
419
|
<tr>
|
420
|
<td width="22%" valign="top" class="vncell">Hard disk standby time </td>
|
421
|
<td width="78%" class="vtable">
|
422
|
<select name="harddiskstandby" class="formfld">
|
423
|
<?php
|
424
|
/* Values from ATA-2
|
425
|
http://www.t13.org/project/d0948r3-ATA-2.pdf
|
426
|
Page 66 */
|
427
|
$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");
|
428
|
?>
|
429
|
<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
|
430
|
<?php
|
431
|
foreach ($sbvals as $sbval):
|
432
|
list($min,$val) = explode(",", $sbval); ?>
|
433
|
<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
|
434
|
<?php endforeach; ?>
|
435
|
</select>
|
436
|
<br>
|
437
|
Puts the hard disk into standby mode when the selected amount of time after the last
|
438
|
access has elapsed. <em>Do not set this for CF cards.</em></td>
|
439
|
</tr>
|
440
|
<tr>
|
441
|
<td width="22%" valign="top" class="vncell">webGUI anti-lockout</td>
|
442
|
<td width="78%" class="vtable">
|
443
|
<input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?>>
|
444
|
<strong>Disable webGUI anti-lockout rule</strong><br>
|
445
|
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>
|
446
|
Hint:
|
447
|
the "set LAN IP address" option in the console menu resets this setting as well.</td>
|
448
|
</tr>
|
449
|
<tr>
|
450
|
<td width="22%" valign="top" class="vncell">IPsec SA preferral</td>
|
451
|
<td width="78%" class="vtable">
|
452
|
<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?>>
|
453
|
<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.
|
454
|
</td>
|
455
|
</tr>
|
456
|
<tr>
|
457
|
<td width="22%" valign="top"> </td>
|
458
|
<td width="78%">
|
459
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
460
|
</td>
|
461
|
</tr>
|
462
|
<tr>
|
463
|
<td colspan="2" class="list" height="12"></td>
|
464
|
</tr>
|
465
|
<tr>
|
466
|
<td colspan="2" valign="top" class="listtopic">Traffic Shaper and Firewall Advanced</td>
|
467
|
</tr>
|
468
|
<tr>
|
469
|
<td width="22%" valign="top" class="vncell">FTP Helper</td>
|
470
|
<td width="78%" class="vtable">
|
471
|
<input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if (isset($config['system']['disableftpproxy'])) echo "checked"; ?> onclick="enable_change(false)">
|
472
|
<strong class="vexpl">Disable the userland FTP-Proxy application</strong><br>
|
473
|
</tr>
|
474
|
<tr>
|
475
|
<td width="22%" valign="top" class="vncell">FTP RFC 959 data port violation workaround</td>
|
476
|
<td width="78%" class="vtable">
|
477
|
<input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> onclick="enable_change(false)">
|
478
|
<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>
|
479
|
</tr>
|
480
|
|
481
|
<tr>
|
482
|
<td width="22%" valign="top" class="vncell">Traffic Shaper Scheduler</td>
|
483
|
<td width="78%" class="vtable">
|
484
|
<select id="schedulertype" name="schedulertype" <?= $style ?>>
|
485
|
<option value="priq"<?php if($pconfig['schedulertype'] == 'priq') echo " SELECTED"; ?>>Priority based queueing</option>
|
486
|
<option value="cbq"<?php if($pconfig['schedulertype'] == 'cbq') echo " SELECTED"; ?>>Class based queueing</option>
|
487
|
<option value="hfsc"<?php if($pconfig['schedulertype'] == 'hfsc') echo " SELECTED"; ?>>Hierarchical Fair Service Curve queueing</option>
|
488
|
</select>
|
489
|
<br> <span class="vexpl"><b>Select which type of queueing you would like to use</b>
|
490
|
<?php if (is_array($config['shaper']['queue']) > 0): ?>
|
491
|
<script language="javascript">
|
492
|
document.iform.schedulertype.disabled = 1;
|
493
|
</script>
|
494
|
<br>
|
495
|
NOTE: This option is disabled since there are queues defined.
|
496
|
<?php endif; ?>
|
497
|
</span></td>
|
498
|
</tr>
|
499
|
|
500
|
<tr>
|
501
|
<td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
|
502
|
<td width="78%" class="vtable">
|
503
|
<select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization">
|
504
|
<br>
|
505
|
<option value="normal"<?php if($config['system']['optimization']=="normal") echo " SELECTED"; ?>>normal</option>
|
506
|
<option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " SELECTED"; ?>>high-latency</option>
|
507
|
<option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " SELECTED"; ?>>aggressive</option>
|
508
|
<option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " SELECTED"; ?>>conservative</option>
|
509
|
</select><br>
|
510
|
<textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
|
511
|
</textarea>
|
512
|
<script language="javascript">
|
513
|
update_description(document.forms[0].optimization.selectedIndex);
|
514
|
</script>
|
515
|
<br><span class="vexpl"><b>Select which type of state table optimization your would like to use</b></td>
|
516
|
</tr>
|
517
|
|
518
|
<tr>
|
519
|
<td width="22%" valign="top" class="vncell">Disable Firewall</td>
|
520
|
<td width="78%" class="vtable">
|
521
|
<input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> onclick="enable_change(false)">
|
522
|
<strong>Disable the firewalls filter altogether.</strong><br>
|
523
|
<span class="vexpl">Note: This basically converts pfSense into a routing only platform!</span></td>
|
524
|
</tr>
|
525
|
|
526
|
<tr>
|
527
|
<td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
|
528
|
<td width="78%" class="vtable">
|
529
|
<input name="maximumstates" type="input" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" onclick="enable_change(false)"><br>
|
530
|
<strong>Maximum number of connections to hold in the firewall state table.</strong><br>
|
531
|
<span class="vexpl">Note: Leave this blank for the default of 10000</span></td>
|
532
|
</tr>
|
533
|
|
534
|
<tr>
|
535
|
<td width="22%" valign="top"> </td>
|
536
|
<td width="78%">
|
537
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
538
|
</td>
|
539
|
</tr>
|
540
|
<tr>
|
541
|
<td colspan="2" class="list" height="12"></td>
|
542
|
</tr>
|
543
|
|
544
|
|
545
|
|
546
|
|
547
|
|
548
|
|
549
|
</table>
|
550
|
</form>
|
551
|
<script language="JavaScript">
|
552
|
<!--
|
553
|
enable_change(false);
|
554
|
//enable_altfirmwareurl(false);
|
555
|
//enable_altpkgconfigurl(false);
|
556
|
//-->
|
557
|
</script>
|
558
|
<?php include("fend.inc"); ?>
|
559
|
</body>
|
560
|
</html>
|