So, I am have been on a quest lately to secure laptops used by children & help with a small school computer lab.
They are split between Macs & Ubuntu (Linux).
One of my first rules was to leverage a restricted DNS provider to prevent (well, minimize) the chance of the kids visiting porn. It worked great on Ubuntu as I just ran this command on all computers:
echo "nameserver 126.96.36.199" > /etc/resolv.conf ; chattr +i /etc/resolv.conf
This forces the 188.8.131.52 nameserver (used by cleanbrowsing ) and sets the file as immutable, so nobody can change it.
Easy to automate and applies across all wifi networks. However, on the Mac, it does not work. It seems that they stopped using the resolv.conf file and you have to go through the UI to set it. However, the problem is that anyone can change it and you have to configure it PER WIFI network.
Q: Does anyone know a way to force a name server across all Wi-Fi networks on the Mac? Preferably through the terminal, so I can SSH into all of them and configure? If we can set it as immutable, so kids can't change, it would be ideal.
Appreciate the help!
*I know that I can do do that via the router DHCP/DNS and force to all computers, but due to some other technical challenges, I can't do it from there.