Here is my current /etc/resolvconf/resolv.conf.d/head
file in Ubuntu 21.10
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 185.228.168.10
nameserver 185.228.169.11
As you can see, I am using a kind of parental safe DNS as my global DNS.
Now I want to do something like this:
nameserver 185.228.168.10
nameserver 185.228.169.11
www.youtube.com 1.1.1.1
So that only YouTube uses a different DNS.
I would be happy if this file can be scriptable in this way. I don't want to use some convoluted method.
This is my current situation. The parental DNS goes too far in my opinion, by locking YouTube into restricted mode. YouTube is the only URL that I want to use a specific DNS.
My Android Phone is currently able to do this with Blokada app. Blokada app can set a global DNS-VPN for the parental DNS and then I can choose to "bypass" youtube. This allows me to get the exact result that I want with an android phone. My trouble here is in getting this to work on Ubuntu 21.10