mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #3002] Unable to set access control lists based on IP/network #2049
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2049
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @crosesvg on GitHub (Jun 16, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3002
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
Access lists do not work as all connections are seen to originate from the containers gateway address
Nginx Proxy Manager Version
v2.10.3
To Reproduce
Steps to reproduce the behavior:
Configure an Access list to:
allow traffic from local networks (e.g. 192.168.0.0/16)
Deny traffic from all
Assign the access list to a proxy host
Attempt to access the proxy host
Expected behavior
Traffic originating from 192.168.0.0/16 networks are granted access
Traffic originating from other internal/external networks are denied
Actual behavior
Traffic from 192.168.0.0/16 networks are denied access
if the access list is updated to include 172.16.0.0/16 (e.g. the subnet/ip address of the docker container/gateway) then connections are allowed from all networks (as all requests are seen to originate from the subnet that the container/gateway resides in)
Operating System
Docker desktop/WSL on Windows
@jmaximusix commented on GitHub (Sep 2, 2023):
can confirm
This reddit user has also come to the same conclusion:
https://www.reddit.com/r/nginxproxymanager/comments/110634p/comment/j8lc9cj/?utm_source=share&utm_medium=web2x&context=3
@grainsoflight commented on GitHub (Sep 29, 2023):
Having the same issue. adding
location = / {
allow 192.168.0.0/24;
deny all;
}
manually to the advanced settings resolves the issue, so it seems like the access lists arent properly inserting it
@dezza commented on GitHub (Oct 22, 2023):
Try to check(box) "Satisfy any" [x]
I had issues with HTTP Basic Auth as well, but this made sure it satisfied on IP-restrictions only.
@grainsoflight commented on GitHub (Oct 22, 2023):
I had tried this and it did not work
On Sat, Oct 21, 2023, 11:53 PM dezza @.***> wrote:
@dezza commented on GitHub (Oct 22, 2023):
Ok! Well maybe try with a new entry so you're sure a new file is being created.
I couldn't get the basic auth working, not sure why, it showed my user and an excerpt (3 letters or so) of the password for login, but this login never worked in basic auth, so not sure what was wrong..
@dezza commented on GitHub (Oct 23, 2023):
Btw the issue with not seeing the correct source IP is easily resolved by running the container with
--network=slirp4netns:port_handler=slirp4netns@github-actions[bot] commented on GitHub (Jun 4, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@luixal commented on GitHub (Dec 14, 2024):
Just got here as I'm still having this issue.
Any workaround other than @grainsoflight ? Works like a charm but it's hard to keep track of which domains have which access...
@smileatom commented on GitHub (Jan 3, 2025):
The reason the ACLs dont work is that NGINX in docker has no idea what the source IP of the request is, it thinks its the IP of the docker container. Therefore it cannot work.
@luixal commented on GitHub (Jan 4, 2025):
Then, why does it work by adding it manually like in the example above? I tried it myself and it does work for me.
@smileatom commented on GitHub (Jan 5, 2025):
Becxause you likely added a CIDR block that includes the docker container IP.
@luixal commented on GitHub (Jan 5, 2025):
I don't think I've added anything else, but can't be sure as I set it up long time ago.
Will try deploying this in a linux container instead of a docker one. That should fix it is that's the issue.
@github-actions[bot] commented on GitHub (Jul 12, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍