Forum Discussion
Derek_Rice_2913
Nimbostratus
Jul 24, 2017iRule to SNAT only for requests sent to specific destination.
Obligatory, newish to iRule. Wondering if this iRule will take any requests from 1.1.1.1 destined for IP specified in "remote_net" class will and SNAT them, otherwise no SNAT. I think this will work, just looking for confirmation.
when CLIENT_ACCEPTED {
if { ([class match [IP::client_addr] equals 1.1.1.1]) and ([class match [IP::remote_addr] equals remote_net]) } {
snatpool snatpool_remote
}
}
- Faruk_AYDIN
Nimbostratus
do not use "class match" in the first part of your "if" clause. Use "IP:addr" command:
when CLIENT_ACCEPTED { if { ([IP::addr [IP::client_addr] equals 1.1.1.1]) and ([class match [IP::remote_addr] equals remote_net]) } { snatpool snatpool_remote } }
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