diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-31 21:34:54 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-31 21:34:54 +0000 |
commit | 16ee67062a29b4dcd11e29ed464e800923ece232 (patch) | |
tree | bc895dccf3f3850e67a7b32909c1e2db7ee72dd7 /etc/inc | |
parent | 0ab19c0e508a926ff206e4af103abbc092ae8b29 (diff) | |
download | pfsense-16ee67062a29b4dcd11e29ed464e800923ece232.zip pfsense-16ee67062a29b4dcd11e29ed464e800923ece232.tar.gz |
MFC 7280
Correctly check for FTP helper on port 21.
NOTE that a rule permitting traffic to the EXTERNAL ip and port 21 is required for this.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/filter.inc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index bad73e0..e201e17 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -618,12 +618,11 @@ function filter_nat_rules_generate() { * a ftp server then launch a helper */ if($target <> "") { - if($extport[0] == "21" and !$config['system']['disableftpproxy']) { - $helpers = exec("ps aux | grep pftpx | grep {$target}"); - echo "{$helpers}\n"; + if($extport[0] == "21" and !isset($config['system']['disableftpproxy'])) { + $helpers = exec("ps aux | grep pftpx | grep -v grep | grep {$target}"); if(!$helpers) { /* install a pftpx helper, do not set a rule */ - mwexec_bg("/usr/local/sbin/pftpx -b {$extaddr} -c 21 -f {$target} -g 21"); + mwexec_bg("/usr/local/sbin/pftpx -b {$rule['external-address']} -c 21 -f {$target} -g 21"); continue; } } @@ -2037,4 +2036,4 @@ function return_vpn_subnet($adr) { return " # error - {$adr['network']} "; } -?>
\ No newline at end of file +?> |