DNS-over-HTTPS
関連記事
DNS-over-HTTPS は DNS over HTTPS の実装です。スタブリゾルバとして使用できます。
目次
インストール
dns-over-https パッケージを インストール して下さい。
クライアントの起動
ポート 53 にバインドされているすべてのサービスを無効にする
ポート 53 を使用しているプログラムがあるかどうかを確認するには、次のコマンドを実行します。
$ ss -lp 'sport = :domain'
出力に列名の最初の行以上が含まれている場合は、ポート 53 を使用しているサービスを無効にする必要があります。上記のコマンドが次の行のみを出力したら、続行する準備ができています:
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
Change system DNS server
Change your system's DNS server to an address in the listen テンプレート:=
section of the configuration file. If you don't know what you're doing, 127.0.0.1
is recommended.
This can be accomplished either through your Network Manager or through editing /etc/resolv.conf.
Startup
Start or enable doh-client.service
.
Test configuration
To test if your system's DNS works, type nslookup www.google.com
into the command line. Note that this will work before DNS-over-HTTPS is configured, assuming you had a DNS configuration before installing this.
Client configuration
The client configuration file is /etc/dns-over-https/doh-client.conf
by default
Select preferred upstream DNS server
To select a preferred DNS server, uncomment one of the profiles.
If your preferred server is not listed, you may use the following template in the [upstream]
section.
/etc/dns-over-https/doh-client.conf
[[upstream.upstream_ietf]] url = "https://[IP or web address]/dns-query" weight = 20
Troubleshooting
Service does not start properly in wired connection
As explained by the developer:
- ArchLinux doesn’t come with a default network management framework, thus systemd comes without online detection pre-configured.
- If you are on Wi-Fi, I suggest making sure systemd’s online detection can function properly. I believe your system have already installed some network management framework such as NetworkManager to help you manage Wi-Fi passwords.
- Or, if you are on wired network, simply modifying the .service file to disable online detection would be the easiest solution. Installing NetworkManager for a non-mobile machine might be against the K.I.S.S. principle, and we don’t want it.
Upstream suggests to use a drop-in snippet to your service file to:
/etc/systemd/system/doh-client.service.d/override.conf
[Unit] After=multi-user.target [Service] Type=idle