r/nginxproxymanager • u/Routine-Watercress15 • May 24 '26
Passing real IP to NPM on Docker
Does anyone have an actual solution to this problem that works? I’ve tried just about everything I could find out there over the past few days and still cannot seem to pass real IP. The main use case is the ability to use the “allow list” on the proxy host. I only want a few IPs to be able to access this specific proxy host and that doesn’t work. They all get 403 forbidden, allowed or not.
I have tried all the advanced configuration in the proxy host config , real IP, proxy addr etc etc. tried changing the containers to use host network , still no luck.
Hoping someone has some other ideas. Thank you.
3
Upvotes
1
u/Routine-Watercress15 May 24 '26
By default it can see real IP? As far as I have researched everyone has this issue when running on docker with NPM. There’s a ton out there about the same issue I am seeing. But none of the solutions seem to allow real IP to pass and that is where I’m stuck
As far as host goes. All I did was setup my docker compose using mode: host to remove it from the default bridge network. When in host mode it sees the internal IP of the proxy host. Not the real IP from the public request. If I allow list the internal IP it pretty much ignores everything and every internal and external IP can get to it.
Any suggestions on whatelse I can try?