xt_geoip_build(1)

✨ NAME ✨

xt_geoip_build β€” the little tool that turns GeoIP.csv into the packed format that xt_geoip is absolutely obsessed with πŸ’–

It lives in the xtables-addons manual, btw. Bestie, let's get into it.


🌸 SYNTAX 🌸

/usr/libexec/xt_geoip/xt_geoip_build [-D target_dir] [-i input_file]

Yeah, she's got a whole path and everything. More on why below πŸ‘€


πŸŽ€ DESCRIPTION πŸŽ€

Okay so, xt_geoip_build is the one who builds packed raw representations of the range database that the xt_geoip module literally cannot function without. And why do we do the preprocessing in userspace, you ask? Because kernel memory is precious, bestie. It's giving limited. It's giving do-not-waste. So this very building tool does all the heavy lifting up front instead 🫢

One file gets produced for each country, so that no more addresses than needed ever have to get loaded into memory. Efficiency queen πŸ‘‘

And the ranges in those packed database files are also ordered, which is not just a cute aesthetic choice β€” xt_geoip relies on that exact property so its bisection approach actually works. No order, no bisection, no slay. Periodt.

Also? Since this script is usually installed to the libexec directory of the xtables-addons package, and that directory is outside $PATH on purpose, you can't just call it by name. You have to invoke it with a path. That's not a bug, that's a boundary πŸ’…
  • -D target_dir β€” Specifies the target directory into which the files are to be put. Defaults to . β€” yes, literally just a dot, current directory vibes 🌸
  • -i input_file β€” Specifies the source location of the DBIP CSV file. Defaults to dbip-country-lite.csv. And if you use - you get to read from stdin, iconic behavior ✨
  • -s β€” "System mode". Equivalent to -D /usr/share/xt_geoip. That's it, that's the whole vibe.

πŸ¦‹ APPLICATION πŸ¦‹

Shell commands to build the databases and put them where they're expected β€” usually run as root, so hydrate first and remember your power πŸ’–:

xt_geoip_build -s

🌈 SEE ALSO 🌈


And that's the whole page, bestie. This one came from xtables-addons, dated 2010-12-17 β€” so she's been serving since way before you were on this app, and she still ate πŸ’…πŸŽ€ no cap, 10/10, go build your databases πŸ¦‹βœ¨