Welcome! Log In Create A New Profile

Advanced

My location restriction to admin panel is not working

April 19, 2023 11:56PM
Hi Team,

My website is at https://www.example.com and I have a CMS Panel at
https://www.example.com/administrator -> 301 -> https://www.example.com/administrator/ -> 302 https://www.example.com/administrator/Login.aspx?Session=Out

And I am trying to restrict the access to /administrator but this is not working - Can someone please help?

location ~*/administrator {
allow 10.0.0.0/8;
deny all;
# return 403;
# error_page 404 403 = /custom_404.html;
}

here are the logs

192.168.5.232 - - [20/Apr/2023:09:17:57 +0530] "GET /administrator/ HTTP/2.0" 302 154 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0"
192.168.5.232 - - [20/Apr/2023:09:17:57 +0530] "GET /administrator/Login.aspx?Session=Out HTTP/2.0" 200 2448 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0"

Here are error logs

2023/04/20 09:15:34 [notice] 4810#4810: *467 "GET|HEAD|POST" matches "GET", client: 192.168.5.232, server: example.com, request: "GET /administrator/error HTTP/2.0", host: "www.example.com", referrer: "https://www.example.com/administrator/Login.aspx?Session=Out"
2023/04/20 09:17:57 [notice] 4962#4962: *513 "GET|HEAD|POST" matches "GET", client: 192.168.5.232, server: example.com, request: "GET /administrator/ HTTP/2.0", host: "www.example.com"
2023/04/20 09:17:57 [notice] 4962#4962: *513 "GET|HEAD|POST" matches "GET", client: 192.168.5.232, server: example.com, request: "GET /administrator/Login.aspx?Session=Out HTTP/2.0", host: "www.example.com"
Subject Author Posted

My location restriction to admin panel is not working

blason April 19, 2023 11:56PM

Re: My location restriction to admin panel is not working

blason April 20, 2023 11:55PM

Re: My location restriction to admin panel is not working

blason April 23, 2023 11:07PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready