Forum Discussion

adharkrader's avatar
Icon for Nimbostratus rankNimbostratus
Sep 29, 2011

See 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

  • 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.


         log local0. "Source IP address for connection to node: [IP::local_addr]"

    I hope this helps


  • 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: