GEO IP commands
ip2country_name(ip) — Returns the GEO information (country name) of an IP address.
Ip2countryProv_name(ip) — Returns the GEO information (country name + possible province name) of an IP address.
ip2country_name(ip)
Returns the GEO information (country name) of an IP address.
Syntax
Ip2country_name(ip);
Arguments
Name | Description |
---|---|
ip |
A string which specifies the IP address. |
Example
when HTTP_REQUEST { cip = IP:client_addr() cnm = ip2country_name(cip) debug(“cname %s\n”, cnm) }
FortiADC version: V5.2
Used in events: ALL
Ip2countryProv_name(ip)
Returns the GEO information (country name + possible province name) of an IP address.
Syntax
ip2countryProv_name(ip);
Arguments
Name | Description |
---|---|
ip |
A string which specifies the IP address. |
Example
when HTTP_REQUEST { cip = IP:client_addr() cnm = ip2countryProv_name(cip) debug(“cname %s\n”, cnm) }
FortiADC version: V5.2
Used in events: ALL