如何获取客户端 IP 地址
我们有一个部署在银行总部的 ASP.NET 应用程序。银行员工是该应用程序的消费者。
银行员工通常使用通过代理服务器连接到互联网的计算机来访问此应用程序。
出于审核目的,当他们登录应用程序时,我们需要将所有(至少一个)IP 地址分配给他们的 LAN 接口。
我知道有一些服务器变量提供客户端的IP,但它们只给我们代理服务器的IP(外部IP)。
We have an asp.net application which deployed in head office of a bank. Employees of the bank are consumers of this application.
Employees of the bank are usually access this application using their computers which is connected to internet though a proxy server.
For auditing purpose we need all (at least one) ip-address assigned to their LAN-interface, when they login to the application.
I know there are some Server Variables which provides IP of client but they are only giving us IP of Proxy Server (external IP).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于代理,但我相信标准是将原始客户端IP放在名为HTTP_X_FORWARD_FOR的服务器变量下。有时其他人使用 HTTP_X_FORWARDED 和 HTTP_CLIENT_IP。
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. Sometimes others are used HTTP_X_FORWARDED and HTTP_CLIENT_IP.