Forum Discussion
iRule that source SNATs based on destination
We have a server pool in an Internet DMZ that requires the source IP addresses of the servers to be translated into the VS IP address when it's communicating with the Internet. The servers also need to communicate with internal resources using their real IP addresses. I'm new to iRules so I'm wondering if the following is close to correct and/or is there a better way to accomplish it?
when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals 10.0.0.0/8] or [IP::addr [IP::client_addr] equals 192.168.0.0/16] } { snat none } elseif { snat 1.1.1.1 } }
1 Reply
- nitass
Employee
it is wildcard (0.0.0.0:0/0) virtual server,isn't it? i understand you have to also check destination ip in irule for not using snat.
IP::server_addr
https://devcentral.f5.com/wiki/iRules.IP__server_addr.ashx
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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