Main Board > Web Services


(1/2) > >>


I want to get the browser's IP Address.  The Global variable %REMOTE_IP$ does not work.  It contains server's ip address.  It does not contain Browser's IP Address.   Please inform me how to get the Browser's IP address through PXPLUS

In every application I have build using the webserver %remote_ip$ is always the browser/remote ip address.  In fact, I have used that as part of a "firewall" scheme to lock down access.

Mike King:
Is it possible that you have a proxy forwarder on your site? 

Basically the %REMOTE_IP$ is the IP address at the other end of the connection which normally is the browser, but if your request are being routed through a proxy server, load balancer, VPN, or similar it will reflect the address of the server doing the redirection.

In most cases these servers will insert the true originating IP address in the request header thus in one of the global variables we provide.  Typically, although not a 100% approved standard, the originating IP address will be found in %X_Forwarded_For$ which comes from the X-Forwarded-For request header.


In Which VERSION of pxplus you have the global variable %X_FORWARDED_FOR$ ?. I am using PXPLUS version 11.65.   This variable is not available in this Version.    The WEB SERVER Version is 1.3.17.  Or In case if you have introduced in your latest version of web server please inform me the WEB SERVER Version


Mike King:
When the PxPlus web server runs your application it converts all HTTP request headers into global variables.

If %X_Forwarded_For$ is not set then there was no X-Forwarded-for: header in the HTTP request.  There may however be a %Forwarded$ header.

Here are some details on this header:

It is also quite possible that your server may not provide the original workstations IP address.  This is not uncommon as the IP address provides a means to help identify the user which may or may not be desirable.


[0] Message Index

[#] Next page

Go to full version