tkalfaoglu
Silver Pleskian
A customer got fed up with hacking attempts from various countries and asked me to block all but one country.
So I first set up a .htaccess file with lots of "allow from x.x.x.x/x" and one "deny all" ..
This quickly did not work; giving a 304 to everyone.. I figured it was because nginx is in front of apache. So, instead I used the plesk GUI, went into Web Server Settings for that domain and in the very bottom box, one for nginx, I entered lots of
allow x.x.x.x;
allow y.y.y.y;
deny z.z.z.z;
type entries.
Well, it still does not work; this time the proxy_access.log file shows:
2015/09/05 10:03:10 [error] 16046#0: *855 access forbidden by rule, client: 13.4.34.12, server: blabla.com, request: "GET / HTTP/1.1", host: "blabla.com"
where the 13.4.34.12 is my own server's IP address (IP address modified for security)
So, both nginx and apache appear to verify the entries in their access files against the server's own IP address.
This defies logic; any ideas what to do?
Thanks, -turgut
So I first set up a .htaccess file with lots of "allow from x.x.x.x/x" and one "deny all" ..
This quickly did not work; giving a 304 to everyone.. I figured it was because nginx is in front of apache. So, instead I used the plesk GUI, went into Web Server Settings for that domain and in the very bottom box, one for nginx, I entered lots of
allow x.x.x.x;
allow y.y.y.y;
deny z.z.z.z;
type entries.
Well, it still does not work; this time the proxy_access.log file shows:
2015/09/05 10:03:10 [error] 16046#0: *855 access forbidden by rule, client: 13.4.34.12, server: blabla.com, request: "GET / HTTP/1.1", host: "blabla.com"
where the 13.4.34.12 is my own server's IP address (IP address modified for security)
So, both nginx and apache appear to verify the entries in their access files against the server's own IP address.
This defies logic; any ideas what to do?
Thanks, -turgut