Retrieve location details from user IP address using geolocation database 编辑
Note This feature is available from Citrix ADC release 12.1 build 50.x and later.
The Citrix ADC appliance can get user location details like continent, county, and city. For any public IP address from a geo location database. It is performed using the advanced policy infrastructure. The retrieved location details are then used in a rewrite action or a responder action for performing the following use cases.
- Insert an HTTP header with user location details (such as country, city information) when sending the client request to the back-end server.
- Add country name in the HTML page response for an invalid user.
The appliance can also log the location details using the audit logging mechanism.
Getting user location details using geolocation functions
The components interact as per the following:
- User sends a client request from a particular geographic location.
- The Citrix ADC appliance looks for the user IP address from the client request and retrieves the geo location details. The details include continent, country, region, city, ISP, organization, or custom details from a geolocation database.
- Once the location details are retrieved, the appliance uses either a responder policy or a rewrite policy to evaluate the request.
- In a rewrite policy, the appliance adds a header with the geo location details and sends it to the back-end server. For example, insert a custom HTTP header with country information.
- In a responder policy, the appliance evaluates the HTTP request and based on policy evaluation, allows access to the users or redirects the user to an error page. It states the region from where they are accessing the application does not have access.
Setting up geolocation database
As a pre-requisite, you must have a geolocation database to run on the Citrix ADC appliance. The geolocation database files are available with Citrix ADC firmware. To download the database files from a vendor, convert it into Citrix ADC format and import it into your appliance. For more information about the geolocation database, see Add a location file to create static proximity database topic.
Geolocation functions
The following table gives a list of geolocation functions that retrieves location details of any public IP address. These functions can be used in rewrite or responder policies.
Geolocation function | Example |
---|---|
CLIENT.IP.SRC.LOCATION | Asia.In.Karnataka.Bangalore |
CLIENT.IP.SRC.LOCATION.GET (1).LOCATION_LONG | India |
CLIENT.IP.SRC.LOCATION(3) | Asia.In.Karnataka |
CLIENT.IP.SRC.LAT_LONG | 12,77 |
CLIENT.IPV6.SRC.LOCATION | North America.US.California.Santa Clara.Verizon.Citrix |
CLIENT.IPV6.SRC.LOCATION(3) | North America.US.California |
CLIENT.IPV6.SRC.LOCATION.GET(1).LOCATION_LONG | United States |
CLIENT.IPV6.SRC.LOCATION.GET(3) | California |
CLIENT.IPV6.SRC.LAT_LONG | 36, -119 |
Configuring geolocation functions
To configure geolocation functions using advanced policy infrastructure, you must enable the load balancing, rewrite, and responder features and then complete the following use cases.
Enable load balancing, responder, rewrite features
If you want the Citrix ADC appliance to authorize user access from a particular geo location, you must enable the load balancing, rewrite, and responder features.
enable ns feature loadbalancing rewrite responder
<!--NeedCopy-->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论