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 Persistent Nature of Freedom Isn't About Easy Routes
Resistance to oppression takes effort and sometimes money
Linux Months-Old News (LWN Uncorrected)
They could at least update the original
This Week Fedora Celebrates Diversity, But It is Pushing Proprietary Software and Censorship
IBM openwashing, perception management, and reputation laundering gone awry?
 
IBM and Subsidiaries Sued for Ageism (Not Just for Racism)
This is already being discussed
UEFI is Against Computer Security, Its True Goal is to Curtail Adoption of GNU/Linux and BSDs on Existing or New PCs
the world is moving away from Windows
[Meme] Chat Control (EU) is All About Social Control
It won't even protect children
EFF Not Only Lobbies for TikTok (CPC) But for All Social Control Media, Irrespective of Known Harms as Explained by the US Government
The EFF's own "free speech" people reject free speech
Microsoft's Search (Bing) Fell From 3.3% to 1% in Turkey Just Since the LLM Hype Began
Bing fell sharply in many other countries
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, June 20, 2024
IRC logs for Thursday, June 20, 2024
The Real FSF Lost Well Over a Million Dollars Since the Defamation Attacks on Its Founder
2020-2023 income: -$659,756, -$349,927, -$227,857, and -$686,366, respectively
The Fake FSF ('FSF Europe') Connected to Novell Via SUSE, Not Just Via Microsoft (Repeated 'Donations')
'FSF Europe' is an imposter organisation
Just Less Than 3 Hours After Article on Debian Suicide Cluster Debian's Donald Norwood Recycles a Fortnight-Old 'Hit Piece'
The fall of Debian is its attack on its very own volunteers
IPFS censorship, Edward Brocklesby & Debian hacker expulsion
Reprinted with permission from disguised.work
Links 20/06/2024: Dumbphone Experience and Bad Encryption
Links for the day
Official Project Gemini news feed — Five years of Gemini!
the official statement
Ultimate Judgment: the Debian Suicide Cluster
Reprinted with permission from Daniel Pocock
Links 20/06/2024: Bruce Schneier Adds Moderation Policy, FUCKSHITUP Can't Be Trademarked in the US
Links for the day
Mass Layoffs Happening in IBM Subsidiaries, Almost No Media Exists Anymore (to Cover That)
They can drive people out with R.T.O. of lay off in small batches to prevent any media scrutiny
Links 20/06/2024: Trying to Maintain Health and the Implosion of LLM Bubble/Hype
Links for the day
Microsoft's Bing Share in Canada Has Only Decreased Since the LLM Hype ("Bing Chat")
According to statCounter
Gemini Links 20/06/2024: Golden Ticket and Looking for Web 1.0 Communities
Links for the day
Not Even TRYING to Compete With Microsoft
CMA (UK) ought to step in and investigate why Canonical (UK) refuses to even compete
Poul-Henning Kamp: Why Freedom in 'FOSS' Matters
Openwashing is more widely recognised as a growing problem
[Meme] EU Chat Control: The Problem is Too Much Privacy???
So what's with GDPR then? The EU is contradicting itself!
Lithuania: GNU/Linux Usage Climbs to Highest Level in Years
consistent abandonment of Microsoft
"Remarkably Little Had Changed."
Black or African American not even mentioned
Rumours That Nat Friedman (CEO) Was 'Fired' by GitHub/Microsoft
"Microsoft Refused to Fix Flaw Years Before SolarWinds Hack"
linuxsecurity.com: A Step in a Positive Direction
We hope that Guardian Digital and linuxsecurity.com will rectify the matter and persist with real articles
Links 20/06/2024: Somali Piracy Surges, Juneteenth Discussed
Links for the day
Gemini Links 20/06/2024: Gemini is 5 Today (Still No Gemlog Entry From its Founder)
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, June 19, 2024
IRC logs for Wednesday, June 19, 2024
Morocco: GNU/Linux Surges From 0.1% to 4.21%
Microsoft has mass layoffs in Africa these days
EU 'Chat Control' Law is Already Discrediting the Stated Goals of GDPR
Equip kids with always-on always-connected microphones and double-sided cameras, just to be safe...
[Meme] EU Chat Control II
Stuff like "Chat Control" means that GDPR will lose credibility and the true motives be rightly scrutinised/questioned
You're Only Proving Our Point, Sir
clearly obsessed with what we write
Just Because It Happened Over 20 Years Ago Doesn't Mean It's "Old News" or Stopped Happening
This strategy merely evolved
Thanking Solderpunk for 5 Years of Gemini Protocol
Long live Gemini Protocol and long live Solderpunk!
[Meme] He Who Controls the Boot
And licks the Microsoft boot
[Meme] systemd-recovery
Imagine "Linux" (Poetterix) becoming so unreliable that it needs factory resets
Almost Every Day This Month the GNU/Linux "Market Share" Grows in statCounter
Advocates like to see progress
Dawg, I Herd You Like Freedom
In the context of Software Freedom, little is ever said about free speech
Links 19/06/2024: Microsoft Faces Big Backlash, Bytedance Referred to US Department of Justice
Links for the day
Gemini Protocol Turns 5 in 15 Hours
Geminispace is still very much alive
OSI's Blog is Still 100% "AI" Nonsense Sponsored by Microsoft (the Authors Are Also Salaried by Microsoft)
The founder of the OSI no longer supports the OSI
Poland is Another Country Where Bing Lost a Lot of Market Share Since the LLM Gimmicks
down from 3.24% to 2.4%
Jean-Pierre Giraud, Possible Forgeries & Debian: elections, judgments, trademark already canceled, archaeologist
Reprinted with permission from Daniel Pocock
It Took Microsoft More Than 3 Years to Get a Quarter of Windows Users to 'Upgrade' to Vista 11 (3 Out of 4 Windows Users Still Reject It)
That is exactly what's happening right now
[Meme] The Empire
Don't be like Putin
They Want 'Transparency' Only for the General Public (Every Bit of Communication Available to the Government, Usually Via Corporations)
The EU might decide to effectively ban SSH
Justices Jeremy Johnson and Victoria Sharp to Decide the Fate of Julian Assange in About Three Weeks
Will he be back home in Australia by year's end?
Free Software Won't Fix Equality, But It Helps
Let's examine Free software in the context of: 1) money. 2) justice.
Treating Them as Teammates, Not as Political Props, Trophies, or Objects
Most of the world's people are women
Links 19/06/2024: SFTP and Gopher Milestone
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, June 18, 2024
IRC logs for Tuesday, June 18, 2024
US Surgeon General's Advice on Social Control Media (and "Smart" Phones) Seems Reasonable
People forget what the real world is about
Quiet at Planet Debian
planet.debian.org has not had any updates since 5 days ago
Belarus: Bing Fell From 1.1% to 0.6% Since Microsoft Started the LLM Hype (Yandex is 50 Times Bigger Than Bing)
Now enter Belarus
Morale at Microsoft Sinks to New Lows
The annual 'Employee Signals' survey showed a drop from 69% to 62% in positive responses