Tor Browser cannot bootstrap on IPv6-only networks

By default, it’s not possible to use Tor Browser on IPv6-only networks.

I don’t know why this is.

What I do know:

  • Most directory authorities support IPv6;
  • Many (well, enough) relays support IPv6.

Temporary solution

I have found that enabling the use of a Snowflake bridge does allow Tor Browser to bootstrap on IPv6-only networks. However, using bridges in places where Tor would otherwise just work by default seems like a waste of precious bridge bandwidth.


I’m guessing there’s some part of the initialization process that just takes the A record of domains by default, or uses hard-coded IPv4 addresses, and no IPv6 addresses. I also know that Firefox already contains logic for fast fallback to IPv4 when encountering issues with IPv6 endpoints (which it default to when available), which is called Happy Eyeballs. Maybe that code could be reused, which might simplify the implementation of the fix, but now I’m just throwing out ideas.

It also appears Tor Browser is unable to operate on IPv6-only networks after passing the bootstrapping phase. I tested this on a network that still supports IPv4, by letting Tor initialize with access to IPv4 and IPv6, then disabling the IPv4 interface in my OS settings, reconnecting to the WiFi AP (for that change to apply), and then trying to connect to some websites. I don’t know if this behavior arises from the same issue that causes the initialization to fail, in which case it could be possible to tackle both issues at once, but if not, I think getting Tor Browser to just initialize on IPv6-only would be a great first step.


I was going to write something here about the ever decreasing reliability of IPv4 in some countries, the issue of ISPs in developing countries not being able to acquire enough IPv4 addresses (if any), the additional cost hosting providers are starting to charge for IPv4 addresses, etc. But I instead I’m going to hope that writing down a complete list of arguments won’t be necessary. Wouldn’t it be great if it just… worked :slightly_smiling_face:

If desired, I can spend some time diving into the reason of exactly why Tor fails when IPv4 is unavailable, reporting my findings, and maybe helping implement a fix.

I can’t think of something we do to require IPv4 on the browser side, but maybe there’s some pref we set and we shouldn’t.
So, my guess would be that the tor daemon itself doesn’t play nicely with IPv6-only networks.
Have you tried for example tor + curl in such a scenario?

I’m pretty sure it should “just work”, but try adding

ClientUseIPv4 0
ClientUseIPv6 1

to torrc.

If that doesn’t work, can you run Tor Browser from the command line with --verbose and post the output?

I found that torsocks also doesn’t work on IPv6-only networks, and Tor Browser doesn’t log anything to the console when I run ./tor-browser/Browser/start-tor-browser --verbose. I might try reinstalling Tor Browser, since this seems like a bug (I’m on Debian-based Linux, by the way, and installed Tor Browser from the official website).

Also, if you would like to test it yourself: it’s pretty easy to emulate an IPv6-only environment if you’re on a dualstack network. You can go into the network settings for the particular network you’re connected to in your OS settings, set IPv4 to ‘disabled’ or ‘link-local only’, apply, and reconnect to the network to apply the changes. I’m curious if it works for you guys?

sadly this is a known problem in c-tor.

2 Likes

Ahh, that’s unfortunate! Funnily enough, one of the solutions proposed to developers using IPv6-only cloud solutions to communicate with the IPv4-only GitHub is to do interactions with GitHub through Tor, so I’m not sure how they made that work…

I just tried it with --verbose and I’m not getting any output from tor or Firefox either, just some GTK warnings. Odd… It used to work.

I reinstalled Tor Browser and, you’re right, it seems to get stuck at 0% bootstrapping if there’s no IPv4 connectivity. Adding ClientPreferIPv6ORPort 1 fixes it.

1 Like

and in this case torsocks works