YTadsblocker is a script to block all the Youtube's advertisement in Pi-Hole
This script will block all the Youtube's advertisement in your network. It must be used with Pi-Hole.
Download the script
git clone https://github.com/deividgdt/ytadsblocker.git
Move to the directory
cd ytadsblocker
Make the script executable
chmod a+x ytadsblocker.sh
Execute the script as root with the option: -a install
./ytadsblocker.sh -a install
You can install the script using the aggressive mode. The aggressive mode will block every googlevideo's subdomain. Use carefully since this could lead to Youtube stop working.
./ytadsblocker.sh -a install -m aggressive
Start the service and that's it
systemctl start ytadsblocker
If you are going to use the script in a Pihole Docker Container, you must install and start the script as follow:
Go into the Pihole container
wget https://raw.githubusercontent.com/deividgdt/ytadsblocker/master/ytadsblocker.sh
Give it execution permission
chmod +x ytadsblocker
Install and start the script
./ytadsblocker.sh -a install
./ytadsblocker.sh -a start &
ytadsblocker
to ytadsblocker_legacy
.