Forum Discussion
Glenn_32974
Nimbostratus
Sep 17, 2010Direct traffic to proper pool after being snat'd!
Hello
I have written the following Irule (basic one) with the intention to direct traffic to a proper pool after it has been snat'd on the way out
I need to have host 10.44.17.30 get snat'ed to snatpool E_File (2 members: 190.216.X.Y & 190.145.X.Y) and after it has been snat'd choose a proper pool
According to SnatPool , iRule and tcpdumps statistics I see traffic is actually been snat'd
but I dont see either Pool Global or Pool Telmex being hit! And traffic is going out via pool Default_Gateway_Pool_SMTP instead!
when CLIENT_ACCEPTED {
if { [IP::client_addr] equals "10.44.17.30" } {
snatpool E_File
rateclass Fac_Dig
if {[IP::client_addr] equals "190.216.X.Y" }{
pool Pool_Global
pool of 1 member :201.234.X.Y:25
} elseif {
[IP::client_addr] equals "190.145.X.Y" }{
pool Pool_Telmex
pool of 1 member :190.145.X.Y:25
}
log local0. "Valid client IP: [IP::client_addr] - HostName"
else {
pool Default_Gateway_Pool_SMTP
log local0. "Valid client IP: [IP::client_addr] - HostName"
}
}
Is there something wrong with this irule?
Thansk in advanced!
Glenn
6 Replies
Sort By
- Chris_Miller
Altostratus
Since you're using "client_accepted", the traffic hasn't been SNATed and therefore LTM will see the original client IP and not the SNAT IP...I'll have to think about options here. - Glenn_32974
Nimbostratus
Hi Chris, - Chris_Miller
Altostratus
I see now...why not just make one pool that has the link for 201.234.x.y and 190.216.x.y. Then, SNAT from within the LB_SELECTED event so if the chosen pool member is the 201.234.x.y link, we use that address. - Glenn_32974
Nimbostratus
Sounds good! sorry for the delay in the response! - Chris_Miller
Altostratus
I'd do the following:when LB_SELECTED { if { [LB::server addr] eq 190.216.x.y } { snatpool snatpool_190 } elseif { [LB::server addr] eq 201.234.x.y } { snatpool snatpool_201 } }
- Glenn_32974
Nimbostratus
Hi Chris!
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