Forum Discussion

Wasfi_182818's avatar
Wasfi_182818
Icon for Nimbostratus rankNimbostratus
Aug 23, 2016

iRule for directing traffic to an alternative GSLB pool based on the LDNS IP

Hi;

 

I have a DNS wideip with two Pools. I want to put an iRule where as if the source IP of the user's LDNS is not within subnet 10.0.0.0/8 then Pool2 is chosen. I want to bind this iRule to the wideip. Can you please suggest a syntax for this iRule.

 

Kindly Wasfi

 

2 Replies

  • This irule is one I use to answer with different pool based on source address:

    F5 GTM : Split dns irule

    when DNS_REQUEST {
      if { [IP::addr [IP::remote_addr] equals 10.0.0.0/8] \
         or [IP::addr [IP::remote_addr] equals 192.168.0.0/16] \
         or [IP::addr [IP::remote_addr] equals 172.16.0.0/12] } {
        pool "[DNS::rrname]_PRIV"
      }
    }
    

    The internal pool name must be:

    _PRIV

  • Hi,

     

    when you created (I hope you did) the GTM listener, there is no gtm object created but a virtual server with dns profile that enable GTM and allow irule usage.