-
Notifications
You must be signed in to change notification settings - Fork 3k
Access list gives 403 even when IP is whitelisted #1279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the exact same Problem with the docker version. |
It looks like you must edit/save the Proxy Hosts again after editing the Access Lists. |
@oewean Thanks. This fixed it for me. I just edited the access list again and I could read the following in npm.log:
When saving a site using an access list the following were to be found in npm.log:
So I think that nginx needs to be reloaded after an access list have been saved. As far as I can see the access list is written to the corresponding .conf file. |
I have a similarly problem 2021/08/19 12:20:00 [error] 312#312: *906 access forbidden by rule, client: 172.20.0.1, server: subdomain.domain.tld, request: "GET / HTTP/2.0", host: "subdomain.domain.tld", referrer: "https://subdomain.domain.tld/" The Client IP is the gateway of the docker container. I think some X-Forward parameter is missing in NPM. |
This is the problem I noticed today when troubleshooting why my access whitelist didn't seem to have any effect. The client IP in the nginx access log under |
I'm having the same issue. Were you able to get this resolved? |
@PlasmatikSteak
The client IP 95.x.x.x is in fact the public IP of my router, which gets changes by the ISP every 24H.
|
How did you manage to get your log to point to the local IP, in my case it only recognizes the public IP of my router!!!. |
It seems Nginx isn't getting reloaded/config updated when the access list changes, is this possible to implment please? |
Please see #1105 (comment). If you use cloudflare, this could also change the IP received by nginx. Also, if your npm instance is in the public internet, and not in your local network, you won't have access to the local ip addresses! Just the one public ip address your router has. |
@chaptergy This is not the issue in my case, it's that if I add a new IP to the whitelist it doesn't take effect until I go into a host that uses the whitelist and re-save the configuration. |
@dragon2611 Then you are on the wrong issue. You'd probably want #637 |
What does that mean? How can my Nginx Proxy Manager be in the public internert, or in the local network? Could this issue be prevented if I instead of using a public DNS Provider use a local hosted one that resolves my local network without going through the intenet? edit Indeed that works. For example as I am using Adguard I was able to simply to a DNS Rewrite of the URL I am trying to reach and rewrite it directly to the IP where NPM is running. In that case, NPM recevies the local IP instead of the Public IP and the access list works fine for local IP only. |
Checklist
jc21/nginx-proxy-manager:latest
docker image?I use this version for Proxmox: https://github.com/ej52/proxmox-scripts/tree/main/lxc/nginx-proxy-manager. I am not sure if it is specific to this environment or also affects the docker version.
Describe the bug
I am attempting to configure an access list for several proxies. I want to authenticate using IP addresses. However, all proxies gives me an 403 even though I access the site using the whitelisted IP address.
Nginx Proxy Manager Version
v#2.9.6
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect to be able to access the site as the IP address is whitelisted.
Screenshots
Operating System
I use Alpine configured by this script: https://github.com/ej52/proxmox-scripts/tree/main/lxc/nginx-proxy-manager
Additional context
When I review the error log file for the proxy host (
proxy-host-9_error.log
), I see this entry:2021/08/01 08:34:47 [error] 1293#1293: *7651 access forbidden by rule, client: 172.16.20.102, server: adc.website.com, request: "GET / HTTP/2.0", host: "adc.website.com"
(I have altered host to adc.website.com)
I have attempted to also add this local IP, but I still get a 403 when attempting to access the site.
The text was updated successfully, but these errors were encountered: