Re: Allow and Deny IP's

2018-02-08 Thread Francis Daly
On Wed, Feb 07, 2018 at 07:28:37PM +0100, Ph. Gras wrote: Hi there, > >> location ~* wp-login\.php$ { > > > >> 185.124.153.168 - - [05/Feb/2018:21:36:12 +0100] "GET /wp-login.php > >> HTTP/1.1" 200 1300 "-" "Mozilla/5.0 (Windows NT 6.0; rv:34.0) > >> Gecko/20100101 Firefox/34.0" > > > >> Me

Re: Allow and Deny IP's

2018-02-07 Thread Ph. Gras
Hmmm! >>> location ~* wp-login\.php$ { >> >>> 185.124.153.168 - - [05/Feb/2018:21:36:12 +0100] "GET /wp-login.php >>> HTTP/1.1" 200 1300 "-" "Mozilla/5.0 (Windows NT 6.0; rv:34.0) >>> Gecko/20100101 Firefox/34.0" >> >>> Me too :-( >> >> Have you any reason to believe that this location is

Re: Allow and Deny IP's

2018-02-07 Thread Jason Whittington
that you are getting back the header you expected. Jason -Original Message- From: nginx [mailto:nginx-boun...@nginx.org] On Behalf Of Ph. Gras Sent: Wednesday, February 07, 2018 12:29 PM To: nginx@nginx.org Subject: [IE] Re: Allow and Deny IP's Hi Francis, >> location ~* wp-logi

Re: Allow and Deny IP's

2018-02-07 Thread Ph. Gras
Hi Francis, >> location ~* wp-login\.php$ { > >> 185.124.153.168 - - [05/Feb/2018:21:36:12 +0100] "GET /wp-login.php >> HTTP/1.1" 200 1300 "-" "Mozilla/5.0 (Windows NT 6.0; rv:34.0) Gecko/20100101 >> Firefox/34.0" > >> Me too :-( > > Have you any reason to believe that this location is used

Re: Allow and Deny IP's

2018-02-07 Thread Francis Daly
On Wed, Feb 07, 2018 at 09:57:04PM +0530, Kaushal Shriyan wrote: > On Wed, Feb 7, 2018 at 5:32 AM, Francis Daly wrote: > > On Mon, Feb 05, 2018 at 11:56:04PM +0530, Kaushal Shriyan wrote: Hi there, > In the curl request I am adding http header -H 'x-forwarded-for: >

Re: Allow and Deny IP's

2018-02-07 Thread Kaushal Shriyan
On Wed, Feb 7, 2018 at 5:32 AM, Francis Daly wrote: > On Mon, Feb 05, 2018 at 11:56:04PM +0530, Kaushal Shriyan wrote: > > Hi there, > > > When i run this curl call -> curl -X GET http://13.127.165.226/ -H > > 'cache-control: no-cache' -H 'postman-token: > >

Re: Allow and Deny IP's

2018-02-06 Thread Francis Daly
On Mon, Feb 05, 2018 at 11:56:04PM +0530, Kaushal Shriyan wrote: Hi there, > When i run this curl call -> curl -X GET http://13.127.165.226/ -H > 'cache-control: no-cache' -H 'postman-token: > 2494a4a7-6791-2426-cedf-d0bcaa1cd90a' -H 'x-forwarded-for: 12.12.12.13.11' > > Ideally the request

Re: Allow and Deny IP's

2018-02-06 Thread Francis Daly
On Tue, Feb 06, 2018 at 01:02:22AM +0100, Ph. Gras wrote: Hi there, > location ~* wp-login\.php$ { > 185.124.153.168 - - [05/Feb/2018:21:36:12 +0100] "GET /wp-login.php HTTP/1.1" > 200 1300 "-" "Mozilla/5.0 (Windows NT 6.0; rv:34.0) Gecko/20100101 > Firefox/34.0" > Me too :-( Have you any

Re: Allow and Deny IP's

2018-02-06 Thread Kaushal Shriyan
On Tue, Feb 6, 2018 at 5:32 AM, Ph. Gras wrote: > Hello there! > > > location ~* wp-login\.php$ { > allow 127.0.0.1; > allow A.B.C.D; // My server's IP > allow E.F.G.H/13; // The IP range where I am > deny all; >

Re: Allow and Deny IP's

2018-02-05 Thread Ph. Gras
Hello there! location ~* wp-login\.php$ { allow 127.0.0.1; allow A.B.C.D; // My server's IP allow E.F.G.H/13; // The IP range where I am deny all; if ($http_user_agent = "-") { return 403;} if ($http_user_agent = "") { return

Allow and Deny IP's

2018-02-05 Thread Kaushal Shriyan
Hi, When i run this curl call -> curl -X GET http://13.127.165.226/ -H 'cache-control: no-cache' -H 'postman-token: 2494a4a7-6791-2426-cedf-d0bcaa1cd90a' -H 'x-forwarded-for: 12.12.12.13.11' Ideally the request should not be allowed and the access log should report 403 instead of 200 I get 200