tokkonopapa / WordPress-IP-Geo-Block

A WordPress plugin that will blocks any comment, pingback and trackback spams posted from outside your nation. And it will also protect against malicious access to the login form, admin area and XML-RPC from undesired countries.
http://www.ipgeoblock.com/
29 stars 14 forks source link

Not issue: IP Geo API provider class for Nginx compiled with GeoIP module #46

Open ddur opened 6 years ago

ddur commented 6 years ago

Hi, I created IP Geo API provider class for Nginx compiled with Module ngx_http_geoip_module

Gist IP Geo API provider class for ip-geo-block

Feel free to modify it and/or use as example or to include into your repository.

tokkonopapa commented 6 years ago

Hi @ddur,

Thank you for the info.

Unfortunately, I'm not ready to install additional modules for nginx because I usually use MAMP Pro which has a few built-in extra modules. But in the future, I'll try!

As you know, GeoIP Legacy databases stopped to update.

How about leev/ngx_http_geoip2_module? I think GeoLite2 databases can be used because they are based on GeoIP2 APIs.

Note for Mac users: Homebrew Nginx

ddur commented 6 years ago

Using latest Nginx-full package for Debian. Database is updated by https://packages.debian.org/stretch/geoip-database-contrib I guess package maintainers have taken care of old API.

By the way ... I installed Debian on all my old PCs and laptops. :) Much faster than MAMP/XAMP/VBox/Vagrant. VS Code uploads edited sources automatically via FTP.