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: is it possible to translate IPv4
addresses to IPv6
or something like that to "unify" them?
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.
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.
You can't really translate one to the other, the IPv4 and IPv6 Internets are essentially two logically seperate neworks that happen to share much of the same infrastructure.
Things you can do.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.