GTM return LDNS IP to client

Problem this snippet solves:

We do a lot of our load balancing based on topology rules, so it's often very useful to know where the DNS request is actually coming from rather than just the client's IP and the DNS servers they have configured. Especially if they're behind an ADSL router doing NAT or some other similar set up.

This rule simply returns the IP address of the LDNS that eventually made the query to the GTM device in the response to a lookup for the WideIP using the rule, as well as logging the response and perceived location.

Code :

rule "DNS_debug" partition "Common" {
   when DNS_REQUEST {
        host [IP::client_addr]
        log local0.err "Debug address : [IP::client_addr] [whereis [IP::client_addr]]"
  }
}
Published Mar 17, 2015
Version 1.0
  • I have a scenario where we are using Wide IP based on Topology pools. Basically we are directing clients to a different IP, based on a client's location.

    The problem we are faced with is that the client has a couple of DNS in different states, depending on what DNS Server they use they end up on a different IP. 

    This problematic because this requires to stay on the same IP, for a long time since the IP behind the VIP is an APM SSL VPN remote access.

    How can we make sure the topology is based on the Client's location and not their DNS?

    Running DNS BigIP v.17