pvxe / nftables-geoip

Python script that generates nft maps of ip address blocks and corresponding geolocation. This data is taken from db-ip.com, so yo don't have to worry about accepting any EULA.
GNU General Public License v2.0
115 stars 17 forks source link

error location country #4

Closed philbat closed 4 years ago

philbat commented 4 years ago

Hi, I did that ./nft_geoip.py --file-location location.csv --download and I get that

Generated by nft_geoip.py on Sat Apr 25 11:01 2020

IP Geolocation by DB-IP (https://db-ip.com) licensed under CC-BY-SA 4.0

map geoip4 { type ipv4_addr : mark flags interval elements = { 1.0.0.0-1.0.0.255 : $AU, .... Why $AU ? https://www.whatismyip.com/1.0.0.0/ tells me US.

Best regards

pvxe commented 4 years ago

Hi @philbat, this issue is not related to the script in itself, but with the information provided by db-ip. If you inspect dbip.csv you can notice the following line. (as of the day I'm writing this)

1.0.0.0,1.0.0.255,AU

At this point is more about which geoip information provider you prefer or find more reliable. But this script will only work with db-ip, at least in the foreseeable future. (mainly because of the license)

philbat commented 4 years ago

Thanks for your answer. in effect, whois 1.0.0.0 gives me AU.