Skip to content

Instantly share code, notes, and snippets.

@kenjij
Last active December 6, 2022 23:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kenjij/9016204 to your computer and use it in GitHub Desktop.
Save kenjij/9016204 to your computer and use it in GitHub Desktop.
Create GeoIP database for iptables in Ubuntu
# Install necessary packages
sudo apt-get unzip
sudo apt-get install libtext-csv-xs-perl
# Create database location
sudo mkdir /usr/share/xt_geoip
# Download the database file and convert
/usr/lib/xtables-addons/xt_geoip_dl
sudo /usr/lib/xtables-addons/xt_geoip_build -D /usr/share/xt_geoip *.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment