mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
firewall: remove the old ftp proxy
FTP proxy via squid proxy server is available if needed.
This commit is contained in:
parent
06b0207eb9
commit
54c22d2c0f
@ -1882,14 +1882,6 @@ function filter_nat_rules_generate(&$FilterIflist)
|
||||
$natrules .= "\n# Load balancing\n";
|
||||
$natrules .= "rdr-anchor \"relayd/*\"\n";
|
||||
|
||||
if (isset($config['system']['ftp-proxy']['client'])) {
|
||||
$natrules .= "\n# FTP proxy\n";
|
||||
$natrules .= "nat-anchor \"ftp-proxy/*\"\n";
|
||||
$natrules .= "rdr-anchor \"ftp-proxy/*\"\n";
|
||||
$natrules .= "rdr pass proto tcp to port ftp -> 127.0.0.1 port 8021\n";
|
||||
mwexec('service ftp-proxy onerestart');
|
||||
}
|
||||
|
||||
/* DIAG: add ipv6 NAT, if requested */
|
||||
if(isset($config['diag']['ipv6nat']['enable']) &&
|
||||
is_ipaddr($config['diag']['ipv6nat']['ipaddr']) &&
|
||||
@ -2806,11 +2798,6 @@ function filter_rules_generate(&$FilterIflist)
|
||||
/* IPsec user rules from radius */
|
||||
$ipfrules .= "anchor \"ipsec/*\"\n";
|
||||
|
||||
if (isset($config['system']['ftp-proxy']['client'])) {
|
||||
$ipfrules .= "\nanchor \"ftp-proxy/*\"\n";
|
||||
$ipfrules .= "pass out quick proto tcp from 127.0.0.1 to port ftp\n";
|
||||
}
|
||||
|
||||
# BEGIN OF firewall rules
|
||||
/* default block logging? */
|
||||
$log = array("block"=>null,"pass"=>null);
|
||||
|
||||
@ -68,7 +68,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$pconfig['reflectiontimeout'] = !empty($config['system']['reflectiontimeout']) ? $config['system']['reflectiontimeout'] : null;
|
||||
$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']);
|
||||
$pconfig['disablescrub'] = isset($config['system']['disablescrub']);
|
||||
$pconfig['ftp-proxy-client'] = isset($config['system']['ftp-proxy']['client']);
|
||||
$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']);
|
||||
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$pconfig = $_POST;
|
||||
@ -194,12 +193,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
unset($config['system']['disablescrub']);
|
||||
}
|
||||
|
||||
if (!empty($pconfig['ftp-proxy-client'])) {
|
||||
$config['system']['ftp-proxy']['client'] = true;
|
||||
} elseif (isset($config['system']['ftp-proxy']['client'])) {
|
||||
unset($config['system']['ftp-proxy']['client']);
|
||||
}
|
||||
|
||||
if ($pconfig['bogonsinterval'] != $config['system']['bogons']['interval']) {
|
||||
switch ($pconfig['bogonsinterval']) {
|
||||
case 'daily':
|
||||
@ -506,8 +499,7 @@ include("head.inc");
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (count($config['interfaces']) > 1) :?>
|
||||
<?php if (count($config['interfaces']) > 1): ?>
|
||||
<tr>
|
||||
<th colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></th>
|
||||
</tr>
|
||||
@ -573,20 +565,7 @@ include("head.inc");
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a id="help_for_ftp_proxy_client" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("FTP Proxy");?></td>
|
||||
<td>
|
||||
<input name="ftp-proxy-client" type="checkbox" value="yes" <?= !empty($pconfig['ftp-proxy-client']) ? "checked=\"checked\"" : "";?> />
|
||||
<div class="hidden" for="help_for_ftp_proxy_client">
|
||||
<strong><?=gettext("Enable FTP proxy for clients");?></strong>
|
||||
<br />
|
||||
<?=gettext("Configures the FTP proxy to allow for client connections behind the firewall using active file transfer mode.");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" /></td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user