本页内容
- 先决条件
- 入门
- 安装 CTparental
- 设置 Hosts 文件
- 访问 CTparental
- 结论
CTparental 是一款免费的开源家长控制工具,用于控制计算机使用或互联网浏览。它带有一个由 Lighttpd Web 服务器驱动的简单易用的 Web 界面。CTparental 工具的想法来自其他工具,例如 iptables、dnsmasq 和 inguardian privoxy。
功能特性
- 使用黑名单或白名单过滤内容
- 支持 Firefox、Midori 和 chromium
- 按类别过滤网站
- 允许用户设置最大浏览时间
- 控制计算机会话中的活动时间
- 强制 duckduckgo 和 google 的 SafeSearch
在这篇文章中,我们将向您展示如何在 Debian 10 上安装 CTparental。
先决条件
- 一个运行 Debian 10 桌面的系统。
- 服务器上配置了 root 密码。
开始
首先,通过运行以下命令将系统软件包更新到最新版本:
apt-get update -y
所有软件包更新完成后,您可以继续执行下一步。
安装 CTparental
默认情况下,CTparental 不包含在 Debian 10 默认存储库中。因此您需要从 GitLab 网站下载它。
您可以使用以下命令下载它:
wget -c https://gitlab.com/marsat/CTparental/uploads/d5567eb1a43ffde679193bce87be5f69/ctparental_debian10_lighttpd_4.44.18-1.0_all.deb
下载完成后,使用以下命令安装下载的文件:
dpkg -i ctparental_debian10_lighttpd_4.44.18-1.0_all.deb
如果遇到任何依赖项错误,请运行以下命令安装所有必需的依赖项:
apt-get install -f
在安装过程中,您将被要求设置一个管理员用户,如下所示:

提供您的用户名并按下 Enter。您将被要求为管理员用户设置密码,如下所示:

提供您的密码并按下 ENTER 以完成安装。
所有依赖项安装完成后,您可以使用以下命令验证 CTparental 的安装:
apt-cache show ctparental
您应该得到以下输出:
Package: ctparental Status: install ok installed Priority: optional Section: utils Installed-Size: 2568 Maintainer: marsat < [email protected] > Architecture: all Version: 4.44.18-1.0 Depends: debconf (>= 0.5) | debconf-2.0, debconf, dnsmasq, lighttpd, sudo, wget, php-cgi, php-xml, libnotify-bin, notification-daemon, nftables, rsyslog, e2guardian, privoxy, openssl, libnss3-tools, console-data, dnsutils, whiptail, ifupdown2 | ifupdown, rsync, openssh-server Conflicts: dansguardian Conffiles: /etc/CTparental/CTparental.conf c423d608fbc18de0512efb68c4fdcaf6 /etc/CTparental/dist.conf 61085f21f8656cc10a30da6759d8154c Description: Controle parental. Filtrage web basé sur dnsmasq, e2guardian, privoxy, lighttpd , systemd timer et nftables 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: 26847a28b1b9824d5d1994ca6224ffe0 Homepage: https://gitlab.com/marsat/CTparental
设置 Hosts 文件
CTparental 现已安装并在 127.0.0.11 和 127.0.0.10 上监听端口 80 和 443。CTparental 运行在 Lighttpd Web 服务器上,并使用域名 admin.ct.local 和 privet.ct.local 创建一个配置文件。因此您需要编辑 /etc/hosts 文件,并将这两个域名与监听 IP 绑定。
nano /etc/hosts
添加以下行:
127.0.0.11 admin.ct.local 127.0.0.10 privet.ct.local
完成后保存并关闭文件。
访问 CTparental
现在,打开您的 Web 浏览器并使用 URL https://admin.ct.local 访问 CTparental Web 界面。您应该看到 CTparental 登录页面:

提供您的管理员用户名和密码,然后单击 Login 按钮。您应该在下一页看到 CTparental 仪表板:

结论
恭喜!您已在 Debian 10 桌面上成功安装 CTparental。您现在可以使用 CTparental 来控制计算机使用和互联网浏览。