diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-05 02:00:17 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-05 02:00:17 +0000 |
commit | 9afcc3f41857a06a84acc14e0d7fd4dab626ce3a (patch) | |
tree | ade75b5ce48a3a63c6a5f16246da8f2571c2a1d9 /etc/inc | |
parent | 6e65863d80c775731a54249320a0518aa64a58af (diff) | |
download | pfsense-9afcc3f41857a06a84acc14e0d7fd4dab626ce3a.zip pfsense-9afcc3f41857a06a84acc14e0d7fd4dab626ce3a.tar.gz |
operate on port forwards inside nat
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/filter.inc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index a3c4479..a569722 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -351,19 +351,6 @@ function filter_nat_rules_generate_if($if, $src, $srcport, $dst, $natport, $targ $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}"); - if(!$helpers) - mwexec_bg("/usr/local/sbin/pftpx -c 81 -f {$dst} -g 81"); - } - } - return $natrule; } @@ -610,6 +597,19 @@ function filter_nat_rules_generate() { "rdr on $natif proto {$rule['protocol']} from any to {$extaddr} port {$extport[0]}:{$extport[1]} -> {$target} port {$extport[0]}:*"; } + /* + * If FTP Proxy Helper is enbabled and the + * operator has requested a port forward to + * a ftp server then launch a helper + */ + if($target <> "") { + if($natport == "21" and !$config['system']['disableftpproxy']) { + $helpers = exec("ps awux | grep pftpx | grep {$target}"); + if(!$helpers) + mwexec_bg("/usr/local/sbin/pftpx -c 81 -f {$target} -g 81"); + } + } + $natrules .= "\n"; } } |