mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
* Use correct ftp-proxy arguments
This commit is contained in:
parent
f80d5538fe
commit
855d186191
@ -569,13 +569,13 @@ function filter_nat_rules_generate()
|
||||
if($int && $external_address && $internal_address) {
|
||||
$natrules .= "# FTP Helper binat\n";
|
||||
$natrules .= "no binat on {$int} proto tcp from any to {$external_address} port 21\n";
|
||||
$helpers = exec("/bin/ps awux | grep \"\-p 21 {$internal_address} {$external_address}\" | grep -v grep");
|
||||
$helpers = exec("/bin/ps awux | grep \"\-p 21 -R {$internal_address} -b {$external_address}\" | grep -v grep");
|
||||
if(!$helpers) {
|
||||
/* Get the ftp queue for this interface */
|
||||
if (isset($config['interfaces'][$rule['interface']]['ftpqueue']))
|
||||
$shaper_queue = $config['interfaces'][$rule['interface']]['ftpqueue'];
|
||||
/* else default queue configured on shaper will get this */
|
||||
$after_filter_configure_run[] = "/usr/local/sbin/ftp-proxy {$shaper_queue} -p 21 {$internal_address} {$external_address} -T PFFTPPROXY";
|
||||
$after_filter_configure_run[] = "/usr/local/sbin/ftp-proxy {$shaper_queue} -p 21 -R {$internal_address} -b {$external_address} -T PFFTPPROXY";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ if ($_POST) {
|
||||
if($a_1to1[$id]['useftphelper']) {
|
||||
if($a_1to1[$id]['external'] != $_POST['external'] or
|
||||
$a_1to1[$id]['internal'] != $_POST['internal'] or !$_POST['useftphelper']) {
|
||||
$helpers = `/bin/ps awux | grep "p 21 {$a_1to1[$id]['internal']} {$a_1to1[$id]['external']}" | grep -v grep | awk '{ print $2 }'`;
|
||||
$helpers = `/bin/ps awux | grep "p 21 -R {$a_1to1[$id]['internal']} -b {$a_1to1[$id]['external']}" | grep -v grep | awk '{ print $2 }'`;
|
||||
if($helpers)
|
||||
exec("kill $helpers");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user