Forum Discussion
cerpika_14370
Nimbostratus
Aug 26, 2010Exclude servers from SNAT automap
Hello, I have a question regarding excluding 2 servers from a snat automap. The BIG-IP has SNAT automap set, and a forwarding virtual server to make sure the servers behind the BIG-IP find their appropriate outbound route.
I need to find a way to exclude these two servers from being SNAT'd. All of the other servers (which there are many) still need to be SNAT'd.
I cant find a way to exclude these 2 servers from being SNAT'd. It seems that with a global SNAT automap, you cannot explicity exclude IPs from the SNAT. When you create the SNAT you can explicitly include IPs, but not exclude.
I wrote an iRule for the forwarding virtual server to try and exclude these servers from being SNAT'd, however that does not seem to have an effect, as the SNAT that is doing the SNATting is a global SNAT.
What are my options here?
TIA
- Chris_Miller
Altostratus
Are the servers you're trying to exclude sending traffic outbound and that's where you'd like to prevent them from being SNATed? Or are they receiving inbound traffic and when they're selected, you'd like to keep the traffic from being SNATed on the way to them? - George_Watkins_Historic F5 AccountHi cerpika,
when LB_SELECTED { if { [[IP::server_addr] != 10.0.0.1] or [[IP::server_addr] != 10.0.0.2] } { snat automap } }
when LB_SELECTED { switch -glob [IP::server_addr] { 10.0.0.1 - 10.0.0.2 { } default { snat automap } } }
- JRahm
Admin
Interesting. I would have gone with the snat none approach. I wonder if there is a performance hit for snat automap called in an iRule versus applied as profile in the virtual? - Colin_Walker_12Historic F5 AccountGood question Jason. I guess the opposite approach with the same functionality would be to turn on snat automap in the profile and then just say:
when LB_SELECTED { switch -glob [IP::server_addr] { 10.0.0.1 - 10.0.0.2 { snat none } } }
- Chris_Miller
Altostratus
Each of these examples assumes he's SNATing inbound traffic üòõwhen CLIENT_ACCEPTED { switch -glob [IP::client_addr] { 10.0.0.1 - 10.0.0.2 { snat none } } }
- Colin_Walker_12Historic F5 AccountCurse you, details, you elude me yet again!!!!11
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