Welcome! Log In Create A New Profile

Advanced

Logging the TCP source port nginx proxy used to connect to the upstream

November 09, 2023 10:50AM
We are trying to follow a TCP connection from the TCP client via the nginx reverse proxy to the target. So nginx is the reverse proxy to which the client connects. nginx then connects to the target using a new TCP port. We need to log the TCP Port nginx used (as a client) to connect to the target.

We currently use the variables $remote_port and $server_port, but these do not log what we need. $remote_port logs the TCP port used by the client to connect to the nginx reverse proxy. $server_port logs the port that the nginx reverse proxy runs on.

Does anybody know how to log the TCP Port nginx used (as a client) to connect to the target? Are there any plans to implement this feature?
Subject Author Posted

Logging the TCP source port nginx proxy used to connect to the upstream

erik.nellessen November 09, 2023 10:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 236
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready