Forum Discussion
aj1
Nimbostratus
Nov 23, 2014Conditional SNAT using an iRule on a Wildcard Forwarding VS
Hello everyone,
I am new to iRules and have seen a lot of answers to the issue i am currently facing, but even after referring them and trying out all the possible combinations i just can't seem to...
nitass
Employee
Nov 25, 2014Is there anyway i can get rid of that in the same irule.
you may set variable in CLIENT_ACCEPTED and then check it in SERVER_CONNECTED.
e.g.
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when CLIENT_ACCEPTED {
if { [class match -- [IP::local_addr] equals onCampus_networks] } {
set is_snat 0
snat none
} else {
set is_snat 1
snatpool snat_pool
}
}
when SERVER_CONNECTED {
if { $is_snat } {
log local0. "Client [IP::client_addr]:[TCP::client_port] \
SNATed to [IP::local_addr]:[TCP::local_port] \
connecting to [IP::remote_addr]:[TCP::remote_port]"
}
}
}
The class match didn't work out here. Not sure if this has something to do with the data-group containing multiple records.
can you post the data group?
tmsh list ltm data-group internal (name)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects