1 |
5b237745
|
Scott Ullrich
|
#!/usr/local/bin/php
|
2 |
13128695
|
Scott Ullrich
|
<?php
|
3 |
b46bfcf5
|
Bill Marquette
|
/* $Id$ */
|
4 |
5b237745
|
Scott Ullrich
|
/*
|
5 |
|
|
system_advanced.php
|
6 |
416ed28d
|
Scott Ullrich
|
part of pfSense
|
7 |
|
|
Copyright (C) 2005 Scott Ullrich
|
8 |
13128695
|
Scott Ullrich
|
|
9 |
416ed28d
|
Scott Ullrich
|
originally part of m0n0wall (http://m0n0.ch/wall)
|
10 |
5b237745
|
Scott Ullrich
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
11 |
|
|
All rights reserved.
|
12 |
13128695
|
Scott Ullrich
|
|
13 |
5b237745
|
Scott Ullrich
|
Redistribution and use in source and binary forms, with or without
|
14 |
|
|
modification, are permitted provided that the following conditions are met:
|
15 |
13128695
|
Scott Ullrich
|
|
16 |
5b237745
|
Scott Ullrich
|
1. Redistributions of source code must retain the above copyright notice,
|
17 |
|
|
this list of conditions and the following disclaimer.
|
18 |
13128695
|
Scott Ullrich
|
|
19 |
5b237745
|
Scott Ullrich
|
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 |
13128695
|
Scott Ullrich
|
|
23 |
5b237745
|
Scott Ullrich
|
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 |
35284e50
|
Scott Ullrich
|
$pconfig['disablefilter'] = $config['system']['disablefilter'];
|
38 |
f55cccc4
|
Scott Ullrich
|
$pconfig['disableftpproxy'] = $config['system']['disableftpproxy'];
|
39 |
38560a25
|
Bill Marquette
|
$pconfig['rfc959workaround'] = $config['system']['rfc959workaround'];
|
40 |
5b237745
|
Scott Ullrich
|
$pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']);
|
41 |
|
|
$pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr'];
|
42 |
|
|
$pconfig['cert'] = base64_decode($config['system']['webgui']['certificate']);
|
43 |
|
|
$pconfig['key'] = base64_decode($config['system']['webgui']['private-key']);
|
44 |
|
|
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
|
45 |
|
|
$pconfig['expanddiags'] = isset($config['system']['webgui']['expanddiags']);
|
46 |
c11e337b
|
Scott Ullrich
|
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
|
47 |
5b237745
|
Scott Ullrich
|
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
|
48 |
|
|
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout'];
|
49 |
222b5299
|
Scott Ullrich
|
$pconfig['schedulertype'] = $config['system']['schedulertype'];
|
50 |
351217ed
|
Scott Ullrich
|
$pconfig['maximumstates'] = $config['system']['maximumstates'];
|
51 |
68bf6021
|
Scott Ullrich
|
$pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
|
52 |
2f810bc1
|
Scott Ullrich
|
$pconfig['enableserial'] = $config['system']['enableserial'];
|
53 |
5c50ae40
|
Scott Ullrich
|
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
|
54 |
d5967a9a
|
Scott Ullrich
|
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
|
55 |
222b5299
|
Scott Ullrich
|
|
56 |
5b237745
|
Scott Ullrich
|
if ($_POST) {
|
57 |
|
|
|
58 |
|
|
unset($input_errors);
|
59 |
|
|
$pconfig = $_POST;
|
60 |
|
|
|
61 |
|
|
/* input validation */
|
62 |
|
|
if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) {
|
63 |
|
|
$input_errors[] = "You must specify an IP address to NAT IPv6 packets.";
|
64 |
|
|
}
|
65 |
351217ed
|
Scott Ullrich
|
if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) {
|
66 |
|
|
$input_errors[] = "The Firewall Maximum States value must be an integer.";
|
67 |
|
|
}
|
68 |
5b237745
|
Scott Ullrich
|
if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) {
|
69 |
|
|
$input_errors[] = "The TCP idle timeout must be an integer.";
|
70 |
|
|
}
|
71 |
|
|
if (($_POST['cert'] && !$_POST['key']) || ($_POST['key'] && !$_POST['cert'])) {
|
72 |
|
|
$input_errors[] = "Certificate and key must always be specified together.";
|
73 |
|
|
} else if ($_POST['cert'] && $_POST['key']) {
|
74 |
|
|
if (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))
|
75 |
|
|
$input_errors[] = "This certificate does not appear to be valid.";
|
76 |
|
|
if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY"))
|
77 |
|
|
$input_errors[] = "This key does not appear to be valid.";
|
78 |
a509ff63
|
Bill Marquette
|
if ($_POST['altfirmwareurl'])
|
79 |
|
|
if ($_POST['firmwareurl'] == "" || $_POST['firmwarename'] == "")
|
80 |
|
|
$input_errors[] = "You must specify a base URL and a filename for the alternate firmware.";
|
81 |
66f481cc
|
Colin Smith
|
|
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 |
5b237745
|
Scott Ullrich
|
}
|
86 |
|
|
|
87 |
|
|
if (!$input_errors) {
|
88 |
35284e50
|
Scott Ullrich
|
if($_POST['disablefilter'] == "yes") {
|
89 |
|
|
$config['system']['disablefilter'] = "enabled";
|
90 |
|
|
} else {
|
91 |
|
|
unset($config['system']['disablefilter']);
|
92 |
|
|
}
|
93 |
f55cccc4
|
Scott Ullrich
|
if($_POST['disableftpproxy'] == "yes") {
|
94 |
|
|
$config['system']['disableftpproxy'] = "enabled";
|
95 |
38560a25
|
Bill Marquette
|
unset($config['system']['rfc959workaround']);
|
96 |
2bae67ba
|
Scott Ullrich
|
system_start_ftp_helpers();
|
97 |
f55cccc4
|
Scott Ullrich
|
} else {
|
98 |
|
|
unset($config['system']['disableftpproxy']);
|
99 |
dce949b0
|
Scott Ullrich
|
system_start_ftp_helpers();
|
100 |
f55cccc4
|
Scott Ullrich
|
}
|
101 |
31f93981
|
Bill Marquette
|
if($_POST['rfc959workaround'] == "yes")
|
102 |
38560a25
|
Bill Marquette
|
$config['system']['rfc959workaround'] = "enabled";
|
103 |
31f93981
|
Bill Marquette
|
else
|
104 |
|
|
unset($config['system']['rfc959workaround']);
|
105 |
|
|
|
106 |
|
|
if($_POST['ipv6nat_enable'] == "yes") {
|
107 |
|
|
$config['diag']['ipv6nat']['enable'] = true;
|
108 |
|
|
$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
|
109 |
|
|
} else {
|
110 |
|
|
unset($config['diag']['ipv6nat']['enable']);
|
111 |
|
|
unset($config['diag']['ipv6nat']['ipaddr']);
|
112 |
38560a25
|
Bill Marquette
|
}
|
113 |
5b237745
|
Scott Ullrich
|
$oldcert = $config['system']['webgui']['certificate'];
|
114 |
|
|
$oldkey = $config['system']['webgui']['private-key'];
|
115 |
|
|
$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
|
116 |
|
|
$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
|
117 |
31f93981
|
Bill Marquette
|
if($_POST['disableconsolemenu'] == "yes")
|
118 |
|
|
$config['system']['disableconsolemenu'] = true;
|
119 |
|
|
else
|
120 |
|
|
unset($config['system']['disableconsolemenu']);
|
121 |
|
|
if ($_POST['expanddiags'] == "yes")
|
122 |
|
|
$config['system']['webgui']['expanddiags'] = true;
|
123 |
|
|
else
|
124 |
|
|
unset($config['system']['webgui']['expanddiags']);
|
125 |
416ed28d
|
Scott Ullrich
|
$config['system']['optimization'] = $_POST['optimization'];
|
126 |
5c50ae40
|
Scott Ullrich
|
|
127 |
|
|
if($_POST['disablefirmwarecheck'] == "yes")
|
128 |
|
|
$config['system']['disablefirmwarecheck'] = true;
|
129 |
|
|
else
|
130 |
2629e5d1
|
Scott Ullrich
|
unset($config['system']['disablefirmwarecheck']);
|
131 |
|
|
|
132 |
31f93981
|
Bill Marquette
|
if ($_POST['enableserial'] == "yes")
|
133 |
538bb06f
|
Bill Marquette
|
$config['system']['enableserial'] = true;
|
134 |
31f93981
|
Bill Marquette
|
else
|
135 |
|
|
unset($config['system']['enableserial']);
|
136 |
|
|
|
137 |
|
|
if($_POST['harddiskstandby'] == "yes") {
|
138 |
|
|
$config['system']['harddiskstandby'] = "yes";
|
139 |
|
|
system_set_harddisk_standby();
|
140 |
|
|
} else
|
141 |
|
|
unset($config['system']['harddiskstandby']);
|
142 |
|
|
|
143 |
|
|
if ($_POST['noantilockout'] == "yes")
|
144 |
|
|
$config['system']['webgui']['noantilockout'] = true;
|
145 |
|
|
else
|
146 |
|
|
unset($config['system']['webgui']['noantilockout']);
|
147 |
13128695
|
Scott Ullrich
|
|
148 |
351217ed
|
Scott Ullrich
|
/* Firewall and ALTQ options */
|
149 |
12bcdc89
|
Scott Ullrich
|
$config['system']['schedulertype'] = $_POST['schedulertype'];
|
150 |
351217ed
|
Scott Ullrich
|
$config['system']['maximumstates'] = $_POST['maximumstates'];
|
151 |
12bcdc89
|
Scott Ullrich
|
|
152 |
d5967a9a
|
Scott Ullrich
|
$config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
|
153 |
|
|
|
154 |
5b237745
|
Scott Ullrich
|
write_config();
|
155 |
13128695
|
Scott Ullrich
|
|
156 |
5b237745
|
Scott Ullrich
|
if (($config['system']['webgui']['certificate'] != $oldcert)
|
157 |
|
|
|| ($config['system']['webgui']['private-key'] != $oldkey)) {
|
158 |
61deccba
|
Bill Marquette
|
system_webgui_start();
|
159 |
5b237745
|
Scott Ullrich
|
}
|
160 |
13128695
|
Scott Ullrich
|
|
161 |
b3d44462
|
Scott Ullrich
|
|
162 |
5b237745
|
Scott Ullrich
|
$retval = 0;
|
163 |
|
|
if (!file_exists($d_sysrebootreqd_path)) {
|
164 |
|
|
config_lock();
|
165 |
|
|
$retval = filter_configure();
|
166 |
ee769c92
|
Scott Ullrich
|
if(stristr($retval, "error") <> true)
|
167 |
|
|
$savemsg = get_std_save_message($retval);
|
168 |
|
|
else
|
169 |
|
|
$savemsg = $retval;
|
170 |
5b237745
|
Scott Ullrich
|
$retval |= interfaces_optional_configure();
|
171 |
|
|
config_unlock();
|
172 |
|
|
}
|
173 |
2f810bc1
|
Scott Ullrich
|
|
174 |
|
|
$etc_ttys = return_filename_as_array("/etc/ttys");
|
175 |
|
|
$boot_loader_rc = return_filename_as_array("/boot/loader.rc");
|
176 |
|
|
|
177 |
24d31909
|
Scott Ullrich
|
|
178 |
|
|
conf_mount_rw();
|
179 |
923d0f44
|
Scott Ullrich
|
|
180 |
2f810bc1
|
Scott Ullrich
|
$fout = fopen("/etc/ttys","w");
|
181 |
|
|
foreach($etc_ttys as $tty) {
|
182 |
ad58a44a
|
Scott Ullrich
|
if(stristr($tty,"ttyv0") <> true) {
|
183 |
2f810bc1
|
Scott Ullrich
|
fwrite($fout, $tty . "\n");
|
184 |
|
|
}
|
185 |
|
|
}
|
186 |
41883093
|
Scott Ullrich
|
if(isset($pconfig['enableserial']))
|
187 |
7bb0e455
|
Scott Ullrich
|
fwrite($fout, "ttyv0\t\"/usr/libexec/getty Pc\"\tcons25\t\ton\tsecure\n");
|
188 |
2f810bc1
|
Scott Ullrich
|
fclose($fout);
|
189 |
|
|
|
190 |
|
|
$fout = fopen("/boot/loader.rc","w");
|
191 |
|
|
foreach($boot_loader_rc as $blrc) {
|
192 |
|
|
if(stristr($blrc,"comconsole") <> true) {
|
193 |
|
|
fwrite($fout, $blrc . "\n");
|
194 |
|
|
}
|
195 |
|
|
}
|
196 |
41883093
|
Scott Ullrich
|
if(isset($pconfig['enableserial']))
|
197 |
2f810bc1
|
Scott Ullrich
|
fwrite($fout, "set console=comconsole\n");
|
198 |
|
|
fclose($fout);
|
199 |
923d0f44
|
Scott Ullrich
|
|
200 |
24d31909
|
Scott Ullrich
|
conf_mount_ro();
|
201 |
5b237745
|
Scott Ullrich
|
}
|
202 |
|
|
}
|
203 |
b63695db
|
Scott Ullrich
|
|
204 |
|
|
$pgtitle = "System: Advanced functions";
|
205 |
|
|
include("head.inc");
|
206 |
|
|
|
207 |
5b237745
|
Scott Ullrich
|
?>
|
208 |
b63695db
|
Scott Ullrich
|
|
209 |
5b237745
|
Scott Ullrich
|
<script language="JavaScript">
|
210 |
|
|
<!--
|
211 |
|
|
function enable_change(enable_over) {
|
212 |
|
|
if (document.iform.ipv6nat_enable.checked || enable_over) {
|
213 |
|
|
document.iform.ipv6nat_ipaddr.disabled = 0;
|
214 |
416ed28d
|
Scott Ullrich
|
document.iform.schedulertype.disabled = 0;
|
215 |
5b237745
|
Scott Ullrich
|
} else {
|
216 |
|
|
document.iform.ipv6nat_ipaddr.disabled = 1;
|
217 |
|
|
}
|
218 |
|
|
}
|
219 |
a509ff63
|
Bill Marquette
|
|
220 |
f1a5cfb8
|
Scott Ullrich
|
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 |
538bb06f
|
Bill Marquette
|
descs[2]="expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate connections";
|
224 |
f1a5cfb8
|
Scott Ullrich
|
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 |
c7e202d3
|
Scott Ullrich
|
function openwindow(url) {
|
232 |
61432a49
|
Scott Ullrich
|
var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
|
233 |
c7e202d3
|
Scott Ullrich
|
if (oWin==null || typeof(oWin)=="undefined") {
|
234 |
|
|
return false;
|
235 |
|
|
} else {
|
236 |
|
|
return true;
|
237 |
|
|
}
|
238 |
|
|
}
|
239 |
|
|
|
240 |
5b237745
|
Scott Ullrich
|
// -->
|
241 |
|
|
</script>
|
242 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
243 |
13128695
|
Scott Ullrich
|
<form action="system_advanced.php" method="post" name="iform" id="iform">
|
244 |
5b237745
|
Scott Ullrich
|
<?php include("fbegin.inc"); ?>
|
245 |
|
|
<p class="pgtitle">System: Advanced functions</p>
|
246 |
|
|
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
247 |
|
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
248 |
3b617d70
|
Scott Ullrich
|
<p><span class="vexpl"><span class="red"><strong>Note: </strong></span>
|
249 |
|
|
the options on this page are intended for use by advanced users only.</span></p><br>
|
250 |
13128695
|
Scott Ullrich
|
|
251 |
5b237745
|
Scott Ullrich
|
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
252 |
416ed28d
|
Scott Ullrich
|
|
253 |
dbb0b7d6
|
Holger Bauer
|
<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
|
254 |
2f810bc1
|
Scott Ullrich
|
<tr>
|
255 |
|
|
<td colspan="2" valign="top" class="listtopic">Enable Serial Console</td>
|
256 |
|
|
</tr>
|
257 |
|
|
<tr>
|
258 |
|
|
<td width="22%" valign="top" class="vncell"> </td>
|
259 |
|
|
<td width="78%" class="vtable">
|
260 |
41883093
|
Scott Ullrich
|
<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> onclick="enable_change(false)">
|
261 |
2f810bc1
|
Scott Ullrich
|
<strong>This will enable the first serial port with 9600/8/N/1</strong>
|
262 |
|
|
</td>
|
263 |
|
|
</tr>
|
264 |
faa571ed
|
Scott Ullrich
|
<?php endif ?>
|
265 |
2f810bc1
|
Scott Ullrich
|
|
266 |
68bf6021
|
Scott Ullrich
|
<tr>
|
267 |
|
|
<td width="22%" valign="top"> </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 |
|
|
|
276 |
13128695
|
Scott Ullrich
|
<tr>
|
277 |
5b237745
|
Scott Ullrich
|
<td colspan="2" valign="top" class="listtopic">IPv6 tunneling</td>
|
278 |
|
|
</tr>
|
279 |
13128695
|
Scott Ullrich
|
<tr>
|
280 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell"> </td>
|
281 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
282 |
|
|
<input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)">
|
283 |
|
|
<strong>NAT encapsulated IPv6 packets (IP protocol 41/RFC2893)
|
284 |
|
|
to:</strong><br> <br> <input name="ipv6nat_ipaddr" type="text" class="formfld" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>">
|
285 |
5b237745
|
Scott Ullrich
|
(IP address)<span class="vexpl"><br>
|
286 |
|
|
Don't forget to add a firewall rule to permit IPv6 packets!</span></td>
|
287 |
|
|
</tr>
|
288 |
13128695
|
Scott Ullrich
|
<tr>
|
289 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top"> </td>
|
290 |
13128695
|
Scott Ullrich
|
<td width="78%">
|
291 |
|
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
292 |
5b237745
|
Scott Ullrich
|
</td>
|
293 |
|
|
</tr>
|
294 |
13128695
|
Scott Ullrich
|
<tr>
|
295 |
5b237745
|
Scott Ullrich
|
<td colspan="2" class="list" height="12"></td>
|
296 |
|
|
</tr>
|
297 |
13128695
|
Scott Ullrich
|
<tr>
|
298 |
5b237745
|
Scott Ullrich
|
<td colspan="2" valign="top" class="listtopic">webGUI SSL certificate/key</td>
|
299 |
|
|
</tr>
|
300 |
13128695
|
Scott Ullrich
|
<tr>
|
301 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell">Certificate</td>
|
302 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
303 |
5b237745
|
Scott Ullrich
|
<textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
|
304 |
13128695
|
Scott Ullrich
|
<br>
|
305 |
c7e202d3
|
Scott Ullrich
|
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>
|
306 |
5b237745
|
Scott Ullrich
|
</tr>
|
307 |
13128695
|
Scott Ullrich
|
<tr>
|
308 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell">Key</td>
|
309 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
310 |
5b237745
|
Scott Ullrich
|
<textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
|
311 |
13128695
|
Scott Ullrich
|
<br>
|
312 |
5b237745
|
Scott Ullrich
|
Paste an RSA private key in PEM format here.</td>
|
313 |
|
|
</tr>
|
314 |
13128695
|
Scott Ullrich
|
<tr>
|
315 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top"> </td>
|
316 |
13128695
|
Scott Ullrich
|
<td width="78%">
|
317 |
|
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
318 |
5b237745
|
Scott Ullrich
|
</td>
|
319 |
|
|
</tr>
|
320 |
13128695
|
Scott Ullrich
|
<tr>
|
321 |
5b237745
|
Scott Ullrich
|
<td colspan="2" class="list" height="12"></td>
|
322 |
|
|
</tr>
|
323 |
13128695
|
Scott Ullrich
|
<tr>
|
324 |
5b237745
|
Scott Ullrich
|
<td colspan="2" valign="top" class="listtopic">Miscellaneous</td>
|
325 |
|
|
</tr>
|
326 |
13128695
|
Scott Ullrich
|
<tr>
|
327 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell">Console menu </td>
|
328 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
329 |
5b237745
|
Scott Ullrich
|
<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>>
|
330 |
|
|
<strong>Disable console menu</strong><span class="vexpl"><br>
|
331 |
|
|
Changes to this option will take effect after a reboot.</span></td>
|
332 |
|
|
</tr>
|
333 |
5c50ae40
|
Scott Ullrich
|
<tr>
|
334 |
|
|
<td valign="top" class="vncell">Firmware version check </td>
|
335 |
|
|
<td class="vtable">
|
336 |
|
|
<input name="disablefirmwarecheck" type="checkbox" id="disablefirmwarecheck" value="yes" <?php if ($pconfig['disablefirmwarecheck']) echo "checked"; ?>>
|
337 |
|
|
<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>
|
338 |
|
|
</tr>
|
339 |
a509ff63
|
Bill Marquette
|
<tr>
|
340 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell">Hard disk standby time </td>
|
341 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
342 |
5b237745
|
Scott Ullrich
|
<select name="harddiskstandby" class="formfld">
|
343 |
|
|
<?php
|
344 |
|
|
/* Values from ATA-2
|
345 |
|
|
http://www.t13.org/project/d0948r3-ATA-2.pdf
|
346 |
|
|
Page 66 */
|
347 |
|
|
$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");
|
348 |
|
|
?>
|
349 |
|
|
<option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option>
|
350 |
|
|
<?php
|
351 |
|
|
foreach ($sbvals as $sbval):
|
352 |
|
|
list($min,$val) = explode(",", $sbval); ?>
|
353 |
|
|
<option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option>
|
354 |
|
|
<?php endforeach; ?>
|
355 |
|
|
</select>
|
356 |
|
|
<br>
|
357 |
|
|
Puts the hard disk into standby mode when the selected amount of time after the last
|
358 |
|
|
access has elapsed. <em>Do not set this for CF cards.</em></td>
|
359 |
|
|
</tr>
|
360 |
13128695
|
Scott Ullrich
|
<tr>
|
361 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell">Navigation</td>
|
362 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
363 |
5b237745
|
Scott Ullrich
|
<input name="expanddiags" type="checkbox" id="expanddiags" value="yes" <?php if ($pconfig['expanddiags']) echo "checked"; ?>>
|
364 |
|
|
<strong>Keep diagnostics in navigation expanded </strong></td>
|
365 |
|
|
</tr>
|
366 |
416ed28d
|
Scott Ullrich
|
<tr>
|
367 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top" class="vncell">webGUI anti-lockout</td>
|
368 |
13128695
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
369 |
5b237745
|
Scott Ullrich
|
<input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?>>
|
370 |
|
|
<strong>Disable webGUI anti-lockout rule</strong><br>
|
371 |
|
|
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>
|
372 |
13128695
|
Scott Ullrich
|
Hint:
|
373 |
5b237745
|
Scott Ullrich
|
the "set LAN IP address" option in the console menu resets this setting as well.</td>
|
374 |
|
|
</tr>
|
375 |
d5967a9a
|
Scott Ullrich
|
<tr>
|
376 |
|
|
<td width="22%" valign="top" class="vncell">IPsec SA preferral</td>
|
377 |
|
|
<td width="78%" class="vtable">
|
378 |
|
|
<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?>>
|
379 |
|
|
<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.
|
380 |
|
|
</td>
|
381 |
|
|
</tr>
|
382 |
13128695
|
Scott Ullrich
|
<tr>
|
383 |
5b237745
|
Scott Ullrich
|
<td width="22%" valign="top"> </td>
|
384 |
13128695
|
Scott Ullrich
|
<td width="78%">
|
385 |
|
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
386 |
5b237745
|
Scott Ullrich
|
</td>
|
387 |
|
|
</tr>
|
388 |
19b08f97
|
Scott Ullrich
|
<tr>
|
389 |
|
|
<td colspan="2" class="list" height="12"></td>
|
390 |
|
|
</tr>
|
391 |
|
|
<tr>
|
392 |
|
|
<td colspan="2" valign="top" class="listtopic">Traffic Shaper and Firewall Advanced</td>
|
393 |
|
|
</tr>
|
394 |
|
|
<tr>
|
395 |
|
|
<td width="22%" valign="top" class="vncell">FTP Helper</td>
|
396 |
|
|
<td width="78%" class="vtable">
|
397 |
|
|
<input name="disableftpproxy" type="checkbox" id="disableftpproxy" value="yes" <?php if (isset($config['system']['disableftpproxy'])) echo "checked"; ?> onclick="enable_change(false)">
|
398 |
|
|
<strong class="vexpl">Disable the userland FTP-Proxy application</strong><br>
|
399 |
|
|
</tr>
|
400 |
38560a25
|
Bill Marquette
|
<tr>
|
401 |
|
|
<td width="22%" valign="top" class="vncell">FTP RFC 959 data port violation workaround</td>
|
402 |
|
|
<td width="78%" class="vtable">
|
403 |
|
|
<input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> onclick="enable_change(false)">
|
404 |
355229d0
|
Bill Marquette
|
<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>
|
405 |
38560a25
|
Bill Marquette
|
</tr>
|
406 |
416ed28d
|
Scott Ullrich
|
|
407 |
|
|
<tr>
|
408 |
d76f9696
|
Bill Marquette
|
<td width="22%" valign="top" class="vncell">Traffic Shaper Scheduler</td>
|
409 |
19b08f97
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
410 |
|
|
<select id="schedulertype" name="schedulertype" <?= $style ?>>
|
411 |
9cba3649
|
Scott Ullrich
|
<option value="priq"<?php if($pconfig['schedulertype'] == 'priq') echo " SELECTED"; ?>>Priority based queueing</option>
|
412 |
|
|
<option value="cbq"<?php if($pconfig['schedulertype'] == 'cbq') echo " SELECTED"; ?>>Class based queueing</option>
|
413 |
|
|
<option value="hfsc"<?php if($pconfig['schedulertype'] == 'hfsc') echo " SELECTED"; ?>>Hierarchical Fair Service Curve queueing</option>
|
414 |
19b08f97
|
Scott Ullrich
|
</select>
|
415 |
d76f9696
|
Bill Marquette
|
<br> <span class="vexpl"><b>Select which type of queueing you would like to use</b>
|
416 |
19b08f97
|
Scott Ullrich
|
<?php if (is_array($config['shaper']['queue']) > 0): ?>
|
417 |
|
|
<script language="javascript">
|
418 |
|
|
document.iform.schedulertype.disabled = 1;
|
419 |
|
|
</script>
|
420 |
|
|
<br>
|
421 |
|
|
NOTE: This option is disabled since there are queues defined.
|
422 |
|
|
<?php endif; ?>
|
423 |
|
|
</span></td>
|
424 |
|
|
</tr>
|
425 |
|
|
|
426 |
|
|
<tr>
|
427 |
|
|
<td width="22%" valign="top" class="vncell">Firewall Optimization Options</td>
|
428 |
416ed28d
|
Scott Ullrich
|
<td width="78%" class="vtable">
|
429 |
f1a5cfb8
|
Scott Ullrich
|
<select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization">
|
430 |
|
|
<option value="normal"<?php if($config['system']['optimization']=="normal") echo " SELECTED"; ?>>normal</option>
|
431 |
|
|
<option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " SELECTED"; ?>>high-latency</option>
|
432 |
|
|
<option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " SELECTED"; ?>>aggressive</option>
|
433 |
|
|
<option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " SELECTED"; ?>>conservative</option>
|
434 |
|
|
</select>
|
435 |
05603c34
|
Scott Ullrich
|
<textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
|
436 |
f1a5cfb8
|
Scott Ullrich
|
</textarea>
|
437 |
|
|
<script language="javascript">
|
438 |
|
|
update_description(document.forms[0].optimization.selectedIndex);
|
439 |
|
|
</script>
|
440 |
05603c34
|
Scott Ullrich
|
<br><span class="vexpl"><b>Select which type of state table optimization your would like to use</b></td>
|
441 |
416ed28d
|
Scott Ullrich
|
</tr>
|
442 |
f1a5cfb8
|
Scott Ullrich
|
|
443 |
19b08f97
|
Scott Ullrich
|
<tr>
|
444 |
|
|
<td width="22%" valign="top" class="vncell">Disable Firewall</td>
|
445 |
|
|
<td width="78%" class="vtable">
|
446 |
|
|
<input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> onclick="enable_change(false)">
|
447 |
|
|
<strong>Disable the firewalls filter altogether.</strong><br>
|
448 |
091ac305
|
Scott Ullrich
|
<span class="vexpl">Note: This basically converts pfSense into a routing only platform!</span></td>
|
449 |
19b08f97
|
Scott Ullrich
|
</tr>
|
450 |
|
|
|
451 |
351217ed
|
Scott Ullrich
|
<tr>
|
452 |
|
|
<td width="22%" valign="top" class="vncell">Firewall Maximum States</td>
|
453 |
|
|
<td width="78%" class="vtable">
|
454 |
|
|
<input name="maximumstates" type="input" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" onclick="enable_change(false)"><br>
|
455 |
|
|
<strong>Maximum number of connections to hold in the firewall state table.</strong><br>
|
456 |
091ac305
|
Scott Ullrich
|
<span class="vexpl">Note: Leave this blank for the default of 10000</span></td>
|
457 |
351217ed
|
Scott Ullrich
|
</tr>
|
458 |
|
|
|
459 |
416ed28d
|
Scott Ullrich
|
<tr>
|
460 |
|
|
<td width="22%" valign="top"> </td>
|
461 |
|
|
<td width="78%">
|
462 |
|
|
<input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
|
463 |
|
|
</td>
|
464 |
|
|
</tr>
|
465 |
19b08f97
|
Scott Ullrich
|
<tr>
|
466 |
|
|
<td colspan="2" class="list" height="12"></td>
|
467 |
|
|
</tr>
|
468 |
416ed28d
|
Scott Ullrich
|
|
469 |
|
|
|
470 |
|
|
|
471 |
|
|
|
472 |
|
|
|
473 |
|
|
|
474 |
5b237745
|
Scott Ullrich
|
</table>
|
475 |
|
|
</form>
|
476 |
|
|
<script language="JavaScript">
|
477 |
|
|
<!--
|
478 |
|
|
enable_change(false);
|
479 |
f5e7f73c
|
Holger Bauer
|
//enable_altfirmwareurl(false);
|
480 |
|
|
//enable_altpkgconfigurl(false);
|
481 |
5b237745
|
Scott Ullrich
|
//-->
|
482 |
|
|
</script>
|
483 |
|
|
<?php include("fend.inc"); ?>
|
484 |
|
|
</body>
|
485 |
|
|
</html>
|