Bonum Certa Men Certa

Google/YouTube Still Trying to Block All Invidious Instances, But IPv6 Makes That Harder for Google

posted by Roy Schestowitz on Dec 19, 2023,
updated Dec 19, 2023

Sadly all this information was outsourced the same Microsoft platform which encourages and profits from GPL violations while shutting down projects such as YouTube-DL (still besieged)

Yes there is an ongoing effort from me to alert the public instances. [...] Hello, I am the owner of invidious.io.lol, how do I fix this? Please !!

YESTERDAY morning we wrote about Invidious instances breaking. All but one instance stopped working, based on 20+ instances that I examined. Since then some blocks have been bypassed, not withdrawn. yewtu.be is working again and its maintainer, unixfox (also known for his popular searX.be instance), wrote a manual. He has sadly outsourced this manual to proprietary Microsoft spaces, so we're reproducing it below.

Rotate your IPv6 address for escaping YouTube blocking

This tutorial has been written by unixfox, owner of yewtu.be. He is better suited when looking for help about this tutorial.

Synopsis

YouTube has started to periodically block the public Invidious instances since the start of June 2023 (iv-org/invidious/issues/3872) and they have become more aggressive about it since the start of August 2023 (iv-org/invidious/issues/4045).

Due to this block, "local proxy" and DASH do not work anymore. But Invidious still works for most videos without using the proxy, because the video playback traffic is sent directly to YouTube servers without going through the instance.

Thanks to IPv6 you can easily escape this block because there are many IP addresses in a single /64 IPv6 range. (18,446,744,073,709,551,616 IP addresses to be precise)

This tutorial will explain how to automatically and periodically rotate your IPv6 address. Also some notes about how to have IPv6 in case your provider does not offer it.

Requirements

1) IPv6 support on your server

Testing

You can easily find out if you have IPv6 by executing the command:

curl -m 5 ipv6.icanhazip.com

If you do not have any errors, then congratulation, you can continue to the second requirement!

If you do have an error (timeout or no route to host), then you will need to enable IPv6 support on your server.
Depending on your provider and if it does support IPv6, you may have to configure your server for IPv6. Check the documentation of your provider.

Other solutions if you do not have IPv6 support
1) Switch to another provider

If your provider does not support IPv6 then you can either switch to another provider that support IPv6.
There are many today that do support it, here is a non-exhaustive list of them (this is not recommendation, just a list of the popular providers that support IPv6):
Hetzner, BuyVM, Scaleway, OVH, DigitalOcean, Vultr, Incognet, Netcup and more.
Larger list: https://www.serverhunter.com/#query=ips%3Aipv6

2) Use an IPv6 tunnelbroker or make one yourself

The alternative, if you do not want to switch provider, is to use an IPv6 tunnelbroker. It allows to get IPv6 connectivity using another server.

This website lists all the free and paid existing tunnelbrokers: https://tunnelbroker.services/. We do not recommend running a public instance on a free tunnelbroker as this would put a lot of strain on their network because video streaming consumes a lot of bandwidth.

You can also use an external server (from another provider that do support IPv6) for acting as an IPV6 tunnel for your main server. Wireguard is perfectly suited for that.
All of this is out of scope of this tutorial, please consult the internet for tutorials.

2) System packages requirement

Please install:

Configure Invidious for IPv6

If you are running Invidious outside of Docker or using something else than Docker (K8s)

Please make sure that you have this line set in config.yml:

force_resolve: ipv6

Note: If you are on Kubernetes, check that your pods have IPv6 connectivity. But you probably already know that if you are using Kubernetes.

If you are running Invidious in Docker

Note: Make sure you are running a recent version of Docker if you are running into IPv6 issues.

If needed, IPv6 official documentation for Docker is at https://docs.docker.com/config/daemon/ipv6/.

  1. Put the following config in /etc/docker/daemon.json:
    {
     "experimental": true,
     "ip6tables": true
    }
    
  2. Restart Docker
  3. In your docker-compose file of invidious. Add these lines at the end of your docker-compose
    networks:
      default:
        enable_ipv6: true
        ipam:
          config:
            - subnet: 2001:0DB9::/112
              gateway: 2001:0DB9::1
    
    Note: Don't change the subnet and the gateway. Unless there is a conflict with an existing docker network.
  4. Make sure that you have this line set in config.yml:
    force_resolve: ipv6
    
  5. Bring down your docker composition and bring it back up for recreating the network:
    docker compose down
    docker compose up -d
    
  6. To check if everything went well then do:
    docker compose exec invidious ping -c 1 ipv6.icanhazip.com
    
    If you do not get any error then you can jump to the next step.

Configure the IPv6 rotator (made by Invidious team)

This tool was developed by the Invidious team, and it's the official tool for rotating your IPv6 address on Invidious: https://github.com/iv-org/smart-ipv6-rotator.
It may be used on other projects that depend on YouTube and/or Google (example: Piped or SearXNG).

  1. Make sure you have installed all the python libraries from the "requirements".
  2. Clone the repository somewhere that you like (not inside the invidious directory):
    git clone https://github.com/iv-org/smart-ipv6-rotator.git
    
  3. Find the IPv6 subnet of your server, usually it's written on your provider website.
    But you can easily find it using this tool: http://www.gestioip.net/cgi-bin/subnet_calculator.cgi.
    Enter the main IPv6 address, select IPv6 and change the prefix length only if it's not a /64.
    Use the command ip a to get the detail of your IPv6 network configuration.
  4. Run the script once like this (don't use sudo if you are already root):
    sudo python smart-ipv6-rotator.py run --ipv6range=YOURIPV6SUBNET/64
    
  5. If everything went well, then configure a cron to periodically rotate your IPv6 range. Twice a day (noon and midnight) is enough for YouTube servers. Also at the reboot of the server! Example crontab (crontab -e -u root):
    @reboot sleep 30s && python /path/to/the/script/smart-ipv6-rotator.py run --ipv6range=YOURIPV6SUBNET/64
    0 */12 * * * python /path/to/the/script/smart-ipv6-rotator.py run --ipv6range=YOURIPV6SUBNET/64
    
    The sleep command is used in case your network takes too much time to be ready.

That's it!

If the script does not work for you, it could be that:

If you find any other issues, please open a bug report there: https://github.com/iv-org/smart-ipv6-rotator/issues

The original will have more up-to-date instructions, but we do not wish to send traffic Microsoft's way.

Other Recent Techrights' Posts

The Register MS is Still Being Paid to Participate in the "AI" Ponzi Scheme Which Will Crash the Economy
The Register MS is hoping to get lucky by tricking people into a scam
Evidence Contradicting Microsoft's Non-Denying Denials and Expectation of Many Layoffs Soon
"Microsoft has had this constant drip of layoffs for months."
At Least 3 Richard Stallman Talks in Europe Confirmed So Far, Next Week in Rome There's Another
Dr. Stallman has not announced this yet
 
Links 07/10/2025: International Criminal Court (ICC) Convicts Ali Kushayb; Moroccan Imprisoned for 'Offensive' Shirt
Links for the day
Links 07/10/2025: EU' Chat Control is Back, US Cracks Down on Democracy
Links for the day
Techrights Pursues Justice and Truth Because, Without Those, Society Descends Into Chaos
most people reject dogma and pseudoscience
Upcoming Talks by Richard Stallman in Helsinki, Göteborg, and Rome
Join with him and share the software
Something Bad is Happening in the Open Source Initiative (OSI)
The latest OSI blog post is from a Microsoft operative and a few weeks ago the Executive Director left
TLS 1.3 Dominates Geminispace (99% of Known Capsules)
it's nowadays safe to assume almost every capsule can handle TLS 1.3
Why soylentnews.org Has Been Having Technical Difficulties Lately
The network has been going up and down quite a lot this past week
A Statement Against Violence
The facts are on our side
They've Run Out of Things to Rebrand or Label as "AI"
The next few years will be interesting because if Microsoft lays off tens of thousands of workers each year, there won't be much left except mountains of debt and dying brands
Richard Stallman Confirms His Talk in Göteborg This Coming Friday
"The hosts say that the list will not be given to the state"
Most of the "Linux" Results This Morning in Google News Are LLM Slop From the Same Slopfarm, Plagiarising Phoronix
The main question is, does Google even care at this point?
Gemini Links 07/10/2025: Civil War and "Goodbye Web"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, October 06, 2025
IRC logs for Monday, October 06, 2025
The "AI Revolution" is Going Very Well, Right?
money that does not exist and alleged potential that is pure fiction
Links 06/10/2025: Scam Altman Himself Admits He Runs a Scam Based on a Bubble, US Administration Adopts “War From Within” Narrative to Crush Opposition/Dissent
Links for the day
Slopwatch: Fake Ubuntu 'Articles' and Google News Helps People Who Plagiarise Phoronix Using LLMs
Michael Larabel can't possibly be happy about that
6,000 Pages/Articles a Year
Today in one month from now the site turns 19
When Things Become So Ubiquitous That They're Almost Nameless
The notion or the concept of software freedom isn't tied to any particular brand or project, so it should still resonate
IDG Seems to Have Abandoned Sandra Henry Stocker's UNIX/Linux Column
Unless we hear otherwise or see some update/s, this may mark another death blow from IDG
Gemini Links 06/10/2025: Winter Nights and "Virtue Signaling"
Links for the day
Links 06/10/2025: Scientific Awards and Typhoon Matmo
Links for the day
IP Kat Gone Bonkers, Pushing Slop in Patents (Likely Illegal, With Severe Consequences)
AstraZenecaKat: "Last time, this Kat covered some practical steps on how to ensure client confidentiality when using AI tools (IPKat)."
Links 06/10/2025: Grokipedia as Malicious Slop, US 'Martial Law' a "New Normal"
Links for the day
Fake Economics and Clown Computing Circuses
who's gonna pay for these scams?
Nobel Prize in Economics Does Not Exist, It's Propaganda From Sveriges Riksbank
"It is that time of the year when it is important to remind people that there are no Nobel Prizes for professional wrestling, astrology, or economics"
Rust is Eating Linux
That's a recipe for problems
Cindy Cohn (Executive Director of EFF) is a Millionaire, Earned Almost $30,000 Per Month Before Departing While the EFF Lost Money
EFF is "Big Business"
Non-Denying Denial From Microsoft (Again) Regarding the End of XBox Consoles
It's kind of hilarious that even the site chosen by Microsoft to relay its BS, based on past loyalty, isn't quite buying it
Bringing Back Lost Articles From the 1990s: Microsoft Products Leave Door Open to NSA
Nothing has changed since then
When the Slop Bubble Pops People Will Say Richard Stallman Was Right (Again)
What was once known as Computer Science turned into "IT"
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, October 05, 2025
IRC logs for Sunday, October 05, 2025
Links 06/10/2025: Science, Hardware, and Andrej Babis Making a Comeback
Links for the day
Links 05/10/2025: Slow News Day and Wondering About the Canada Post Walkout
Links for the day
Gemini Links 05/10/2025: Telnet Debugging and The Programmer’s Brain
Links for the day
More Than "Just a Rumour": XBox Seems to Have Just Died
At this point, why would any studio out there target or partner with XBox?
How to Tell Your Community, Project or Company is Being Infiltrated by Saboteurs
How to identify nefarious social engineering
The Fortieth Birthday of the FSF Made Us Extremely Happy
It feels like the 'hacker community' is regrouping to discuss things and prepare for the next Big Challenge
Chat Control 2 Them, Not 2 U
Follow the advice of Dr. Patrick Breyer
Mozilla: Throw Away Your "Old" PC and Enable "Digital Rights Management (DRM)"
This is heading in a bad direction
Controlling Our Computing for Another Forty Years
40 years of freedom
Motivational Small Place to Run Large Sites
We deem this scenery motivational and inspiring
Techrights' Text Version (Daily Bulletin) Turns Five This Month
our plain-text bulletins are turning 5 this month
We'll Continue Covering the Moribund OSI and Other Dysfunctional if Not Hostile Institutions
Stefano Maffulli's departure is due to his defection and due to him failing the mission in pursuit of money (his salary)
Microsoft XBox is Dying as More Retailers Stop Stocking It and Massive Layoffs Planned Again
Microsoft is circling down the drain
Links 05/10/2025: Lufthansa Layoffs (4,000) and More Spotify Woes (Aside From Massive Debt)
Links for the day
The Free Software Foundation's Livestream Has Ended, Video/s Might be Online Next
I've asked whether they'll upload video of some of the event; I still wait for an answer
The Register MS Does Not Know the Difference Between Microsoft GitHub and GitLab
At the time of writing (October 5) the article from "Thu 2 Oct 2025" remains uncorrected
Linux and the Freedom Paradox
Linux is losing freedom if some external actors who only use Microsoft tools for development wrest control
"Bullshit Generators" (What RMS Calls LLMs) and Fake Images Already Target the FSF
Why does Google News promote fake articles about the FSF while omitting all the real ones?
Software Patents as a Bubble
Don't invest resources in hype; if you detect a bubble, run away from it
Links 05/10/2025: Political Leftovers, Climate Change, and Security Incidents
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, October 04, 2025
IRC logs for Saturday, October 04, 2025