CTparental is a parental control tool used to control how someone uses the computer, either for internet browsing or any other specific Computer usage. Design of CTparental was motivated by existing tools like iptables, dnsmasq, inguardian Privoxy which independently can do some parts but missing other pieces.
So in essence, CTparental leverage all these tools to create a fully-fledged parental control solution with an intuitive and easy to use web interface powered by lighttpd. Now that you know what CTparental, we can go ahead and install it on our Operating system.
We'll cover installation for Ubuntu 16.04 and Debian 9 since these are the latest release of both distributions as of this writing.
Features of CTparental
Below is a list of things supported by CTparental
- Filtering of inappropriate content using Blacklist or Whitelist
- Time to be spent browsing the internet
- Time spent on a computer session - control of active hours
- Filtering of websites by categories
- Setting the maximum browsing time of users.
- Excluding group of people not undergoing filtering
- User notifications every minute during the last 5 minutes before disconnection.
- Custom Filter sites to leave accessible even if they are present in one of the categories that we want to block.
- Force SafeSearch youtube.com, duckduckgo, and Google
- SafeSearch bing strength (in http only)
- Blocking search engines deemed unsafe as Bing in https and search.yahoo.com.
- Setting grub2 password
- Customized rules management for iptables. Activated with CTparental -ipton
- Works with Firefox, Midori, chromium
Installing CTparental on Ubuntu 16.04
Installation of CTparental on Ubuntu 16.04 is done from a binary of this application. This binary is downloadable from Github. Ensure you're pulling the latest release from the provided link. If you have an older version of CTparental, ensure it is uninstalled first by running:
$ sudo apt-get autoremove --purge ctparental clamav-* privoxy e2guardian dnsmasq $ sudo rm -rf /etc/CTparental
This is also applicable to other releases of Ubuntu like 17.04 and later. Then download latest CTparental and install it using:
$ wget https://github.com/marsat/CTparental/releases/download/4.21.00d/ctparental_ubuntu16.04_4.21.00-1.0_all.deb $ sudo dpkg -i ctparental_ubuntu16.04_4.21.00-1.0_all.deb
If you get dependency issues, then first do:
$ sudo apt-get -f install
And again run:
$ sudo dpkg -i ctparental_ubuntu16.04_4.21.00-1.0_all.deb
During installation, it will ask you to set the username and password, input this and re-enter to confirm. Note that the password has to be numbers or digits only, no use of special characters.
Installing CTparental on Debian 9
The installation of CTparental on Debian 9 is similar to the one for Ubuntu since the two operating systems share a similar code base. As usual before installing a new package, make sure there is no trace of it that may have been installed earlier. To remove any existing version, run the commands below:
$ sudo apt-get autoremove --purge ctparental clamav- * privoxy lighttpd dnsmasq e2guardian $ sudo rm -rf /etc/CTparental
The last command is for removing any configuration files from /etc/ directory. After executing these commands, install CTparental:
$ wget -c https://github.com/marsat/CTparental/releases/download/4.20.28d/ctparental_debian8_4.20.28-1.0_all.deb $ sudo apt-get install gdebi-core $ sudo gdebi ctparental_debian8_4.20.28-1.0_all.deb
Confirm that the package has been successfully installed using:
$ sudo apt-cache show ctparental Package: ctparental Status: install ok installed Priority: optional Section: utils Installed-Size: 2451 Maintainer: marsat <CTparental@laposte.net> Architecture: all Version: 4.21.00-1.0 Depends: debconf (>= 0.5) | debconf-2.0, gamin, debconf, dnsmasq, lighttpd, lighttpd-mod-magnet, perl, sudo, wget, php-cgi, php-xml, libnotify-bin, notification-daemon, iptables-persistent, rsyslog, dansguardian, privoxy, openssl, libnss3-tools, console-data Conflicts: e2guardian, firewalld Conffiles: /etc/CTparental/CTparental.conf 38f84b107469db4ddc2001ab021d13ac /etc/CTparental/dist.conf 10dcaeb0e33300face7edf7d55246ba9 Description: Controle parental. Filtrage web basé sur dnsmasq, lighttpd et cron, une gestion des horaires de connection est aussi intégrée et une interface web (http://admin.ct.local) permettant de paramétrer tous ça. Le couple login mot de passe doit être saisi à l'install, mais peut être modifié par la suite grâce à la commande CTparental.sh -uhtml. Description-md5: 128f803fde8c1f47b40b80b35d7f7490 Homepage: https://github.com/marsat/CTparental.git
The status should be "install ok installed".
Accessing CTparental Web Interface
Now that everything is set - We have installed the CTparental package successfully, It's time to access the web interface and do further configurations from there. The web URL will be configured automatically, with relevant iptables rules in place. No further configurations are required for the URL to be functional. To access the web interface for CTparental, use this link:
The hostname admin.ct.local has an ip address which you can confirm from a ping on the local system:
$ ping -c 2 admin.ct.local PING admin.ct.local (127.0.0.11) 56(84) bytes of data. 64 bytes from admin.ct.local (127.0.0.11): icmp_seq=1 ttl=64 time=0.038 ms 64 bytes from admin.ct.local (127.0.0.11): icmp_seq=2 ttl=64 time=0.052 ms --- admin.ct.local ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1026ms rtt min/avg/max/mdev = 0.038/0.045/0.052/0.007 ms
This ip is mapped to ip /etc/hosts file as below:
# cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 mypc ...... 127.0.0.11 admin.ct.local fc00::127:11 admin.ct.local 127.0.0.10 privet.ct.local fc00::127:10 privet.ct.local
This asks for authentication - use the username and the password provided earlier during the setup.
CTparental is one of the best tools for filtering access to web content. The fact that it provides an easy to use web interface means anyone can administer it. No deep knowledge of Linux internals is required. The tool can be installed within 5 minutes and ready to use. It is a productive tool for kids and students, and even in a corporate environment. You can save on bandwidth by restricting access to sites like youtube and torrent which are BW intensive.