Forum Discussion
agehring_229714
Nimbostratus
Aug 04, 2016iRule to modify part of IP::client_addr
I'm trying to use an iRule to modify the client_addr to use as the snat.
client IP = 10.10.10.201 desired NAT = 192.168.1.201
Something like:
if { [matchclass [IP::client_addr] equals NAT_Clients]} {
snat using this source address
snat 192.168.1.$current_host_ip_last_octet
How would one go about doing that? using set and concat?
2 Replies
- Greg_Labelle
Nimbostratus
set lastoctet [getfield [IP::client_addr] "." 4]
Should do the trick for you
Hi Agehring,
you may try the syntax below...
snat "192.168.1.[getfield [IP::client_addr] "." 4]"Cheers, Kai
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