About client used IP and port

Hi ,

I know that I can get client public IP by the true ip header or X-Forwarded-For header.
However, how can I get the client port ? i.e.

client machine (private IP ) => Firewall NAT (public IP:port ) => cloudflare IP:443 => our web app IP: 443

Our application needs to read both public IP and port for functioning …

Would you please advice is it possible to get it ? thanks …

You can’t get the source port for the connection to Cloudflare. What are you trying to accomplish?

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.