The ever versatile NetScaler has some tricks up it’s sleeve with some slick applications of the GSLB location Database. The primary use of the GSLB location database is for GSLB decision making like static proximity, but NetScaler engineers went the extra mile and made it available for other uses as well. Using the GSLB location database will reduce configuration and also simplifies the management of the NetScaler policies where the list of IP addresses is large. This IP list is static, to have a dynamic IP list and a more powerful mechanism one must consider http callout.

Here are some of the common use cases outside of GSLB.

# 1 Content switching based on the IP address to allow only a certain set of IPs

#2  Making specific responder policies, like sending redirects for specific IPs based on location

A sample GSLB location database file.

NSGEO1.0

Start

10.0.17.33, 10.0.17.33, allowed

10.0.17.34, 10.0.17.34, allowed

10.0.8.142, 10.0.8.142, allowed

10.0.8.143, 10.0.8.143, allowed

10.200.128.132, 10.200.128.132, allowed

# 1 Content switching based on the IP address.

Now one can add a CS policy as follows

add responder policy restricted_relays “CLIENT.IP.SRC.MATCHES_LOCATION(\”allowed\”).NOT” RESET (or DROP)

Also refer to article http://support.citrix.com/article/CTX121561  for more content switching based examples using GSLB location file.

#2 Making specific responder policies, like sending redirects for specific IPs based on location

add responder action Redirect_to_SF redirect “\”https://sfcustomerwebsite.com\“”

add responder policy CA “CLIENT.IP.SRC.MATCHES_LOCATION(\”North America.US.ER.California.*.*\”) ” Redirect_to_SF

Couple of things to note

* The GSLB  location database file is not synchronized across a HA pair

*  There can only be only custom GSLB location database file per NetScaler.

*  Changes to the  GSLB location database file needs reload using the add locationfile command.