[GH-ISSUE #2526] Client IP Not Forwarding Correctly in Version 2.9.19 #1764

Closed
opened 2026-02-26 07:32:22 +03:00 by kerem · 3 comments
Owner

Originally created by @iTABHayden on GitHub (Jan 8, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2526

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

NPM does not seem to be forwarding the client IP correctly in version 2.9.19

Nginx Proxy Manager Version:
2.9.19

I would expect NPM to forward the client IP address direct to the host either out of the box or using proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;, proxy_set_header X-Real-IP $remote_addr;, proxy_set_header X-Forwarded-Proto $scheme; header additions which it does not seem to be doing.

Operating System:
Debian 11
Docker version 20.10.22, build 3a2c30b

Additional context:
I can tell it isn't forwarding client IP's correctly as I can install a base version of NGINX on a Debian 11 machine, and it forwards them fine to all hosts. I add the header in under add location, add / and it still does not work. This is with any application I try.

Originally created by @iTABHayden on GitHub (Jan 8, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2526 - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes NPM does not seem to be forwarding the client IP correctly in version 2.9.19 Nginx Proxy Manager Version: 2.9.19 I would expect NPM to forward the client IP address direct to the host either out of the box or using proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;, proxy_set_header X-Real-IP $remote_addr;, proxy_set_header X-Forwarded-Proto $scheme; header additions which it does not seem to be doing. Operating System: Debian 11 Docker version 20.10.22, build 3a2c30b Additional context: I can tell it isn't forwarding client IP's correctly as I can install a base version of NGINX on a Debian 11 machine, and it forwards them fine to all hosts. I add the header in under add location, add / and it still does not work. This is with any application I try.
kerem 2026-02-26 07:32:22 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@JustasStankunas commented on GitHub (Feb 7, 2023):

EDIT:
Soo it looks that this is not related to NPM (probably i just did not noticed this before.. It looks this is related to this - #180. when traffic is originating from same host as NPM container is running on.

noticed something interesting also. have a tailscale VPN client running as a service on the same host as NPM is running. If look into logs accessing any proxied service (for example NPM admin page) i can see in the logs that client is 172.20.0.1 which is the gateway of the docker network that NPM is running in.

this is internal traffic (no WWW apart for tailscale connection):
tailscale client has IP of 100.x.x.x
tailscale endpoint is on the server with IP 192.168.x.x
npm is on same server as tailscale endpoint - 192.168.x.x:80 (or :443) - docker subnet 172.20.0.0/16

have proxy.lan configured in npm pointing to 192.168.x.x:81 (NPM admin page)

tailscale client - access proxy.lan in logs i can see that client is listed as 172.20.0.1

<!-- gh-comment-id:1420534013 --> @JustasStankunas commented on GitHub (Feb 7, 2023): EDIT: Soo it looks that this is not related to NPM (probably i just did not noticed this before.. It looks this is related to this - [#180](https://github.com/docker/for-mac/issues/180). when traffic is originating from same host as NPM container is running on. ~~noticed something interesting also. have a tailscale VPN client running as a service on the same host as NPM is running. If look into logs accessing any proxied service (for example NPM admin page) i can see in the logs that `client is 172.20.0.1` which is the gateway of the docker network that NPM is running in.~~ ~~this is internal traffic (no WWW apart for tailscale connection):~~ ~~tailscale client has IP of `100.x.x.x`~~ ~~tailscale endpoint is on the server with IP `192.168.x.x`~~ ~~npm is on same server as tailscale endpoint - `192.168.x.x:80` (or `:443`) - docker subnet `172.20.0.0/16`~~ ~~have `proxy.lan` configured in npm pointing to `192.168.x.x:81` (NPM admin page)~~ ~~tailscale client - access `proxy.lan` in logs i can see that `client` is listed as `172.20.0.1`~~
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2024):

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

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

@github-actions[bot] commented on GitHub (Mar 17, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2727849135 --> @github-actions[bot] commented on GitHub (Mar 17, 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#1764
No description provided.