Welcome! Log In Create A New Profile


Howto get the public IP of a client in this configuration

Posted by neilyoung 
Howto get the public IP of a client in this configuration
February 01, 2023 04:18AM
OK, possibly stupid title, but here is the problem:

So far I've been running NGINX as a reverse proxy, terminating 443 and forwarding internally to a Node JS app on 8080. In order to pick up the external IP of a caller, I've set

proxy_set_header X-Forwarded-For $remote_addr;

was used.

As part of a change, I was forced to host two subdomains on 443 via NGINX. Somehow I learned that this then requires a "module configuration" (to be more specific: exactly here: https://jitsi.github.io/handbook/docs/devops-guide/turn).

Leaving the second application (COTURN) aside, I have now the following upstream configuration for my existing web app:

upstream web_backend {

So the default NGINX config now listens to 4443 and redirects - as before - internal plain TCP to 8080.

Unfortunately, the original IP is lost this way and X-FORWARDED-FOR only shows in the 8080 application. I understand why: I think somehow the whole module configuration is missing "appropriate measures" to forward the external IP. I just don't know what to do about it :)

Does anyone know how to do this?

Thanks in advance
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready