如何获取客户端 IP 地址

发布于 2025-01-08 12:31:03 字数 199 浏览 0 评论 0原文

我们有一个部署在银行总部的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

峩卟喜欢 2025-01-15 12:31:03

这取决于代理,但我相信标准是将原始客户端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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文