Repository to store a script and all details that downloads and prepare GeoIP database to be used with nftables rulesets I found an awesome script on the WireFalls Github. 👋
the idea was brilliant.:+1:
Because we don't need any other script interpreter than bash.
But this script was using the GeoIP database from db-ip.com. And I wasn't happy for that for several reasons.
- I already use the free Maxmind GeoIP database with nginx
- I prefer the Maxmind GeoIP database. I believe that it's one of the most accurate one, and all subnets are written in CIDR mode, and I personnally think it's clearer, this way
- Checks that all the programs that the script use can be accessed.
- Create a small RamDrive to store its temporaries files to avoid storing data on HardDisks this increase spead.
- Downloads the Maxmind Database GeoLite2-Country in csv format for IPv4 and IPv6. and checks that the SHA256 checksumms are correct.
- Correlates the data to create files for selected countries. Selected countries have to be mentionned according to their ISO code. See this webpage for further details.
- Create an archive files of the selected countries and store them on disk.
- All steps are well logged and described.
The script is at his first stage. It hasn't reached a number to be considered as stable enough.
In a near future I plan to add some new features, like the following ones :
- Taking in consideration the parameters defined in a configuration file.
- Taking in consideration command line arguments. ✅
- Setup the nft rules. ✅
- And other ideas that will come when the script evolves.
- Test this script.
- Comment, improve it
- Share your ideas.
- Fork this repository
- Add a Star to this repository
Thanks for your help.:pray: