aboutsummaryrefslogtreecommitdiffstats
path: root/config/ftpproxy/ftpproxy.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-10-12 13:10:25 -0300
committerRenato Botelho <renato@netgate.com>2015-10-12 13:10:25 -0300
commit01cbf628b0c380390ea05bd0b4aec62240160c1f (patch)
treebe7817999bd1674046c811d12103d94fb605fc45 /config/ftpproxy/ftpproxy.inc
parent962d6b0bbe07c96776950a24a06043cd295ce26c (diff)
parent8bf072f84eaf475ab344fb6b9264c6d02cec677f (diff)
downloadpfsense-packages-01cbf628b0c380390ea05bd0b4aec62240160c1f.tar.gz
pfsense-packages-01cbf628b0c380390ea05bd0b4aec62240160c1f.tar.bz2
pfsense-packages-01cbf628b0c380390ea05bd0b4aec62240160c1f.zip
Merge pull request #1095 from doktornotor/patch-1
Diffstat (limited to 'config/ftpproxy/ftpproxy.inc')
-rw-r--r--config/ftpproxy/ftpproxy.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/ftpproxy/ftpproxy.inc b/config/ftpproxy/ftpproxy.inc
index 386a1d84..cc2aa27a 100644
--- a/config/ftpproxy/ftpproxy.inc
+++ b/config/ftpproxy/ftpproxy.inc
@@ -125,6 +125,11 @@ function ftpproxy_generate_rules($type) {
global $config;
$cf = $config['installedpackages']['ftpclientproxy']['config'][0];
$interface_list = explode(",", $cf['localints']);
+ if ($cf['earlyrule']) {
+ $ruletype = "pfearly";
+ } else {
+ $ruletype = "filter";
+ }
/* Proxy is not enabled, therefore, no rules/anchors. */
if ($cf["proxy_enable"] != "on") {
@@ -164,7 +169,7 @@ function ftpproxy_generate_rules($type) {
$rules .= "rdr pass on {$interface} inet proto tcp from any to any port 21 -> 127.0.0.1 port " . ftpproxy_get_port() . "\n";
}
break;
- case "filter":
+ case $ruletype:
$rules .= "anchor \"ftp-proxy/*\"\n";
// $rules = "pass out proto tcp from any to any port 21\n";
break;