Forum Discussion
Cae_140395
Aug 24, 2015Nimbostratus
Apply conditional SNATPOOL
Hello all!
I am with a issue of SNAT.
My pool have pool-members from differents subnets. I need apply SNAT 10.100.2.253 when the choosen pool-members are from network 10.100.2.0/24 and the SNAT 1...
Kevin_Stewart
Aug 25, 2015Employee
I don't really think you need two separate iRules:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals DGROUP_THS] } {
snatpool [class match -value [IP::client_addr] equals DGROUP_THS]
}
}
where your datagroup includes two different entries:
ltm data-group internal DGROUP-THS {
records {
10.100.6.64/27 {
data SNAT_THS
}
172.26.160.0.24 {
data SNAT_DEFAULT
}
}
type ip
}
Or if you just have a default SNAT for anything that's not in the 10.100.6.64/27 subnet:
when CLIENT_ACCEPTED {
if { [IP::addr [IP:client_addr] equals 10.100.6.64/27] } {
snatpool SNAT_THS
} else {
snatpool SNAT_DEFAULT
}
}
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