ltm rule command LB snatΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

LB::snat
       Returns information on the SNAT configuration for the current connection.

SYNOPSIS
       LB::snat

DESCRIPTION
       This command returns information on the SNAT configuration for the current connection.

       Possible output values are those which can be set by the snat and snatpool commands.

RETURN VALUE
       LB::snat

       Returns a TCL list based on the current connection's SNAT configuration. The possible values seem to be
       'none', 'automap', 'snatpool , 'snat '. The 'snat ' output only seems
       to be logged when snat is explicitly set using 'snat ' in an iRule.

VALID DURING
       ANY_EVENT

EXAMPLES
	when CLIENT_ACCEPTED {
	    # Check if SNAT is enabled on the VIP
	    if {[LB::snat] eq "none"}{
		log local0. "Snat disabled on [virtual name]"
	    } else {
		log local0. "Snat enabled on [virtual name].  Currently set to [LB::snat]"
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-10.0.0 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)