brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: an IP-only access list in Nginx Proxy Manager is simple security for a home app

Security
~/tips/tip-security-npm-access-list-ip-only

allow 192.0.2.0/24;

Limits a proxy host to addresses you list, without asking for any password.

Access lists in Nginx Proxy Manager are usually shown with a user name and password. You can also leave the users out and only fill in the Access tab, which turns the list into a plain IP filter.

Under Access Lists, add a new list, skip the Authorization tab and add rules on the Access tab, for example allow for 192.0.2.0/24 and allow for one VPN address. Then pick that list on the proxy host. NPM turns it into nginx rules like these:

allow 192.0.2.0/24;
allow 203.0.113.10;
deny all;
satisfy all;

The deny all at the end is added for you, so you only list what may get in. Everything else gets a 403.

If you combine addresses and users, the Satisfy Any switch matters. Off, a visitor needs both the right address and a password. On, either one is enough, so people on your LAN get straight in while the rest of the world gets the login prompt.

The check uses the address nginx sees. If something sits in front of NPM, like a Cloudflare proxy or another load balancer, every request comes from that box and your list either blocks everyone or lets everyone through. In that case you first need the real client address restored, or this filter does not mean much. A phone on mobile data is, I think, the easiest way to make sure outsiders really get blocked.

Further reading: Nginx Proxy Manager access list template, nginx ngx_http_access_module

Going deeper: Guide: fix a 502 Bad Gateway in Nginx Proxy Manager, with a checklist that finds the cause

More Security tips tcpdump -nn -r capture.pcap port 53 mkcert -install Strict-Transport-Security: max-age=0 Referrer-Policy: strict-origin-when-cross-origin wp super-admin list All Security tips (79) All topics

Link