简体   繁体   English

如何获取客户端IP地址

[英]How to Get Client IP Address(s)

We have an asp.net application which deployed in head office of a bank. 我们有一个部署在银行总部的asp.net应用程序。 Employee of bank are consumer of this application. 银行的雇员是该应用程序的消费者。

Employee of Bank are usually access this application using their computers which is connected to internet though a proxy server. 银行员工通常使用他们的计算机访问此应用程序,该计算机通过代理服务器连接到Internet。

For Auditing purpose we need all(atleat one) ip-address assigned to their LAN-interface, when they login to the application. 出于审核目的,当他们登录到应用程序时,我们需要为其LAN接口分配所有(至少一个)IP地址。

I know there are some Server Variables which provides ip of client but they are only giving us ip of Proxy Server(external IP). 我知道有一些提供客户端IP的服务器变量,但它们只是给我们代理服务器的IP(外部IP)。

Please help of this. 请帮忙。 Thanks 谢谢

It depends on the proxy but I believe the standard is to put the original client IP under the server variable called HTTP_X_FORWARD_FOR. 它取决于代理,但我认为标准是将原始客户端IP放在名为HTTP_X_FORWARD_FOR的服务器变量下。 Sometimes others are used HTTP_X_FORWARDED and HTTP_CLIENT_IP. 有时会使用其他HTTP_X_FORWARDED和HTTP_CLIENT_IP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM