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

Netcraft's New Web Server Survey Shows Microsoft Down in Every Category
That Microsoft is still visible in
Slopwatch: Anti-Linux Garbage and Fake 'Articles' About GNU and Linux, Courtesy of Serial Sloppers and Slopfarms
Today there is a frustrating amount of FUD online that wasn't published by humans but instead generated by LLMs
From Strangling Women to SLAPPing Journalists (Microsoft in a Nutshell)
We won't ever capitulate to Microsofters who strangle women
 
What the LLM Scrapers Are Doing to Tux Machines
So far today it looks like we'll have served about 1.5 million requests at midnight. That's more than 50,000 per hour or 1,000 per minute.
Links 27/02/2025: Google Clown Computing Layoffs and Slack Goes Down as Usual
Links for the day
Links 27/02/2025: The Engagement Rehab and Another New Zine
Links for the day
Links 27/02/2025: Microsoft Trying Ads as Sales Fall, Preserving Data From Social Control Media a Real Problem
Links for the day
Hiding Crimes Against Women (i.e. Reputation Laundering) by Misusing Inapplicable Privacy Laws From Another Continent
As it turns out, "privacy" does not cover hiding illegal activities and if public information exists to prove these illegal activities, then it's perfectly OK to share it
Zurich CEO suicide, Martin Senn proximity to Adrian and Diana von Bidder-Senn, Debian
Reprinted with permission from Daniel Pocock
Debian, CentOS, RHEL source code demise now linked, accelerated after invalid trademark judgment
Reprinted with permission from Daniel Pocock
Civil Society Should Demand Removal of People Who Sought Removal of Richard Stallman
Perhaps it's noteworthy that the FSF is now being attacked (again)
RTO for You, But Not for Me: How IBM's Managers Try to Disguise Layoffs as "Resignations" or "Retirements"
What ever happened to corporate ethics?
Links 27/02/2025: Conflict Updates, Hacks Caught Red-Handed Misusing Licence to Exercise Law to Submit LLM Slop to Courts
Links for the day
Gemini Links 27/02/2025: Fuzzy Frontiers and New Arrivals at Geminispace
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, February 26, 2025
IRC logs for Wednesday, February 26, 2025
Always Doing This Site for Principles, Not Money
Pro bono
The Short Lifecycle of Twitter Outrage
The upside is that the "tempo" of social control media is so fast (to cause addiction or "engagement" as the pushers put it) that the persistence of lies in social control media is rather poor
Microsoft Devoured the Open Source Initiative (OSI), Now It's Just a Chain of Blunders
The Open Source Initiative (OSI) is against openness
Chronological Index of Techrights
The index was created after Alex Oliva expressed interest
IBM employee from Zurich, Switzerland arrested, jailed for tunnel mistake that may have arisen due to sign colours
Reprinted with permission from Daniel Pocock
The Free Software Foundation's Fund-raising Efforts Continue Unabated (and With Positive Results)
Perhaps the cherry on the cake is that Microsoft influence agents now try to attack the people who run the FSF, for merely have the 'wrong' views on political affairs
Links 26/02/2025: Microsoft's "AI Value" Bubble is Blowing Up, Starbucks in Trouble as Well
Links for the day
Rumour About IBM Layoffs in the UK
That was 2 hours ago
Links 26/02/2025: Science, Hardware, and Politics
Links for the day
Timeline of Microsoft's 2025 Crisis and Growing Panic
Microsoft already had 3 waves of layoffs this year (not even 2 months have passed)
Slopwatch: Another Offending 'Linux' Site Found (Fake Articles About "Linux"), Postgres/PostgreSQL/PSQL Targeted by FUD from LLMs
It's all slop, as one can suspect
IBM Consulting: Layoffs Already in Progress
"What are the Deep Blue Thought Leaders World becoming? A rubbish heap?"
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, February 25, 2025
IRC logs for Tuesday, February 25, 2025
Links 25/02/2025: US Backs BRICS at UN, Ukraine's Defence Enters 4th Year
Links for the day
Gemini Links 25/02/2025: Marginalia and LOWWIRE
Links for the day
Credit Suisse collapse obfuscated Parreaux, Thiébaud & Partners scandal
Reprinted with permission from Daniel Pocock
New Richard Stallman Interview Published by Free University of Bozen-Bolzano a Day After His Talk There
We're not seeing any difficult or controversial questions
The Musk Slipped, Countries Need Digital Independence
What's happening in Germany this month might result in quicker adoption of Free software
Government Sites That Use Centralised CAs Are Still Remotely Controlled by MElon and GAFAM at the Oval Office
Even governments outside the US
Eternal Vigilance
I too received more death threats than I can recall over the years
Spanish Version of the Free Software Foundation's Book "Introduction to the Command Line"
The "GNU Press Shop [is] temporarily closed"
Dr. Andy Farnell Publishes Second Part of Series About Freedom Fighters (It Started With Richard Stallman)
A few minutes ago Dr. Farnell published the second part
Things That Were Presumed Public Enemy #1 (or Foremost Threat)
The world's most powerful military is now governed by clowns who don't know what the heck they're doing
Microsoft is Admitting That It Has No Viable Business Model, Starting to Experiment
Microsoft's proprietary spyware with ads cannot really compete with Calligra and LibreOffice
Asking Journalists to Pay for Merely Reporting Violent Abuse Against Women (and Telling Them to Kill Themselves)
As regular readers are likely aware by now, for material we published years ago some likely broke man without a proper job (except in a company made up or invented by him) wants money
Bluewashing: IBM Replaces Red Hat With IBM (Bobby Leibrock) at the Top
Based on his education, Bobby is just some suit; he thinks of money, not tech
Links 25/02/2025: Mass Layoffs at Starbucks, Kaspersky Banned on Australian Government Systems
Links for the day
Links 25/02/2025: Strawberry Lemonade, Introducing Fiss, and YouTube Acting Aggressive
Links for the day
UK: Twitter Falls to Lowest Traffic Levels in 5 Years (Start of Lockdowns), Down From More Than 37% to Only 6.5%
Months ago Twitter (aka "X") was blasted by the British government for inciting right-wing violence
Judgment translated to English in FINMA & Debian trademark fiasco
Reprinted with permission from Daniel Pocock
The Brigading (in Social Control Media) Did Not Silence the Creator of GNU/Linux
there are no impending talks at the moment
Confirmed: IBM Layoffs Will Strike Consulting Quite Hard
the flagging of staff is a way to signal to them it's time to go or get the boot
Sami Tikkanen Explains What Happened to Computer Science Education in Finland and Elsewhere
The 'broligarchs', a collective which typically created anything of their own, do not want the general population to possess skills that let it be anything other than passive consumers
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, February 24, 2025
IRC logs for Monday, February 24, 2025