56 |
56 |
$pconfig['polling_enable'] = isset($config['system']['polling']);
|
57 |
57 |
$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']);
|
58 |
58 |
$pconfig['disablenatreflection'] = $config['system']['disablenatreflection'];
|
|
59 |
$pconfig['disablechecksumoffloading'] = $config['system']['disablechecksumoffloading'];
|
59 |
60 |
|
60 |
61 |
if ($_POST) {
|
61 |
62 |
|
... | ... | |
98 |
99 |
}
|
99 |
100 |
}
|
100 |
101 |
|
101 |
|
if (!$input_errors) {
|
102 |
|
if($_POST['disablefilter'] == "yes") {
|
103 |
|
$config['system']['disablefilter'] = "enabled";
|
104 |
|
} else {
|
105 |
|
unset($config['system']['disablefilter']);
|
106 |
|
}
|
107 |
|
if($_POST['enablesshd'] == "yes") {
|
108 |
|
$config['system']['enablesshd'] = "enabled";
|
109 |
|
touch("{$g['tmp_path']}/start_sshd");
|
110 |
|
} else {
|
111 |
|
unset($config['system']['enablesshd']);
|
112 |
|
mwexec("/usr/bin/killall sshd");
|
113 |
|
}
|
114 |
|
$oldsshport = $config['system']['ssh']['port'];
|
115 |
|
$config['system']['ssh']['port'] = $_POST['sshport'];
|
116 |
|
|
117 |
|
if($_POST['polling_enable'] == "yes") {
|
118 |
|
$config['system']['polling'] = true;
|
119 |
|
setup_polling();
|
120 |
|
} else {
|
121 |
|
unset($config['system']['polling']);
|
122 |
|
setup_polling();
|
123 |
|
}
|
124 |
|
|
125 |
|
if($_POST['sharednet'] == "yes") {
|
126 |
|
$config['system']['sharednet'] = true;
|
127 |
|
system_disable_arp_wrong_if();
|
128 |
|
} else {
|
129 |
|
unset($config['system']['sharednet']);
|
130 |
|
system_enable_arp_wrong_if();
|
131 |
|
}
|
132 |
|
|
133 |
|
if($_POST['rfc959workaround'] == "yes")
|
134 |
|
$config['system']['rfc959workaround'] = "enabled";
|
135 |
|
else
|
136 |
|
unset($config['system']['rfc959workaround']);
|
137 |
|
|
138 |
|
if($_POST['scrubnodf'] == "yes")
|
139 |
|
$config['system']['scrubnodf'] = "enabled";
|
140 |
|
else
|
141 |
|
unset($config['system']['scrubnodf']);
|
142 |
|
|
143 |
|
if($_POST['ipv6nat_enable'] == "yes") {
|
144 |
|
$config['diag']['ipv6nat']['enable'] = true;
|
145 |
|
$config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr'];
|
146 |
|
} else {
|
147 |
|
unset($config['diag']['ipv6nat']['enable']);
|
148 |
|
unset($config['diag']['ipv6nat']['ipaddr']);
|
149 |
|
}
|
150 |
|
$oldcert = $config['system']['webgui']['certificate'];
|
151 |
|
$oldkey = $config['system']['webgui']['private-key'];
|
152 |
|
$config['system']['webgui']['certificate'] = base64_encode($_POST['cert']);
|
153 |
|
$config['system']['webgui']['private-key'] = base64_encode($_POST['key']);
|
154 |
|
if($_POST['disableconsolemenu'] == "yes") {
|
155 |
|
$config['system']['disableconsolemenu'] = true;
|
156 |
|
auto_login(true);
|
157 |
|
} else {
|
158 |
|
unset($config['system']['disableconsolemenu']);
|
159 |
|
auto_login(false);
|
160 |
|
}
|
161 |
|
unset($config['system']['webgui']['expanddiags']);
|
162 |
|
$config['system']['optimization'] = $_POST['optimization'];
|
163 |
|
|
164 |
|
if($_POST['disablefirmwarecheck'] == "yes")
|
165 |
|
$config['system']['disablefirmwarecheck'] = true;
|
166 |
|
else
|
167 |
|
unset($config['system']['disablefirmwarecheck']);
|
168 |
|
|
169 |
|
if ($_POST['enableserial'] == "yes")
|
170 |
|
$config['system']['enableserial'] = true;
|
171 |
|
else
|
172 |
|
unset($config['system']['enableserial']);
|
173 |
|
|
174 |
|
if($_POST['harddiskstandby'] <> "") {
|
175 |
|
$config['system']['harddiskstandby'] = $_POST['harddiskstandby'];
|
176 |
|
system_set_harddisk_standby();
|
177 |
|
} else
|
178 |
|
unset($config['system']['harddiskstandby']);
|
179 |
|
|
180 |
|
if ($_POST['noantilockout'] == "yes")
|
181 |
|
$config['system']['webgui']['noantilockout'] = true;
|
182 |
|
else
|
183 |
|
unset($config['system']['webgui']['noantilockout']);
|
184 |
|
|
185 |
|
/* Firewall and ALTQ options */
|
186 |
|
$config['system']['maximumstates'] = $_POST['maximumstates'];
|
187 |
|
|
188 |
|
if($_POST['enablesshd'] == "yes") {
|
189 |
|
$config['system']['enablesshd'] = $_POST['enablesshd'];
|
190 |
|
} else {
|
191 |
|
unset($config['system']['enablesshd']);
|
192 |
|
}
|
193 |
|
|
194 |
|
if($_POST['disablenatreflection'] == "yes") {
|
195 |
|
$config['system']['disablenatreflection'] = $_POST['disablenatreflection'];
|
196 |
|
} else {
|
197 |
|
unset($config['system']['disablenatreflection']);
|
198 |
|
}
|
199 |
|
|
200 |
|
$config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
|
201 |
|
|
202 |
|
$config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false;
|
203 |
|
$config['filter']['bypassstaticroutes'] = $_POST['bypassstaticroutes'] ? true : false;
|
204 |
|
|
205 |
|
write_config();
|
206 |
|
|
207 |
|
$retval = 0;
|
208 |
|
|
209 |
|
if(stristr($retval, "error") <> true)
|
210 |
|
$savemsg = get_std_save_message($retval);
|
211 |
|
else
|
212 |
|
$savemsg = $retval;
|
213 |
|
|
214 |
|
$retval = filter_configure();
|
215 |
|
|
216 |
|
conf_mount_rw();
|
217 |
|
|
218 |
|
setup_serial_port();
|
219 |
|
|
220 |
|
setup_filter_bridge();
|
221 |
|
|
222 |
|
conf_mount_ro();
|
223 |
|
|
224 |
|
}
|
225 |
102 |
}
|
226 |
103 |
|
227 |
104 |
$pgtitle = "System: Advanced functions";
|
... | ... | |
543 |
420 |
<strong>Disables the automatic creation of NAT redirect rules for access to your public IP addresses from within your internal networks. Note: Reflection only works on port forward type items and does not work for large ranges > 500 ports.</strong>
|
544 |
421 |
</td>
|
545 |
422 |
</tr>
|
|
423 |
<tr>
|
|
424 |
<td colspan="2" class="list" height="12"> </td>
|
|
425 |
</tr>
|
|
426 |
<tr>
|
|
427 |
<td width="22%" valign="top"> </td>
|
|
428 |
<td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td>
|
|
429 |
</tr>
|
|
430 |
<tr>
|
|
431 |
<td colspan="2" class="list" height="12"> </td>
|
|
432 |
</tr>
|
|
433 |
<tr>
|
|
434 |
<td colspan="2" valign="top" class="listtopic">Hardware Checksum Offloading</td>
|
|
435 |
</tr>
|
|
436 |
<tr>
|
|
437 |
<td width="22%" valign="top" class="vncell">Disable Hardware Checksum Offloading</td>
|
|
438 |
<td width="78%" class="vtable">
|
|
439 |
<input name="disablechecksumoffloading" type="checkbox" id="disablechecksumoffloading" value="yes" <?php if (isset($config['system']['disablechecksumoffloading'])) echo "checked"; ?> onclick="enable_change(false)" />
|
|
440 |
<strong>Checking this option will prevent hardware checksum offloading. FreeBSD sometimes has difficulties with certain drivers.</strong>
|
|
441 |
</td>
|
|
442 |
</tr>
|
546 |
443 |
<tr>
|
547 |
444 |
<td width="22%" valign="top"> </td>
|
548 |
445 |
<td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td>
|
... | ... | |
570 |
467 |
if ($_POST) {
|
571 |
468 |
ob_flush();
|
572 |
469 |
flush();
|
573 |
|
sleep(1) ;
|
574 |
470 |
if (!$input_errors) {
|
575 |
471 |
if($_POST['disablefilter'] == "yes") {
|
576 |
472 |
$config['system']['disablefilter'] = "enabled";
|
... | ... | |
603 |
499 |
system_enable_arp_wrong_if();
|
604 |
500 |
}
|
605 |
501 |
|
|
502 |
if($_POST['scrubnodf'] == "yes")
|
|
503 |
$config['system']['scrubnodf'] = "enabled";
|
|
504 |
else
|
|
505 |
unset($config['system']['scrubnodf']);
|
|
506 |
|
606 |
507 |
if($_POST['rfc959workaround'] == "yes")
|
607 |
508 |
$config['system']['rfc959workaround'] = "enabled";
|
608 |
509 |
else
|
... | ... | |
659 |
560 |
unset($config['system']['enablesshd']);
|
660 |
561 |
}
|
661 |
562 |
|
|
563 |
if($_POST['disablechecksumoffloading'] == "yes") {
|
|
564 |
$config['system']['disablechecksumoffloading'] = $_POST['disablechecksumoffloading'];
|
|
565 |
} else {
|
|
566 |
unset($config['system']['disablechecksumoffloading']);
|
|
567 |
}
|
|
568 |
|
662 |
569 |
if($_POST['disablenatreflection'] == "yes") {
|
663 |
570 |
$config['system']['disablenatreflection'] = $_POST['disablenatreflection'];
|
664 |
571 |
} else {
|
665 |
572 |
unset($config['system']['disablenatreflection']);
|
666 |
573 |
}
|
667 |
574 |
|
668 |
|
$config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
|
669 |
|
|
|
575 |
$config['ipsec']['preferoldsa'] = $_POST['preferoldsa_enable'] ? true : false;
|
670 |
576 |
$config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false;
|
|
577 |
$config['filter']['bypassstaticroutes'] = $_POST['bypassstaticroutes'] ? true : false;
|
671 |
578 |
|
672 |
579 |
write_config();
|
673 |
580 |
|
... | ... | |
678 |
585 |
$savemsg = get_std_save_message($retval);
|
679 |
586 |
else
|
680 |
587 |
$savemsg = $retval;
|
681 |
|
$retval |= interfaces_optional_configure();
|
|
588 |
|
682 |
589 |
config_unlock();
|
683 |
590 |
|
|
591 |
setup_filter_bridge();
|
|
592 |
|
|
593 |
conf_mount_rw();
|
|
594 |
|
684 |
595 |
setup_serial_port();
|
685 |
596 |
|
686 |
597 |
setup_filter_bridge();
|
687 |
598 |
|
|
599 |
conf_mount_ro();
|
|
600 |
|
|
601 |
|
688 |
602 |
}
|
689 |
603 |
}
|
690 |
604 |
|