summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-05 01:36:21 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-05 01:36:21 +0000
commitcc5ceb40486e4c1dab8c0f3109936a7ef64e8850 (patch)
tree24da9fb2aa8e615da47203fcf7ffc21c392f9650 /etc/inc
parent245388b44669c1bd62f73ffa0a66682c7fe884b6 (diff)
downloadpfsense-cc5ceb40486e4c1dab8c0f3109936a7ef64e8850.zip
pfsense-cc5ceb40486e4c1dab8c0f3109936a7ef64e8850.tar.gz
If FTP Proxy Helper is enbabled and the
operator has requested a port forward to a ftp server then launch a helper
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 2d08ca1..8618df6 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -349,9 +349,21 @@ function filter_nat_rules_generate_if($if, $src, $srcport, $dst, $natport, $targ
if ($natport)
$second_half_of_rule .= " port {$natport}";
-
$natrule = "{$nat} on {$if} from {$src} to {$dst} {$second_half_of_rule}\n";
+ /*
+ * If FTP Proxy Helper is enbabled and the
+ * operator has requested a port forward to
+ * a ftp server then launch a helper
+ */
+ if($dst <> "") {
+ if($natport == "21" and $config['system']['disableftpproxy'] <> "") {
+ $helpers = exec("ps awux | grep pftpx | grep {$dst} | cut -d\" \" -f5");
+ mwexec("/bin/kill {$helpers}");
+ mwexec_bg("/usr/local/sbin/pftpx -c 81 -f {$dst} -g 81");
+ }
+ }
+
return $natrule;
}
OpenPOWER on IntegriCloud