mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Load balancing rule should be created in the rules section. Duh!
This commit is contained in:
parent
523cb5049f
commit
e5524b565a
@ -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 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user