- change from buster to bullseye
- sudo apt install libnet-cidr-lite-perl libtext-csv-xs-perl libgeoip2-perl
for day of writing, there is a problem with building by dkms this package xtables-addons-common so wehave to install this from source
- sudo apt install pkg-config libxtables-dev
- wget http://inai.de/files/xtables-addons/xtables-addons-3.13.tar.xz
- tar xf xtables-addons-3.13.tar.xz
- cd xtables-addons-3.13/
- ./configure
- make
- sudo make install
- sudo depmod -a
- sudo modprobe x_tables
- sudo modprobe xt_geoip
- cd geoip
- manual download GeoLite2-Country-CSV.zip from maxmind.com
- ./xt_geoip_dl_maxmind
- cd GeoLite2-Country-CSV_20201124/
- sudo mkdir -p /usr/share/xt_geoip
- sudo ../xt_geoip_build_maxmind -D /usr/share/xt_geoip/
- sudo iptables -I INPUT -m geoip ! --src-cc XX -j DROP
Refenreces:
checking kernel version that we will build against... make: *** /lib/modules/4.9.0-19-amd64/build: No such file or directory. Stop.