xt_geoip_query(1)
π xt_geoip_query β dump a country database to stdout π
okay bestie, so this one lives in the xtables-addons manual set, section 1 (that's user commands, iykyk). it's called xt_geoip_query and honestly? it's giving "let me just show you the goods". π
β¨ SYNTAX β¨
xt_geoip_query [-D database_dir] [-4] [-6] cc [ cc ... ]
no cap, that's the whole shape of it. flags first, then one or more country codes. periodt. π
πΈ DESCRIPTION πΈ
so what does it actually do? xt_geoip_query reads a country's IPv4 or IPv6 databases and dumps them straight to standard output as a sorted, non-overlapping list of ranges β which, fun fact, is exactly how they're represented in the database in the first place. so it's not doing any fancy remixing, it's just showing you the truth. π¦
and it's perfect for browsing, or for feeding into further processing. main character energy for your shell pipelines. β¨
-Ddatabase_dirβ tells it which directory the files have been put into. defaults to.(yes, literally just the current dir, she's low maintenance).-4β IPv4 data only, bestie. π-6β IPv6 data only. πcc[ cc ... ]β the ISO 3166 country code names of the desired countries' databases. so likech,us,deβ¦ you can pass more than one, go off. π
ngl the vibes here are extremely "read-only, harmless, safe to run". it dumps, it doesn't touch. π
π APPLICATION π
here's the shell command to dump the list of Swiss IPv6 address ranges β a certified classic:
xt_geoip_query -D /usr/share/xt_geoip -6 ch
see how it all comes together? -D for where, -6 for the v6 girlies, ch for Switzerland. ate. π₯
π SEE ALSO π
xt_geoip_build(1)β the one that makes the databases in the first place. the prequel. π§
and that's the whole page, bestie!! π«Ά this little cutie comes from xtables-addons, dated 2020-04-30, and it is genuinely, unironically iconic. go dump some ranges. slay. πβ¨
π¦ where this page comes from
- alpine 3.22: xtables-addons-doc 3.26-r0 Β· GPL-2.0-only
- alpine 3.23: xtables-addons-doc 3.30-r0 Β· GPL-2.0-only
- alpine 3.24: xtables-addons-doc 3.30-r0 Β· GPL-2.0-only
- debian trixie: xtables-addons-common 3.27-4 Β· GPL-2.0-only
- opensuse-leap 16.0: xtables-addons 3.27-lp160.3.1 Β· GPL-2.0-only AND GPL-2.0-or-later
- opensuse-leap 16.0: xtables-addons 3.27-lp160.3.1 Β· GPL-2.0-only AND GPL-2.0-or-later
- opensuse-leap 16.0: xtables-addons 3.27-lp160.3.1 Β· GPL-2.0-only AND GPL-2.0-or-later
- opensuse-leap 16.0: xtables-addons 3.27-lp160.3.1 Β· GPL-2.0-only AND GPL-2.0-or-later
- ubuntu noble: xtables-addons-common 3.25-2build1 Β· GPL-2.0-only
- ubuntu noble: xtables-addons-common 3.25-2ubuntu0.2 Β· GPL-2.0-only
- ubuntu questing: xtables-addons-common 3.29-2
- ubuntu resolute: xtables-addons-common 3.30-1 Β· GPL-2.0-only
- ubuntu stonking: xtables-addons-common 3.31-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms