Commit 54c22d2c authored by Franco Fichtner's avatar Franco Fichtner

firewall: remove the old ftp proxy

FTP proxy via squid proxy server is available if needed.
parent 06b0207e
...@@ -1882,14 +1882,6 @@ function filter_nat_rules_generate(&$FilterIflist) ...@@ -1882,14 +1882,6 @@ function filter_nat_rules_generate(&$FilterIflist)
$natrules .= "\n# Load balancing\n"; $natrules .= "\n# Load balancing\n";
$natrules .= "rdr-anchor \"relayd/*\"\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 */ /* DIAG: add ipv6 NAT, if requested */
if(isset($config['diag']['ipv6nat']['enable']) && if(isset($config['diag']['ipv6nat']['enable']) &&
is_ipaddr($config['diag']['ipv6nat']['ipaddr']) && is_ipaddr($config['diag']['ipv6nat']['ipaddr']) &&
...@@ -2806,11 +2798,6 @@ function filter_rules_generate(&$FilterIflist) ...@@ -2806,11 +2798,6 @@ function filter_rules_generate(&$FilterIflist)
/* IPsec user rules from radius */ /* IPsec user rules from radius */
$ipfrules .= "anchor \"ipsec/*\"\n"; $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 # BEGIN OF firewall rules
/* default block logging? */ /* default block logging? */
$log = array("block"=>null,"pass"=>null); $log = array("block"=>null,"pass"=>null);
......
...@@ -68,7 +68,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -68,7 +68,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['reflectiontimeout'] = !empty($config['system']['reflectiontimeout']) ? $config['system']['reflectiontimeout'] : null; $pconfig['reflectiontimeout'] = !empty($config['system']['reflectiontimeout']) ? $config['system']['reflectiontimeout'] : null;
$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']); $pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']);
$pconfig['disablescrub'] = isset($config['system']['disablescrub']); $pconfig['disablescrub'] = isset($config['system']['disablescrub']);
$pconfig['ftp-proxy-client'] = isset($config['system']['ftp-proxy']['client']);
$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']); $pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']);
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pconfig = $_POST; $pconfig = $_POST;
...@@ -194,12 +193,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -194,12 +193,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($config['system']['disablescrub']); 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']) { if ($pconfig['bogonsinterval'] != $config['system']['bogons']['interval']) {
switch ($pconfig['bogonsinterval']) { switch ($pconfig['bogonsinterval']) {
case 'daily': case 'daily':
...@@ -506,8 +499,7 @@ include("head.inc"); ...@@ -506,8 +499,7 @@ include("head.inc");
</div> </div>
</td> </td>
</tr> </tr>
<?php <?php if (count($config['interfaces']) > 1): ?>
if (count($config['interfaces']) > 1) :?>
<tr> <tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></th> <th colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></th>
</tr> </tr>
...@@ -573,20 +565,7 @@ include("head.inc"); ...@@ -573,20 +565,7 @@ include("head.inc");
</div> </div>
</td> </td>
</tr> </tr>
<tr> <?php endif; ?>
<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; ?>
<tr> <tr>
<td></td> <td></td>
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" /></td> <td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" /></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment