Skip to main content

YouTube without ads on UniFi

Create a Mullvad account and generate a Linux WireGuard configuation without IPv6 (UniFi does not support this yet). Make sure the configuration points to one of the Tirana exit-nodes.

Load this configuration into your UniFi site under VPN > VPN Client.

Screenshot_20260617_170351.png

Now create a policy based route for the following domains to the Mullvad Tirana VPN.

Screenshot_20260617_170307.png

youtube-nocookie.com
ggpht.com
ytimg.com
youtube.googleapis.com
youtubei.googleapis.com
youtube.com
youtu.be
googlevideo.com

Now to prevent Google from figuring out that you are not actually in Albania, we need to redirect all the DNS requests for YouTube domains to the Mullvad DNS resolver. So,Firstly, create a static route so that we can reach the Mulldvad DNS resolver. Then, create forward domain rules for each of the above mentioned domains. See the exampleexamples below.

Screenshot 2026-08-19 at 20-38-46 Settings unifi.leerkotte.net.png

 

Screenshot 2026-08-19 at 20-27-38 Settings unifi.leerkotte.net.png