Add GeoIP location to the header

Hello

We need to see in our servers that packets include country code/name header?

Is is possible in F5 to enable this feature ?

Or to create an Irule that does that ?

Thanks!

Will need an iRule using the whereis command to get information you want (https://clouddocs.f5.com/api/irules/whereis.html)

whereis <ip> [country | continent | state | abbrev | city | zip | area_code | latitude | longitude | isp | org | country_cf | state_cf | city_cf | proxy_type]+

Example to add 2 letter country code (https://www.iso.org/obp/ui/#search/code/) into a header named geoheader based on the client IP address in the request:

when HTTP_REQUEST {
    HTTP::header insert geoheader [whereis [IP::client_addr] country]
}