nginx version: nginx/1.24.0 (Ubuntu)
Good afternoon, please help me.
I have configured nginx stream on a VPS server, which redirects port 65535 to a host located on the local network. I was able to connect to my home computer via the external address using the previously specified port, but the application server console displays the VPS server address instead of the client’s external address.
How can I configure it so that the external client address is displayed instead of the VPS server address?
/etc/nginx/stream.conf.d/reverse.conf
server {
listen 65535;
proxy_pass 10.10.10.14:65535;
proxy_connect_timeout 5s;
proxy_timeout 60s;
resolver 8.8.8.8 1.1.1.1 valid=300s;
resolver_timeout 5s;
}
server {
listen 65535 udp;
proxy_pass 10.10.10.14:65535;
proxy_connect_timeout 5s;
proxy_timeout 60s;
resolver 8.8.8.8 1.1.1.1 valid=300s;
resolver_timeout 5s;
}
/etc/nginx/nginx.conf
stream {
include /etc/nginx/stream.conf.d/*.conf;
}
