I must spent a lot of times to get the reason why my Firewall not works. And problem come from API location website. If you want to get location IP, just use Maxmind in Ubuntu. It's free 99.5% is correct.
This is structure how to use it:
- sudo apt-get install geoip-database
- sudo apt-get install geoip-bin
- geoiplookup {$ip} -> GeoIP Country Edition: BR, Brazil
- geoiplookup {$ip} | awk '{print substr($4, 1, 2)}' -> BR
- Download this file: http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
- http://geolite.maxmind.com/download/geoip/database/
- Decompress and move all file to /usr/share/GeoIP/
- Not tested!
Good luck!
No comments:
Post a Comment