如何设置自己的保护隐私的 DNS 服务器
Adguard DNS
![](/data/attachment/album/202303/29/150451m9ggza42gagt9gih.jpg)



> 
> 通过开源项目 AdGuard Home 运行你自己的 DNS 服务器来控制你的互联网隐私。
> 
> 
> 


域名服务器（DNS）将域名（如 example.com）与 IP 地址（如 93.184.216.34）相关联。这就是当你输入 URL 或搜索引擎返回 URL 供你访问时，你的网络浏览器如何知道在世界的哪个地方寻找数据。DNS 为互联网用户提供了极大的便利，但也并非没有缺点。例如，付费广告会出现在网页上，因为你的浏览器会自然的使用 DNS 来解析这些广告在互联网上“存在”的位置。同样，跟踪你在线活动的软件通常由通过 DNS 解析的服务启用。你不想完全关闭 DNS，因为它非常有用。但是你可以运行自己的 DNS 服务，以便更好地控制它的使用方式。


我相信运行自己的 DNS 服务器至关重要，这样你就可以阻止广告并保持你的浏览隐私，远离试图分析你的在线交互的提供商。我过去用过 [Pi-hole](https://opensource.com/article/18/2/block-ads-raspberry-pi)，今天仍然推荐它。然而，最近，我一直在我的网络上运行开源项目 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome)。我发现它有一些值得探索的独特功能。


### AdGuard Home


在我使用过的开源 DNS 软件中，[AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 是最容易设置和维护的。你可以在一个项目中获得许多 DNS 解析解决方案，例如 DNS over TLS、DNS over HTTPS 和 DNS over QUIC。


你可以使用一个脚本将 AdGuard 设置为容器或本地服务：



```
$ curl -s -S -L \
    https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh

```

查看这个脚本以便了解它的作用。了解了它的工作过程后，再运行它：



```
$ sh ./install.sh

```

我最喜欢 AdGuard Home 的一些功能：


* 一个简单的管理界面
* 使用 AdGuard 阻止列表来阻止广告和恶意软件
* 单独配置网络上每个设备的选项
* 强制在特定设备上进行安全搜索
* 为管理界面设置 HTTPS，这样与它的远程交互是完全加密的


我发现 AdGuard Home 为我节省了时间。它的黑名单比 Pi-hole 上的黑名单更强大。你可以快速轻松地将其配置为 DNS over HTTPS。


### 没有更多的恶意软件


恶意软件是你计算机上不需要的内容。它并不总是对你有直接危险，但它可能会为第三方带来危险活动。这不是互联网最初的目的。我认为你应该托管自己的 DNS 服务，以保护你的互联网历史记录的私密性，并避免被微软、谷歌和亚马逊等已知跟踪器掌握。在你的网络上试用 AdGuard Home 吧。




---


via: <https://opensource.com/article/23/3/open-source-dns-server>


作者：[Amar Gandhi](https://opensource.com/users/amar1723) 选题：[lkxed](https://github.com/lkxed/) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
A Domain Name Server (DNS) associates a domain name (like example.com) with an IP address (like 93.184.216.34). This is how your web browser knows where in the world to look for data when you enter a URL or when a search engine returns a URL for you to visit. DNS is a great convenience for internet users, but it's not without drawbacks. For instance, paid advertisements appear on web pages because your browser naturally uses DNS to resolve where those ads "live" on the internet. Similarly, software that tracks your movement online is often enabled by services resolved over DNS. You don't want to turn off DNS entirely because it's very useful. But you can run your own DNS service so you have more control over how it's used.

I believe it's vital that you run your own DNS server so you can block advertisements and keep your browsing private, away from providers attempting to analyze your online interactions. I've used [Pi-hole](https://opensource.com/article/18/2/block-ads-raspberry-pi) in the past and still recommend it today. However, lately, I've been running the open source project [Adguard Home](https://github.com/AdguardTeam/AdGuardHome) on my network. I found that it has some unique features worth exploring.

## Adguard Home

Of the open source DNS options I've used, [Adguard Home](https://github.com/AdguardTeam/AdGuardHome) is the easiest to set up and maintain. You get many DNS resolution solutions, such as DNS over TLS, DNS over HTTPS, and DNS over QUIC, within one single project.

You can set up Adguard as a container or as a native service using a single script:

```
``````
$ curl -s -S -L \
https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh
```


Look at the script so you understand what it does. Once you're comfortable with the install process, run it:

```
````$ sh ./install.sh`



Some of my favorite features of AdGuard Home:

-
An easy admin interface

-
Block ads and malware with the Adguard block list

-
Options to configure each device on your network individually

-
Force safe search on specific devices

-
Set HTTPS for the admin interface, so your remote interacts with it are fully encrypted


I find that Adguard Home saves me time. Its block lists are more robust than those on Pi-hole. You can quickly and easily configure it to run DNS over HTTPS.

## No more malware

Malware is unwanted content on your computer. It's not always directly dangerous to you, but it may enable dangerous activity for third parties. That's not what the internet was ever meant to do. I believe you should host your own DNS service to keep your internet history private and out of the hands of known trackers such as Microsoft, Google, and Amazon. Try Adguard Home on your network.

## 1 Comment