For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Per_71362's avatar
Per_71362
Icon for Nimbostratus rankNimbostratus
Nov 08, 2013

Get IP addresses from tmsh/GUI created snatpool in iRule

Hi,

Having a snatpool created from the tmsh/GUI, is there a way to get the snatpool IP address(es) from within an iRule?

The snatpool for the virtual server can be found with LB::snat and it returns "/Common/snatpoolname". I'd like to put the snatpool IP address from a tmsh/GUI created snatpool in a DNS answer created by the F5:

    when DNS_REQUEST {  
            DNS::answer insert "routedomain.is.[ROUTE::domain].and.your.external.ip.is. 111 [DNS::question class] [DNS::question type] "
            DNS::return  
    }

Since this request/answer only involves the client and the F5 I can't seem to use the

IP::
to get the snat address that would've been used for this virtual server if the iRule didn't handle the answer. /Per

2 Replies

  • Formatting removed one part from the DNS::answer,

    DNS::answer insert "routedomain.is.[ROUTE::domain].and.your.external.ip.is. 111 [DNS::question class] [DNS::question type]

    snatpoolIPAddress
    "

    Per

  • I haven't been able to find a way to get the ip addresses from a tmsh/gui created snatpool. I worked around the problem by directing requests to a pool of real DNS servers. Rewriting the answer to the clients in an iRule. /Per