Addhost
This script will prompt for a URL and then add the URL to the hosts file with a 0.0.0.0
IP address, effectively blocking the site on the local machine.
I use this to build up my host file whenever I encounter an objectionable site. Subsequently, you could automate the upload of your host file to a central server on your LAN or the internet for other machines to download (also in an automated fashion). This would keep all of your machines up to date. The uploaded file can also be downloaded by a PiHole server to provide network-wide protection.
#!/bin/bash
echo "What site would you like to block? "
read host
echo "0.0.0.0 $host" >> /etc/hosts