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

Daniel Pocock: "I've Gone to Some Lengths to Demonstrate How Corporate Bad Actors Have Used Amateur-hour Codes of Conduct to Push Volunteers Into Modern Slavery"
"As David explains, the Codes of Conduct should work the other way around to regulate the poor behavior of corporations who have been far too close to the Debian Suicide Cluster."
 
Links 18/05/2024: Caledonia Emergency Powers, "UK Prosecutor's Office Went Too Far in the Assange Case"
Links for the day
Microsoft ("a Dying Megacorporation that Does Not Create") and IBM: An Era of Dying Giants With Leadership Deficits and Corporate Bailouts (Subsidies From Taxpayers)
Microsoft seems to be resorting to lots of bribes and chasing of bailouts (i.e. money from taxpayers worldwide)
US Patent and Trademark Office Sends Out a Warning to People Who Do Not Use Microsoft's Proprietary Formats
They're punishing people who wish to use open formats
Links 18/05/2024: Fury in Microsoft Over Studio Shutdowns, More Gaming Layoffs
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, May 17, 2024
IRC logs for Friday, May 17, 2024
Links 18/05/2024: KOReader, Benben v0.5.0 Progress Update, and More
Links for the day
Microsoft-Connected Sites Trying to Shift Attention Away From Microsoft's Megebreach Only Days Before Important If Not Unprecedented Grilling by the US Government?
Why does the mainstream media not entertain the possibility a lot of these talking points are directed out of Redmond?
[Meme] UEFI 'Secure' Boot Boiling Frog
UEFI 'Secure' Boot: You can just ignore it. You can just turn it off. You can hack on it as a workaround. Just use Windows dammit!
The Market Wants to Delete Windows and Install GNU/Linux, UEFI 'Secure' Boot Must Go!
To be very clear, this has nothing to do with security and those who insist that it is have absolutely no credentials
In the United States Of America the Estimated Share of Google Search Grew After Microsoft's Chatbot Hype (Which Coincided With Mass Layoffs at Bing)
Microsoft's chatbot hype started in late 2022
Techrights Will Categorically Object to Any Attempts to Deny Its Right to Publish Informative, Factual Material
we'll continue to publish about 20 pages per day while challenging censorship attempts
Links 17/05/2024: Microsoft Masks Layoffs With Return-to-office (RTO) Mandates, More YouTube Censorship
Links for the day
YouTube Progresses to the Next Level
YouTube is a ticking time bomb
Journalists and Human Rights Groups Back Julian Assange Ahead of Monday's Likely Very Final Decision
From the past 24 hours...
[Meme] George Washington and the Bill of Rights
Centuries have passed since the days of George Washington, but the principles are still the same
Video of Richard Stallman's Talk From Four Weeks Ago
2-hour video of Richard Stallman speaking less than a month ago
statCounter Says Twitter/X Share in Russia Fell From 23% to 2.3% in 3 Years
it seems like YouTube gained a lot
Journalist Who Won Awards for His Coverage of the Julian Assange Ordeals Excluded and Denied Access to Final Hearing
One can speculate about the true reason/s
Richard Stallman's Talk, Scheduled for Two Days Ago, Was Not Canceled But Really Delayed
American in Paris
3 More Weeks for Daniel Pocock's Campaign to Win a Seat in European Parliament Elections
Friday 3 weeks from now is polling day
Microsoft Should Have Been Fined and Sanctioned Over UEFI 'Lockout' (Locking GNU/Linux Out of New PCs)
Why did that not happen?
Gemini Links 16/05/2024: Microsoft Masks Layoffs With Return-to-office (RTO) Mandates, Cash Issues
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, May 16, 2024
IRC logs for Thursday, May 16, 2024
Ex-Red Hat CEO Paul Cormier Did Not Retire, He Just Left IBM/Red Hat a Month Ago (Ahead of Layoff Speculations)
Rather than retire he took a similar position at another company
Linux.com Made Its First 'Article' in Over and Month, It Was 10 Words in Total, and It's Not About Linux
play some 'webapp' and maybe get some digital 'certificate' for a meme like 'clown computing'
[Meme] Never Appease the Occupiers
Freedom requires truth. Free speech emancipates.
Thorny Issues, Violent Response
They say protests (or strikes) that do not disrupt anything are simply not effective. The same can be said about reporting.
GNU/Linux in Malaysia: From 0.2 Percent to 6+ Percent
That's like 30-fold increase in relative share
Liberty in Liberia? Windows Falls Below 10% and Below iOS
This is clearly a problem for Microsoft
Techrights Congratulates Raspberry Pi (With Caution and Reservations)
Raspberry Pi will "make or break" based on the decisions made in its boardroom
OSI Makes a Killing for Bill Gates and Microsoft (Plagiarism and GPL Violations Whitewashed and Openwashed)
meme and more
The FSF Ought to Protest Against UEFI 'Secure Boot' (Like It Used To)
libreplanet-discuss stuff
People Who Defend Richard Stallman's Right to Deliver Talks About His Work Are Subjected to Online Abuse and Censorship
Stallman video removed
GNU/Linux Grows in Denmark, But Much of That is ChromeOS, Which Means No Freedom
Google never designs operating systems with freedom in mind
Links 16/05/2024: Vehicles Lasting Fewer Years, Habitat Fragmentation Concerns
Links for the day
GNU/Linux Reaches 6.5% in Canada (Including ChromeOS), Based on statCounter
Not many news sites are left to cover this, let alone advocate for GNU/Linux
Links 16/05/2024: Orangutans as Political Props, VMware Calls Proprietary 'Free'
Links for the day
The Only Thing the So-called 'Hey Hi Revolution' Gave Microsoft is More Debt
Microsoft bailouts
TechTarget (and Computer Weekly et al): We Target 'Audiences' to Sell Your Products (Using Fake Articles and Surveillance)
It is a deeply rogue industry that's killing legitimate journalism by drowning out the signal (real journalism) with sponsored fodder
FUD Alert: 2024 is Not 2011 and Ebury is Not "Linux"
We've seen Microsofers (actual Microsoft employees) putting in a lot of effort to shift the heat to Linux
Links 15/05/2024: XBox Trouble, Slovakia PM Shot 5 Times
Links for the day
Windows in Times of Conflict
In pictures
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, May 15, 2024
IRC logs for Wednesday, May 15, 2024