How do I get remote port in Nginx?

I received a police request. They want to know IP address and port of one of the users.
Unfortunately, it’s not possible to register remote port with Cloudflare.

When are you going to solve this problem?


log_format customformat '$remote_addr:$remote_port - $remote_user [$time_local]  '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent"';

access_log /var/log/nginx/access.log customformat;

Does not register $remote_port

This topic was automatically closed after 14 days. New replies are no longer allowed.