从服务器 JSP 获取客户端 IP [安全]
我想知道使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.
It is theoretically possible for a client to spoof the IP address of the proxy, but it is not easy.