Merge pull request #21323 from geekpi/translating

translated
This commit is contained in:
geekpi 2021-03-17 08:56:03 +08:00 committed by GitHub
commit e8aea51d3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 89 additions and 90 deletions

View File

@ -1,90 +0,0 @@
[#]: subject: (Set up network parental controls on a Raspberry Pi)
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-parental-control)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Set up network parental controls on a Raspberry Pi
======
With minimal investment of time and money, you can keep your kids safe
online.
![Family learning and reading together at night in a room][1]
Parents are always looking for ways to protect their kids online—from malware, banner ads, pop-ups, activity-tracking scripts, and other concerns—and to prevent them from playing games and watching YouTube when they should be doing their schoolwork. Many businesses use tools that regulate their employees' online safety and activities, but the question is how to make this happen at home?
The short answer is a tiny, inexpensive Raspberry Pi computer that enables you to set parental controls for your kids and your work at home. This article walks you through how easy it is to build your own parental control-enabled home network with a Raspberry Pi.
### Install the hardware and software
For this project, you'll need a Raspberry Pi and a home network router. If you spend only five minutes exploring online shopping sites, you will find a lot of options. The [Raspberry Pi 4][2] and a [TP-Link router][3] are good options for beginners.
Once you have your network device and Pi, you need to install [Pi-hole][4] as a Linux container or a supported operating system. There are several [ways to install it][5], but an easy way is to issue the following command on your Pi:
```
`curl -sSL https://install.pi-hole.net | bash`
```
### Configure Pi-hole as your DNS server
Next, you need to configure the DHCP settings in both your router and Pi-hole:
1. Disable the DHCP server setting in your router
2. Enable the DHCP server in Pi-hole
Every device is different, so there's no way for me to tell you exactly what you need to click on to adjust your settings. Generally, you access your home router through a web browser. Your router's address is sometimes printed on the bottom of the router, and it begins with either 192.168 or 10.
In your web browser, navigate to your router's address and log in with the credentials you received when you got your internet service. It's often as simple as `admin` with a numeric password (sometimes this password is also printed on the router). If you don't know the login, call your internet provider and ask for details.
In the graphical interface, look for a section within your LAN about DHCP, and deactivate the DHCP server. Your router's interface will almost certainly look different from mine, but this is an example of what I saw when setting it up. Uncheck **DHCP server**:
![Disable DHCP][6]
(Daniel Oh, [CC BY-SA 4.0][7])
Next, you _must_ activate the DHCP server on the Pi-hole. If you don't do that, none of your devices will be able to get online unless you manually assign IP addresses!
### Make your network family-friendly
You're all set. Now, your network devices (i.e., mobile phone, tablet PC, laptop, etc.) will automatically find the DHCP server on the Raspberry Pi. Then, each device will be assigned a dynamic IP address to access the internet.
Note: If your router device supports setting a DNS server, you can also configure the DNS clients in your router. The client will refer to the Pi-hole as your DNS server.
To set up rules for which sites and activities your kids can access, open a web browser to the Pi-hole admin page, `http://pi.hole/admin/`. On the dashboard, click on **Whitelist** to add web pages your kids are allowed to access. You can also add sites that your kids aren't allowed to access (e.g., gaming, adult, ads, shopping, etc.) to the **Blocklist**.
![Pi-hole admin dashboard][8]
(Daniel Oh, [CC BY-SA 4.0][7])
### What's next?
Now that you've set up your Raspberry Pi for parental control, you can keep your kids safer online while giving them access to approved entertainment options. This can also decrease your home internet usage by reducing how much your family is streaming. For more advanced usage, access Pi-hole's [documentation][9] and [blogs][10].
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/3/raspberry-pi-parental-control
作者:[Daniel Oh][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/daniel-oh
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/family_learning_kids_night_reading.png?itok=6K7sJVb1 (Family learning and reading together at night in a room)
[2]: https://www.raspberrypi.org/products/
[3]: https://www.amazon.com/s?k=tp-link+router&crid=3QRLN3XRWHFTC&sprefix=TP-Link%2Caps%2C186&ref=nb_sb_ss_ts-doa-p_3_7
[4]: https://pi-hole.net/
[5]: https://github.com/pi-hole/pi-hole/#one-step-automated-install
[6]: https://opensource.com/sites/default/files/uploads/disabledhcp.jpg (Disable DHCP)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/uploads/blocklist.png (Pi-hole admin dashboard)
[9]: https://docs.pi-hole.net/
[10]: https://pi-hole.net/blog/#page-content

View File

@ -0,0 +1,89 @@
[#]: subject: (Set up network parental controls on a Raspberry Pi)
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-parental-control)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
在树莓派上设置网络家长控制
======
用最少的时间和金钱投入,就能保证孩子上网安全。
![Family learning and reading together at night in a room][1]
家长们一直在寻找保护孩子们上网的方法,从防止恶意软件、横幅广告、弹出窗口、活动跟踪脚本和其他问题,到防止他们在应该做功课的时候玩游戏和看 YouTube。许多企业使用工具来规范员工的网络安全和活动但问题是如何在家里实现这一点
简短的答案是一台小巧、廉价的树莓派电脑,它可以让你为孩子和你在家的工作设置家长控制。本文将为你介绍如何使用树莓派轻松构建自己的家长控制家庭网络。
### 安装硬件和软件
对于这个项目,你需要一个树莓派和一个家庭网络路由器。如果你只花 5 分钟浏览在线购物网站,你会发现很多选择。[树莓派 4][2] 和 [TP-Link 路由器][3]是初学者的好选择。
有了网络设备和树莓派后,你需要在 Linux 容器或者受支持的操作系统中安装 [Pi-hole][4]。有几种[安装方法][5],但一个简单的方法是在你的树莓派上执行以下命令:
```
`curl -sSL https://install.pi-hole.net | bash`
```
### 配置 Pi-hole 作为你的 DNS 服务器
接下来,你需要在路由器和 Pi-hole 中配置 DHCP 设置:
1. 禁用路由器中的 DHCP 服务器设置
2. 在 Pi-hole 中启用 DHCP 服务器
每台设备都不一样,所以我没有办法告诉你具体需要点击什么来调整设置。一般来说,你可以通过浏览器访问你家的路由器。你的路由器的地址有时会印在路由器的底部, 它以 192.168 或 10 开头。
在浏览器中,打开你的路由器的地址,并用你收到的网络服务凭证登录。它通常是简单的 `admin` 和一个数字密码(有时这个密码也打印在路由器上)。如果你不知道登录名,请打电话给你的供应商并询问详情。
在图形界面中,寻找你的局域网内关于 DHCP 的部分,并停用 DHCP 服务器。 你的路由器界面几乎肯定会与我的不同,但这是一个我设置的例子。取消勾选 **DHCP 服务器**
![Disable DHCP][6]
(Daniel Oh, [CC BY-SA 4.0][7])
接下来,你必须在 Pi-hole 上激活 DHCP 服务器。如果你不这样做,除非你手动分配 IP 地址,否则你的设备将无法上网!
### 让你的网络变得家庭友好
设置完成了。现在,你的网络设备(如手机、平板电脑、笔记本电脑等)将自动找到树莓派上的 DHCP 服务器。然后,每个设备将被分配一个动态 IP 地址来访问互联网。
注意:如果你的路由器设备支持设置 DNS 服务器,你也可以在路由器中配置 DNS 客户端。客户端将把 Pi-hole 作为你的 DNS 服务器。
要设置你的孩子可以访问哪些网站和活动的规则,打开浏览器进入 Pi-hole 管理页面,`http://pi.hole/admin/`。在仪表板上,点击**白名单**来添加你的孩子可以访问的网页。你也可以将不允许孩子访问的网站(如游戏、成人、广告、购物等)添加到**屏蔽列表**。
![Pi-hole admin dashboard][8]
(Daniel Oh, [CC BY-SA 4.0][7])
### 接下来是什么?
现在,你已经在树莓派上设置了家长控制,你可以让你的孩子更安全地上网,同时让他们访问经批准的娱乐选项。这也可以通过减少你的家庭串流来降低你的家庭网络使用量。更多高级使用方法,请访问 Pi-hole 的[文档][9]和[博客][10]。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/3/raspberry-pi-parental-control
作者:[Daniel Oh][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/daniel-oh
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/family_learning_kids_night_reading.png?itok=6K7sJVb1 (Family learning and reading together at night in a room)
[2]: https://www.raspberrypi.org/products/
[3]: https://www.amazon.com/s?k=tp-link+router&crid=3QRLN3XRWHFTC&sprefix=TP-Link%2Caps%2C186&ref=nb_sb_ss_ts-doa-p_3_7
[4]: https://pi-hole.net/
[5]: https://github.com/pi-hole/pi-hole/#one-step-automated-install
[6]: https://opensource.com/sites/default/files/uploads/disabledhcp.jpg (Disable DHCP)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/uploads/blocklist.png (Pi-hole admin dashboard)
[9]: https://docs.pi-hole.net/
[10]: https://pi-hole.net/blog/#page-content