Load balancing rule should be created in the rules section. Duh!

This commit is contained in:
Scott Ullrich 2005-01-23 04:33:55 +00:00
parent 523cb5049f
commit e5524b565a

View File

@ -663,20 +663,6 @@ function filter_nat_rules_generate() {
}
}
/* Setup outgoing NAT load balancing */
if (isset($config['nat']['outgoingloadbalancing']['rule'])) {
$tmprules .= "pass in on " . $lanif . " route-to { ";
$isfirst = 0;
foreach ($config['nat']['outgoingloadbalancing']['rule'] as $rule) {
if($rule['gatewayip'] <> "") {
if(isfirst == 1) $tmprules .= ", ";
$tmprules .= " (" . $wanif . " " . $rule['gatewayip'] . ") ";
$isfirst = 1;
}
}
$tmprules .= "} round-robin proto tcp from " . $lansa ." to any flags S/SA modulate state\n";
if($isfirst == 1) $natrules .= $tmprules;
}
/* outbound rules - advanced or standard */
if (isset($config['nat']['advancedoutbound']['enable'])) {
@ -921,6 +907,21 @@ EOD;
}
}
/* Setup outgoing NAT load balancing */
if (isset($config['nat']['outgoingloadbalancing']['rule'])) {
$tmprules .= "pass in on " . $lanif . " route-to { ";
$isfirst = 0;
foreach ($config['nat']['outgoingloadbalancing']['rule'] as $rule) {
if($rule['gatewayip'] <> "") {
if(isfirst == 1) $tmprules .= ", ";
$tmprules .= " (" . $wanif . " " . $rule['gatewayip'] . ") ";
$isfirst = 1;
}
}
$tmprules .= "} round-robin proto tcp from " . $lansa ." to any flags S/SA modulate state\n";
if($isfirst == 1) $ipfrules .= $tmprules;
}
/* pass traffic between statically routed subnets and the subnet on the
interface in question to avoid problems with complicated routing
topologies */