Forum Discussion
adharkrader
Nimbostratus
Sep 29, 2011See if an IP address is a member of a SNAT?
I'm in a CLIENT_ACCEPTED iRule and I'd like to see whether my source address is going to be SNATed, either to a specific SNAT or auto-map... I don't see an IP:: for that... is there a way to do that?
Thanks - Al
2 Replies
- The_Bhattman
Nimbostratus
Hi Al,
In order to detect that you are using a SNAT you would need to use event "When SERVER_CONNECTED" along with "[IP::local_addr]" which would returns the self-ip address or spoofed client IP address LTM is using for the serverside connection.
Example:when SERVER_CONNECTED { log local0. "Source IP address for connection to node: [IP::local_addr]" }
I hope this helps
Bhattman - hoolio
Cirrostratus
Hi Al,
Can you give more info on your scenario?
If you want to check the source IP address on the serverside connection, you can use Bhattman's example. Or if you want to check the SNAT config, you might be able to use LB::snat before the serverside connection is established:
http://devcentral.f5.com/wiki/iRules.lb__snat.ashx
Aaron
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