by LinuxBender · 3y ago · 0 comments
A simpler and probably heavy handed approach would be to have cron jobs that disable the network or shut down the computer during specific hours/days assuming the kids don't have sudo/doas/root permissions.
There are also sites that have Block-Lists for adult content, spam, malware, etc... that can be added to local DNS, /etc/hosts or however you wish to manage them. There are also DNS providers that can do this for you should you wish to delegate the blocking to someone else. OpenDNS has this ability for example. [3] I have not tested it but there is a Firefox addon for adult content [4] called FoxFilter.
[0] - https://wiki.archlinux.org/title/Parental_control
[1] - https://wiki.archlinux.org/title/PAM
[2] - https://www.man7.org/linux/man-pages/man8/pam.8.html
[3] - https://www.opendns.com/setupguide/#familyshield
[4] - https://addons.mozilla.org/en-US/firefox/addon/foxfilter/
Some of the PAM modules have corresponding commands that can rewrite the configuration files and reduce the risk of breaking something but not all modules have tooling in place yet probably due to a lack of popularity/demand. authselect, authconfig, etc...
Another Firefox addon I neglected to mention is Block Website [1]. It can be configured in a reverse mode, only allowing websites that have been explicitly permitted. A password can be used on-demand to add new sites.
IPTables can also be used to enable or block access to anything (by name single shot lookup, IP, port, etc...) [2] Using domain names in IPtables can be problematic if the site's IP changes before you restart IPTables or if a CDN is in the path with shared IP's and SNI TLS.
[1] - https://addons.mozilla.org/en-US/firefox/addon/block-website...
[2] - https://ipset.netfilter.org/iptables-extensions.man.html # search for the "time" module.