Count up 8021 + interface num for FTP Proxy

Reported-by: Derrick MacPherson
This commit is contained in:
Scott Ullrich 2006-03-26 18:43:51 +00:00
parent c597d50fe9
commit 223d440435

View File

@ -1534,12 +1534,14 @@ EOD;
$ipfrules .= "# enable ftp-proxy\n";
$optcfg = array();
generate_optcfg_array($optcfg);
generate_optcfg_array($optcfg);
$ftp_counter = "8022";
foreach($optcfg as $oc) {
if(!isset($oc['gateway']) && $oc['if'] <> "") {
$ipfrules .= "pass in quick on " . $oc['if'] . " inet proto tcp from any to \$loopback port 8021 keep state label \"FTP PROXY: Allow traffic to localhost\"\n";
$ipfrules .= "pass in quick on " . $oc['if'] . " inet proto tcp from any to \$loopback port {$ftp_counter} keep state label \"FTP PROXY: Allow traffic to localhost\"\n";
$ipfrules .= "pass in quick on " . $oc['if'] . " inet proto tcp from any to \$loopback port 21 keep state label \"FTP PROXY: Allow traffic to localhost\"\n";
}
$ftp_counter++;
}
$ipfrules .= <<<EOD