Cannot pass client's real ip through nginx reverse proxy #14157
-
|
Hello, I need your help on how to enable the passing of the client's real ip to Authentik. Right now, the client IP is the IP of the nginx reverse proxy. Authentik is running as a podman container, and is behind nginx reverse proxy container. Everything is working LAN only, no exposition to the public. I already tried multiple solutions i found on the authentik documentation (TRUSTED_PROXY_CIDRS) and other issues pointing to the same problem (#7216, #7504, #7219), but i couldn't resolve it. Your help is much appreciated. I'm using jwilder nginx reverse proxy image which generates automatically the nginx configuration. NGINX and Authentik Server are in the same podman network (nginx-proxy-network). I have verified against the documentation (https://docs.goauthentik.io/docs/install-config/reverse-proxy), and i don't see anything missing. Podman network inspect nginx-proxy-network: I'll be happy to provide any more context/information. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
|
There are three possible issues I can imagine in this situation:
To debug whether you have an issue with 1. or 2. I suggest you create a If the PS: I also found this similar issue #5529 . Maybe there is a similar cause. |
Beta Was this translation helpful? Give feedback.

I created a new example
https://github.com/eriksjolund/podman-nginx-socket-activation/tree/main/examples/example7
that uses quadlets and rootless podman. The nginx container is configured as an HTTP reverse proxy for two backend web server containers (whoami1 and whoami2). A self signed certificate created with openssl is used to provide https. All containers run in the same custom network. It is possible to improve security by adding
Internal=truetoexample7.network