I need to redirect visitors to .onion site if they come using Tor Browser. It's okay if they have IPv4 IPs (e.g. 51.15.86.162
belongs to tor exit nodes list). But how to do that in case of IPv6 addresses, for example 2a0b:f4c0:16c:13::1
?
Is there a similar IPv6 exit list or any programmatic method to tell the address is used by exit node?
-
You can try the list at dan.me.uk/torlist/?exit which contains IPv6 addresses, but I haven't looked into specifically how it's generated. You may also be interested in looking into trac.torproject.org/projects/tor/ticket/21952. – Steve May 3 '20 at 22:32
You can get the list of IPv6 addresses of tor exit nodes here (the IPv6 column): https://metrics.torproject.org/rs.html#search/flag:exit%20
Also, there is no programmatic way to tell a regular ip from a tor exit node ip (except for maybe doing a reverse dns lookup on the ip and checking if the domain has the word "tor" in it)