geoiplegacy
Posted by vitich on Monday, 2 December 2019Why?
Because of Nginx, Piwik2 and ModSecurity2. To use GeoIP2, Nginx has to be built from source.
It seems to be very useful!
https://www.miyuru.lk/geoiplegacy
vitich.kiev.ua registered on Dec 15, 1999
vitich.kyiv.ua registered on Aug 24, 2023
Why?
Because of Nginx, Piwik2 and ModSecurity2. To use GeoIP2, Nginx has to be built from source.
It seems to be very useful!
https://www.miyuru.lk/geoiplegacy
Знадобилося заблокувати деякі країни однією строкою:
iptables -I INPUT -m geoip --src-cc
AR,BR,CN,CO,DZ,HK,IN,IR,KP,LA,MY,OM,PK,SC,TH,TW,VN -j DROP
Але отримав таку помилку:
iptables v1.6.0: geoip: too many countries specified
Оскільки я використовую кастомне ядро - я збираю xtables-addon самостійно.
Отже, нам потрібно збільшити XT_GEOIP_MAX та перезібрати.
As of April 1, 2018, updated versions of the GeoLite Legacy databases will be available to redistribution license customers only, although anyone can continue to download the March 2018 GeoLite Legacy builds. On January 2, 2019, the last build will be removed from our website. GeoLite Legacy database users will need to switch to the GeoLite2 or commercial GeoIP databases and update their integrations by January 2, 2019.
If you are a redistribution license customer, please note that you must download via the account portal or geoipupdate in order to get an updated database.
Вдруг, кому пригодится.
for IP in $(curl http://vitich.kyiv.ua/files/crimean.ip_.txt); do iptables -A INPUT -s $IP -j DROP; done