How can I get the real IP Address?

Caché

My database service is on the cloud server, and I access it on the company intranet. When I user the %request.CgiEnvs  to get "REMOTE_ADDR", but what I have been getting is the company's external address. I can't get my IP address in the LAN. 
For example, my computer IP address is 192.168.11.11, and my company's external public network address is 214.17.17. I can only get 214.17.17 by using %request.CgiEnvs("REMOTE_ADDR"), but not 192.168.11.11.   

I only want to get 192.168.11.11.

Any help would be appreciated. Thanks!

  • 0
  • 0
  • 244
  • 5
  • 0

Comments

Looks like NAT. Cloud server only sees external address (214.17.17) as it should.

Why do you want to get internal address?

Because I want to manage the client through information such as IP address.

If you want, you can pass current IP as a header or inside the message body.

Do you want it for logging purposes, such as what actions were performed from which IP?

Yes, I want to record what actions were performed from which IP. The reason I wanted to find the answer at %Request was because I was bothered by another question. My application is B/S structure, the front-end is implemented by React, and the method of getting local IP address by Javascripts is incompatible with IE, Chrome, Firefox and so on. Because Chrome is not compatible with ActiveX. If I can, I want to get the IP address in a unified way, compatible with the browsers above.