[GH-ISSUE #2240] Updating Access List IP address for dynamic IP Host #1599

Closed
opened 2026-02-26 07:31:43 +03:00 by kerem · 12 comments
Owner

Originally created by @diginfo on GitHub (Sep 2, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2240

As the access list does not allow a hostname and only an IP address, I want to create a cron script, that checks whether the IP address has changed for a host, and if so updates the "Access List > Access" IP Address.

I know how to create the script, and how to update the database, but is it just a case of restarting the nginx service or should I call some other command to apply the changed IP address ??

sqlite> select * from access_list_client;
sqlite> UPDATE access_list_client SET address = 'xx.xx.xx.xx' where id = 1;
Originally created by @diginfo on GitHub (Sep 2, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2240 As the access list does not allow a hostname and only an IP address, I want to create a cron script, that checks whether the IP address has changed for a host, and if so updates the "Access List > Access" IP Address. I know how to create the script, and how to update the database, but is it just a case of restarting the nginx service or should I call some other command to apply the changed IP address ?? ``` sqlite> select * from access_list_client; sqlite> UPDATE access_list_client SET address = 'xx.xx.xx.xx' where id = 1; ```
kerem 2026-02-26 07:31:43 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@diginfo commented on GitHub (Sep 2, 2022):

Also, nginx does not appear to be running under systemctl, so how can I restart and / or reload the system ?

<!-- gh-comment-id:1235028892 --> @diginfo commented on GitHub (Sep 2, 2022): Also, nginx does not appear to be running under systemctl, so how can I restart and / or reload the system ?
Author
Owner

@the1ts commented on GitHub (Sep 2, 2022):

@diginfo you can just use the nginx standard nginx -s reload, you can even cron that from outside docker, for me its docker exec nginxproxymanager nginx -s reload

<!-- gh-comment-id:1235280550 --> @the1ts commented on GitHub (Sep 2, 2022): @diginfo you can just use the nginx standard `nginx -s reload`, you can even cron that from outside docker, for me its `docker exec nginxproxymanager nginx -s reload`
Author
Owner

@diginfo commented on GitHub (Sep 2, 2022):

Thanks, so by updating the sqlite database directly as I am, will that then update the nginx config file in /data/nginx/proxy_hosts folder automagically ?

<!-- gh-comment-id:1235357609 --> @diginfo commented on GitHub (Sep 2, 2022): Thanks, so by updating the sqlite database directly as I am, will that then update the nginx config file in /data/nginx/proxy_hosts folder automagically ?
Author
Owner

@diginfo commented on GitHub (Sep 2, 2022):

and while I have your attention :-)

https://stackoverflow.com/questions/73576444/nginx-reversed-proxy-requesting-files-above-proxied-folder

Any suggestions ?

<!-- gh-comment-id:1235366727 --> @diginfo commented on GitHub (Sep 2, 2022): and while I have your attention :-) https://stackoverflow.com/questions/73576444/nginx-reversed-proxy-requesting-files-above-proxied-folder Any suggestions ?
Author
Owner

@the1ts commented on GitHub (Sep 2, 2022):

@diginfo I don't think so, since even changing an ACL in the GUI doesn't reload nginx currently.
Perhaps look at handling the ACL snippet yourself with your script and including that snippet via the custom nginx configuration. This will mean your script updates the ACL snippet with new IPs, removes old IPs, does an nginx -t to check config is good, then reloads nginx.
Perhaps you could simply edit the required proxy-host/$number.conf directly, check config and reload?
I'm sure there are NPM API calls that could be used for this, but I'm not sure its documented in v2.

<!-- gh-comment-id:1235385354 --> @the1ts commented on GitHub (Sep 2, 2022): @diginfo I don't think so, since even changing an ACL in the GUI doesn't reload nginx currently. Perhaps look at handling the ACL snippet yourself with your script and including that snippet via the custom nginx configuration. This will mean your script updates the ACL snippet with new IPs, removes old IPs, does an `nginx -t` to check config is good, then reloads nginx. Perhaps you could simply edit the required proxy-host/$number.conf directly, check config and reload? I'm sure there are NPM API calls that could be used for this, but I'm not sure its documented in v2.
Author
Owner

@SkilledAlpaca commented on GitHub (Sep 20, 2022):

The original request still stands in my opinion.

Would it be possible to get some kind of functionality for DDNS in the Access List? Since I have to enter my public IP to limit access to my LAN, if it changes I have to go and manually update it.

<!-- gh-comment-id:1252635627 --> @SkilledAlpaca commented on GitHub (Sep 20, 2022): The original request still stands in my opinion. Would it be possible to get some kind of functionality for DDNS in the Access List? Since I have to enter my public IP to limit access to my LAN, if it changes I have to go and manually update it.
Author
Owner

@the1ts commented on GitHub (Sep 20, 2022):

There are already great tools for securing infrastructure like requested, VPNs. I for example use tailscale to enable hiding of many services, not just web.
Even if DDNS and ACLS where combined, it still only works for web. And it ignores the fact that many people still have to have port 80 open to allow letsencrypt http authentication, is NPM then supposed to stop ACLs working when letsencrypt is being run?
Its starting to fall way outside of a simple tool for proxying and SSL cert creation that NPM is designed to be.
Perhaps having run and secured some of the largest websites in the world, I'm not as concerned by looking at unknown IPs in my access logs as some are.

<!-- gh-comment-id:1252898815 --> @the1ts commented on GitHub (Sep 20, 2022): There are already great tools for securing infrastructure like requested, VPNs. I for example use tailscale to enable hiding of many services, not just web. Even if DDNS and ACLS where combined, it still only works for web. And it ignores the fact that many people still have to have port 80 open to allow letsencrypt http authentication, is NPM then supposed to stop ACLs working when letsencrypt is being run? Its starting to fall way outside of a simple tool for proxying and SSL cert creation that NPM is designed to be. Perhaps having run and secured some of the largest websites in the world, I'm not as concerned by looking at unknown IPs in my access logs as some are.
Author
Owner

@efnats commented on GitHub (Jul 29, 2023):

many people want to limit their services to local IP ranges, but the current ACL cannot do that.
Solution: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1708#issuecomment-1537533615

Can we have that code merged into?

<!-- gh-comment-id:1656674648 --> @efnats commented on GitHub (Jul 29, 2023): many people want to limit their services to local IP ranges, but the current ACL cannot do that. Solution: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1708#issuecomment-1537533615 Can we have that code merged into?
Author
Owner

@github-actions[bot] commented on GitHub (Feb 10, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1936804840 --> @github-actions[bot] commented on GitHub (Feb 10, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@virtualdj commented on GitHub (Feb 10, 2024):

Please merge #3364 to close this issue.

<!-- gh-comment-id:1936922197 --> @virtualdj commented on GitHub (Feb 10, 2024): Please merge #3364 to close this issue.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 22, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2492726399 --> @github-actions[bot] commented on GitHub (Nov 22, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Dec 3, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:3604737270 --> @github-actions[bot] commented on GitHub (Dec 3, 2025): Issue was closed due to inactivity.
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#1599
No description provided.