I’ve been working with f5 support trying to get this working while now but can’t seem to get it going for some reason. Essentially, I need traffic sourced from a node to be sent out a particular gateway, in this case, 10.64.20.2 (firewall interface).
I set up a 0.0.0.0/0.0.0.0 IP forwarding VS coupled with this irule
when CLIENT_ACCEPTED {
if {[[IP::client_addr] equals “10.64.40.0/24”] } {
node 10.64.40.2
}
}
The LTM floating IP (10.64.40.1) is set as the default gateway of the node, and node IP is 10.64.40.80.
It’s missing “IP::addr” to actually do the comparison:
when CLIENT_ACCEPTED {
if {[IP::addr [IP::client_addr] equals "10.64.40.0/24"] } {
node 10.64.40.2
}
}
Aaron
Would it be possible to use a class containing a subnet/gateway pair for this rule? I can’t quite figure out how to get a pair of variables to go together.
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals mynetworks] } {
pool matching.pool.name or node 10.10.10.10
}
else {
pool nonmatching.pool.name or node 20.20.20.20
}
}
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals mynetworks] } {
pool matching.pool.name or node 10.10.10.10
}
else {
pool nonmatching.pool.name or node 20.20.20.20
}
}
Hi Michael,
Looks like the source host is set to use a class variable, but the gateway(node) is still statically set? Is there a way to keep a sourceip/gateway pair matched?