Fortinet black logo

GEO IP commands

Copy Link
Copy Doc ID 65767403-7ad4-11ea-9384-00505692583a:51089
Download PDF

GEO IP commands

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.

Examples

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.

Examples

when HTTP_REQUEST {

cip = IP:client_addr()

cnm = ip2countryProv_name(cip)

debug(“cname %s\n”, cnm)

}

FortiADC version: V5.2

Used in events: ALL

GEO IP commands

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.

Examples

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.

Examples

when HTTP_REQUEST {

cip = IP:client_addr()

cnm = ip2countryProv_name(cip)

debug(“cname %s\n”, cnm)

}

FortiADC version: V5.2

Used in events: ALL