禁止使用IPv4和IPv6 [英] Banning by IPv4 and IPv6

查看:278
本文介绍了禁止使用IPv4和IPv6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想在我的网站上通过IP禁止用户,是否可以通过 IPv4 IPv6 ?有些浏览器默认使用IPv4地址,有些浏览器有可能使用IPv6地址。因此,如果我通过他们当前的IP禁止某人,他们只需要使用另一个导航器来绕过禁令。

If I want a ban a user by IP in my website, is it possible to do it by both IPv4 and IPv6? Some browsers apparently use IPv4 addresses by default and others, if they have the possibility, use IPv6 addresses. So, if I ban someone by their current IP, they would only have to user another navigator to bypass the ban.

tl; dr:是否可以翻译 IPv4 地址到 IPv6 或类似的东西来统一它们?

tl;dr: is it possible to translate IPv4 addresses to IPv6 or something like that to "unify" them?

我正在使用PHP作为服务器端技术。

I'm using PHP as the server-side technology.

推荐答案

不,这不太可能。它们是完全独立的网络协议,不必彼此有任何关系。

No, it isn't really possible. They are entirely separate network protocols that don't have to have anything to do with each other.

此外,我建议只应使用IP地址禁止与其他方法结合使用,因为很容易使用代理或其他方法从不同的IP地址访问您的服务器。

In addition, I would suggest that banning by IP address should only be used in conjunction with other methods, as it is very easy to use a proxy or other means to hit your server from a different IP address.

这篇关于禁止使用IPv4和IPv6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆