Forum Discussion
John_Ogle_45372
Nimbostratus
Aug 18, 2013SNAT iRule needed - 1:1 mappings
I have a situation where logging is needed for the admins to see the real ip addresses but I need to keep snat in place. Can someone provide a sample iRule that will allow me to make static nat mappi...
Kevin_Stewart
Employee
Aug 18, 2013At a minimum, perhaps something like this:
when CLIENTED_ACCEPTED {
switch [IP::client_addr] {
"10.10.10.10" { snat 192.169.42.10 }
"10.10.10.11" { snat 192.168.42.11 }
"10.10.10.12" { snat 192.168.42.12 }
"10.10.10.13" { snat 192.168.42.13 }
default { snat automap }
}
}
You could also do this very nicely with a datagroup definition. I'd also add that enabling an X-Forwarded-For header for HTTP traffic is as easy as enabling it in the HTTP profile.
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