xt_geoip_query(1)

xt_geoip_query (em dump a country database to stdout xt_geoip_query [-D database_dir] [-4] [-6] cc [

Section 1 xtables-addons-common bookworm source

Description

xt_geoip_query

Name

xt_geoip_query — dump a country database to stdout

Syntax

xt_geoip_query [-D database_dir] [-4] [-6] cc [ cc ... ]

Description

xt_geoip_query reads a country’s IPv4 or IPv6 databases and dumps them to standard output as a sorted, non-overlapping list of ranges (which is how they are represented in the database), suitable for browsing or further processing.
-D
database_dir

Specifies the directory into which the files have been put. Defaults to ".".

-4

Specifies IPv4 data only.

-6

Specifies IPv6 data only.

cc [ cc ... ]

The ISO-3166 country code names of the desired countries’ databases.

Application

Shell command to dump the list of Swiss IPv6 address ranges:

xt_geoip_query -D /usr/share/xt_geoip -6 ch

See also

xt_geoip_build(1)