从服务器 JSP 获取客户端 IP [安全]

发布于 2024-12-06 22:00:27 字数 220 浏览 0 评论 0原文

我想知道使用jsp方法request.getRemoteAddr();的安全问题。

我想过滤一些客户端IP(我不能使用防火墙:-()。

我想知道攻击者可以通过这种方式更改HTTP请求的IP源?

或者客户端IP是从第3层构建的?

我想检查 类似于基于第 3 层 IP 的 IP 欺骗)

该方法针对伪造 HTTP 请求的安全性(

I want to know security issue using jsp method request.getRemoteAddr();.

I want to filter some client IP (I can't use firewall :-().

I was wondering in this way an attacker can change the ip source of HTTP Request?

Or the client ip is build from layer 3?

I want to check the security of this method against forging of HTTP Request (similar to ip spoofing that instead is based on layer 3 IP).

Thanks to all,

Andrea

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

月棠 2024-12-13 22:00:27

HTTP请求的“客户端”IP地址实际上是最后一个HTTP代理的IP。客户端无法欺骗它,但如果客户端使用代理(很多人都这样做),那么 IP 地址对于识别请求的来源不会有太大帮助。


我只想确保所有请求都通过代理到达我的服务器,并且我不希望客户端可以更改此信息,以便让服务器认为该请求来自代理不...

客户端可以欺骗代理的IP地址,但这并不容易。

The "client" IP address of an HTTP request is actually the IP of the last HTTP proxy. The client can't spoof it, but if the client uses a proxy (and many do) then the IP address won't be much help in identifying the source of the request.


I want just to be sure that the all the request come to my server through a proxy, and I don't want that a client can change this information in order to let the server think that is coming from a proxy while it's not...

It is theoretically possible for a client to spoof the IP address of the proxy, but it is not easy.

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