Geoip, IPtables and Xtables v3.13 on uBuntu 20.04LTS
I still have a number of places where I use geolocation with iptables on 20.04LTS.
One of the challenges of 20.04LTS is keeping xtables up to date.
I do this by custom compiling the xtables from source as required (such as after a kernel upgrade). Here is a quick snippet on how I do this (sorry this is not a full article at this time).
Remove the default repository version of xtables and install dependencies for custom compile.
$ dpkg --get-selections | grep xtables $ lsmod | grep geo $ sudo apt purge xtables-addons-common xtables-addons-dkms xtables-addons-source $ sudo apt autoremove $ sudo apt install git build-essential autoconf make libtool libxtables-dev libip6tc-dev libip4tc-dev libxtables-dev pkg-config libnet-cidr-lite-perl libtext-csv-xs-perl
Clone the source and compile
$ cd ~ $ git clone https://git.inai.de/xtables-addons xtables-addons-xtables-addons $ cd xtables-addons-xtables-addons $ ./autogen.sh $ ./configure $ make $ sudo make install $ sudo depmod -a $ sudo modprobe xt_geoip $ lsmod | grep geoip
Add to dynamic kernel modules
Originally Posted: January 12, 2021
Updated: October 3, 2021
| Article posted in: Bitstream || Tagged as: Computing, Geoip, Linux |