DNSフィルタリング
DNSフィルタリングのメリットを実感するための一番簡単な方法は、AdGuard 広告ブロッカーをインストールするか、AdGuard DNS を試してみることです。 そして、ネットワークレベルでDNSフィルタリングしたい場合は、AdGuard Home が最適です。
Quick links: Download AdGuard Ad Blocker, Get AdGuard Home, Try AdGuard DNS
To better understand DNS filtering, first, we should answer the question “What is DNS?”
「DNS」とは?
DNS stands for Domain Name System, and its purpose is to translate websites’ names into something browsers can understand, i.e. IP addresses. つまり、各ウェブサイトにアクセスするたびに、ブラウザは特種のサーバー(DNSサーバー)にリクエストを送信します。 そのサーバーはリクエストされたドメイン名を調べ、対応するIPアドレスを返信します。 このプロセスを簡単な図に表すとこうなります:

もちろん、ブラウザだけでなく、ウェブリクエストを送信するアプリやプログラムのすべてが同じようなプロセスになります。
DNSフィルタリングの仕組み
DNSフィルタリングをサポートする AdGuard アプリを使用すると、AdGuard アプリはデバイスとDNSサーバーの間のバッファ(仲介)として機能します。 デバイス上のブラウザやアプリが送信しようとするすべてのDNSリクエストは、まずAdGuardによって処理されます。 If you’re using the default DNS server provided by your ISP, your DNS traffic is likely not encrypted and vulnerable to snooping and hijacking. AdGuard は、DNSリクエストがデバイスから送信される前にすべて暗号化し、悪意のある第三者がその内容にアクセスできないようにします。 On top of that, AdGuard can identify requests to ad, tracking, and/or adult domains and redirect them to a “blackhole” instead of forwarding them to the DNS server. (これについては以下で説明しております。)

DNS filtering is a powerful tool and it’s supported by all major AdGuard apps: AdGuard for Windows, AdGuard for Mac, AdGuard for Android and AdGuard for iOS.
DNSフィルタリングは、2つの機能に分けることができます。DNSトラフィックを暗号化してDNSサーバーにリルーティングする機能と、DNSブロックリストを適用して一部のドメインをローカルでブロックする機能です。
DNSサーバー
DNSサーバーは何千もあって、それぞれ特性と目的においてユニークであります。 多くは単にリクエストされたドメインのIPアドレスを返すだけですが、広告、トラッキング、アダルトドメインなどをブロックする追加機能を持つものもあります。 現在、一般的なDNSサーバーのすべては、信頼できる暗号化プロトコル(DNS-over-HTTPS、DNS-over-TLS)を1つ以上採用しています。 AdGuard also provides a DNS service, and it was the world’s first to offer the brand new and very promising DNS-over-QUIC encryption protocol. AdGuard は目的別に複数のDNSサーバーを用意しています。 以下の図は、AdGuardのブロッキングサーバーの仕組みを示しています:

他のDNSプロバイダーの仕組みは違ったりするので、それらのDNSサーバーを使う前に、プロバイダーや仕組みについての情報を確認しておいてください。 こちらの記事で、最も人気のあるDNSプロバイダーの一覧を確認することができます。 All AdGuard apps that support DNS functionality also have a list of DNS servers to choose from, or even allow to select any custom DNS server that you’d like.
ローカルDNSブロックリスト
しかし、DNSトラフィックをフィルタリングするためにDNSサーバーだけに頼ることは、柔軟性を失うことになります。 If the selected server blocks a domain, you can’t access it. With AdGuard, you don’t even need to configure any specific DNS server to filter DNS traffic. AdGuard 製品のすべてで、DNS ブロックリスト(シンプルな hosts ファイルやより高度な構文を使用するリストなど)を使用できます。 DNSブロックリストは、通常のブロックリストと同じように機能します。つまり、DNSリクエストがアクティブフィルタリストのルールの1つにマッチすると、そのリクエストはブロックされます。 To be more precise, the DNS server gives a non-routable IP address for such a request.
In AdGuard for iOS, first you have to enable Advanced mode in Settings in order to get access to DNS blocking.
You can add as many custom blocklists as you wish. For instance, you can use AdGuard DNS filter. It quite literally blocks everything that AdGuard DNS server does, but in this case you are free to use any other DNS server. Plus, this way you can add more filters or create custom exception rules, all of which would be impossible with a simple “use a blocking DNS server” setup.
There are hundreds of different DNS blocklists, you can look for them on filterlists.com.
DNSフィルタリングとネットワークフィルタリングの比較
Network filtering is what we call the regular way AdGuard standalone apps process network traffic, hence the name. Feel free to brush up on it by reading this article.
First of all, we have to mention that with AdGuard you don’t have to choose. You can always use both regular network filtering and DNS filtering at the same time. However, it’s important to understand key differences between the two. DNS filtering has both its unique advantages and drawbacks:
Pros of DNS filtering:
- プラットフォームによっては、これがシステム全体フィルタリングを実現する唯一の方法です。 For example, on iOS only the Safari browser supports content blocking in the familiar sense, for everything else there’s only DNS filtering.
- トラッキング(追跡)の一部( CNAMEトラッキングなど)は、DNSフィルタリングによってのみ防止できます。
- DNSリクエストを処理する段階は、広告やトラッカーに対処する場合の最も早い段階であるため、バッテリー寿命とトラフィックを少し節約するのに役立ちます。
Cons of DNS filtering:
DNS filtering is coarse — it doesn’t remove whitespace left behind a blocked ad or apply any sorts of cosmetic filtering. Many of the more complicated ads can’t be blocked on DNS-level (or rather, they can, but only by blocking the entire domains which are being used for other purposes).
An example of the difference between DNS filtering and network filteringIt’s not possible to know the origin of a DNS request, which means you can’t distinguish between different apps on the DNS-level. This impacts the statistics negatively and makes it impossible to create app-specific filtering rules.
We recommend using DNS filtering in addition to network filtering, not instead of it, whenever possible.