[GH-ISSUE #137] Add IP based access lists #119

Closed
opened 2026-02-26 06:30:22 +03:00 by kerem · 9 comments
Owner

Originally created by @joeldevnull on GitHub (May 6, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/137

Hi,

Thanks for creating an awesome tool for managing nginx proxy configs.

Is it possible to consider adding IP based restrictions to the access lists? This is relatively simple to implement in nginx itself in the location block and can be mixed with the existing auth basic too, e.g:

location / {
    # Access List
    satisfy any;
    allow 10.0.0.0/16;
    allow 192.168.0.0/16;
    allow 172.0.0.1;
    deny 1.2.3.4;
    auth_basic            "Authorization required";
    auth_basic_user_file  /data/access/1;
    deny all;

    # Force SSL
    include conf.d/include/force-ssl.conf;

Thanks again!

Originally created by @joeldevnull on GitHub (May 6, 2019). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/137 Hi, Thanks for creating an awesome tool for managing nginx proxy configs. Is it possible to consider adding IP based restrictions to the access lists? This is relatively simple to implement in nginx itself in the location block and can be mixed with the existing auth basic too, e.g: ``` location / { # Access List satisfy any; allow 10.0.0.0/16; allow 192.168.0.0/16; allow 172.0.0.1; deny 1.2.3.4; auth_basic "Authorization required"; auth_basic_user_file /data/access/1; deny all; # Force SSL include conf.d/include/force-ssl.conf; ``` Thanks again!
kerem 2026-02-26 06:30:22 +03:00
Author
Owner

@jeliasson commented on GitHub (May 30, 2019):

Yes, this is the only thing I'm missing right now. Great tool!

<!-- gh-comment-id:497504285 --> @jeliasson commented on GitHub (May 30, 2019): Yes, this is the only thing I'm missing right now. Great tool!
Author
Owner

@axipher commented on GitHub (Jun 28, 2019):

I would also love a feature like this so I don't have to install additional Dockers to handle access control, limit external access to certain IP's and even limit internal network traffic as well.

<!-- gh-comment-id:506811701 --> @axipher commented on GitHub (Jun 28, 2019): I would also love a feature like this so I don't have to install additional Dockers to handle access control, limit external access to certain IP's and even limit internal network traffic as well.
Author
Owner

@arejaytee commented on GitHub (Jan 26, 2020):

+1 for this feature to be added

<!-- gh-comment-id:578485805 --> @arejaytee commented on GitHub (Jan 26, 2020): +1 for this feature to be added
Author
Owner

@michaelruge commented on GitHub (Feb 1, 2020):

I too would love to see this feature!

<!-- gh-comment-id:581067180 --> @michaelruge commented on GitHub (Feb 1, 2020): I too would love to see this feature!
Author
Owner

@modem7 commented on GitHub (Mar 9, 2020):

This can already be used quite easily?

Downside is the basic auth doesn't work to well unless you manually do it.

image

<!-- gh-comment-id:596364104 --> @modem7 commented on GitHub (Mar 9, 2020): This can already be used quite easily? Downside is the basic auth doesn't work to well unless you manually do it. ![image](https://user-images.githubusercontent.com/4349962/76190694-78c00580-61d5-11ea-9bc4-5c9479d0aafd.png)
Author
Owner

@arejaytee commented on GitHub (Mar 9, 2020):

Yeah I was going to give it a try with doing it manually, plan was to do it with no auth and have the IP restriction do the work.

<!-- gh-comment-id:596438158 --> @arejaytee commented on GitHub (Mar 9, 2020): Yeah I was going to give it a try with doing it manually, plan was to do it with no auth and have the IP restriction do the work.
Author
Owner

@arejaytee commented on GitHub (Mar 10, 2020):

Confirmed the settings below will work for IP based restrictions, you can place it in the Host advanced settings or individually for each location. Getting redirected to a 403 page which would be nice to be able to customise or by default use the same Tabler theme.

Being able to configure an "Advanced Access list" with settings like below would be great for displaying it within the UI nicely.

#Settings
#localhost
allow 127.0.0.1;

#local internal network
allow 192.168.1.0/24;

#external IP Address
allow 158.140.198.146;

#deny everything except the above
deny all;

<!-- gh-comment-id:597032309 --> @arejaytee commented on GitHub (Mar 10, 2020): Confirmed the settings below will work for IP based restrictions, you can place it in the Host advanced settings or individually for each location. Getting redirected to a 403 page which would be nice to be able to customise or by default use the same Tabler theme. Being able to configure an "Advanced Access list" with settings like below would be great for displaying it within the UI nicely. #Settings #localhost allow 127.0.0.1; #local internal network allow 192.168.1.0/24; #external IP Address allow 158.140.198.146; #deny everything except the above deny all;
Author
Owner

@jc21 commented on GitHub (May 29, 2020):

Feature has been added, closing

<!-- gh-comment-id:635754607 --> @jc21 commented on GitHub (May 29, 2020): Feature has been added, closing
Author
Owner

@johanmorenolds commented on GitHub (May 6, 2021):

thanks a lot, i just started using the tool and is it great!, and besides that the community is super supportive and active i was having some troubles trying to restrict access to certain IP addresses and with the community help i just managed.

thanks @arejaytee for the code:

#Settings
#localhost
allow 127.0.0.1;
#local internal network
allow 192.168.1.0/24;
#external IP Address
allow 158.140.198.146;
#deny everything except the above
deny all;

<!-- gh-comment-id:833320852 --> @johanmorenolds commented on GitHub (May 6, 2021): thanks a lot, i just started using the tool and is it great!, and besides that the community is super supportive and active i was having some troubles trying to restrict access to certain IP addresses and with the community help i just managed. thanks @arejaytee for the code: > #Settings #localhost allow 127.0.0.1; #local internal network allow 192.168.1.0/24; #external IP Address allow 158.140.198.146; #deny everything except the above deny all;
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#119
No description provided.