「DNS-over-HTTPS」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(一部翻訳)
 
(同じ利用者による、間の6版が非表示)
23行目: 23行目:
 
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
 
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
   
=== Change system DNS server ===
+
=== システムの DNS サーバーを変更する ===
   
  +
システムの DNS サーバーを、設定ファイルの {{ic|1=listen = }} セクションのアドレスに変更します。何をしているのかわからない場合は、{{ic|127.0.0.1}} をお勧めします。
Change your system's DNS server to an address in the {{ic|listen {{=}} }} section of the configuration file. If you don't know what you're doing, {{ic|127.0.0.1}} is recommended.
 
   
  +
これは、[[ネットワーク設定#ネットワークマネージャ|ネットワークマネージャ]] または [[ドメイン名前解決|:/etc/resolv.conf]] の編集を通じて実行できます。
This can be accomplished either through your [[Network configuration#Network managers|Network Manager]] or through editing [[:/etc/resolv.conf]].
 
   
=== Startup ===
+
=== 起動 ===
   
[[Start]] or [[enable]] {{ic|doh-client.service}}.
+
{{ic|doh-client.service}} を [[起動]]/[[有効化]] して下さい。
   
=== Test configuration ===
+
=== テスト設定 ===
   
  +
システムの DNS が機能するかどうかをテストするには、コマンドラインに {{ic|nslookup www.google.com}} と入力します。これをインストールする前に DNS 設定があった場合、これは DNS-over-HTTPS が設定される前に機能することに注意してください。
To test if your system's DNS works, type {{ic|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 {{ic|/etc/dns-over-https/doh-client.conf}} by default
+
デフォルトでは、クライアント設定ファイルは {{ic|/etc/dns-over-https/doh-client.conf}} です。
   
  +
=== 優先する上流 DNS サーバーを選択します ===
=== Select preferred upstream DNS server ===
 
   
  +
優先 [https://wiki.archlinux.jp/index.php/%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA:Domain_Name_System DNS サーバー] を選択するには、プロファイルの 1 つのコメントを解除します。
To select a preferred [[DNS server]], uncomment one of the profiles.
 
   
  +
優先サーバーがリストにない場合は、{{ic|[upstream]}} セクションで次のテンプレートを使用できます。
If your preferred server is not listed, you may use the following template in the {{ic|[upstream]}} section.
 
   
 
{{hc|/etc/dns-over-https/doh-client.conf|2=
 
{{hc|/etc/dns-over-https/doh-client.conf|2=
52行目: 52行目:
 
weight = 20
 
weight = 20
 
}}
 
}}
== Troubleshooting ==
 
   
  +
== トラブルシューティング ==
=== Service does not start properly in wired connection ===
 
   
  +
=== 有線接続でサービスが正常に起動しない ===
As [https://github.com/m13253/dns-over-https/issues/150#issuecomment-1709965957 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 [https://github.com/m13253/dns-over-https/issues/150#issuecomment-1706261425 suggests] to use a [[drop-in snippet]] to your service file to:
+
[https://github.com/m13253/dns-over-https/issues/150#issuecomment-1709965957 開発者による説明] のように:
  +
:ArchLinux にはデフォルトのネットワーク管理フレームワークが付属していないため、systemd にはオンライン検出が事前設定されていません。
  +
: Wi-Fi を使用している場合は、systemd のオンライン検出が適切に機能することを確認することをお勧めします。Wi-Fi パスワードの管理に役立つ NetworkManager などのネットワーク管理フレームワークがシステムにすでにインストールされていると思います。
  +
:または、有線ネットワークを使用している場合は、.service ファイルを変更してオンライン検出を無効にするのが最も簡単な解決策です。モバイル以外のマシンに NetworkManager をインストールすることは、KISS の原則に反する可能性があり、それは望ましくありません。
  +
  +
アップストリーム[https://github.com/m13253/dns-over-https/issues/150#issuecomment-1706261425 での提案に]サービスファイルに [[ドロップインスニペット]] を使用して次のことを行うことをお勧めしています。
   
 
{{hc|/etc/systemd/system/doh-client.service.d/override.conf|2=
 
{{hc|/etc/systemd/system/doh-client.service.d/override.conf|2=

2024年3月7日 (木) 03:24時点における最新版

関連記事

DNS-over-HTTPSDNS 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

システムの DNS サーバーを変更する

システムの DNS サーバーを、設定ファイルの listen = セクションのアドレスに変更します。何をしているのかわからない場合は、127.0.0.1 をお勧めします。

これは、ネットワークマネージャ または :/etc/resolv.conf の編集を通じて実行できます。

起動

doh-client.service起動/有効化 して下さい。

テスト設定

システムの DNS が機能するかどうかをテストするには、コマンドラインに nslookup www.google.com と入力します。これをインストールする前に DNS 設定があった場合、これは DNS-over-HTTPS が設定される前に機能することに注意してください。

クライアント設定

デフォルトでは、クライアント設定ファイルは /etc/dns-over-https/doh-client.conf です。

優先する上流 DNS サーバーを選択します

優先 DNS サーバー を選択するには、プロファイルの 1 つのコメントを解除します。

優先サーバーがリストにない場合は、[upstream] セクションで次のテンプレートを使用できます。

/etc/dns-over-https/doh-client.conf
[[upstream.upstream_ietf]]
    url = "https://[IP or web address]/dns-query"
    weight = 20

トラブルシューティング

有線接続でサービスが正常に起動しない

開発者による説明 のように:

ArchLinux にはデフォルトのネットワーク管理フレームワークが付属していないため、systemd にはオンライン検出が事前設定されていません。
Wi-Fi を使用している場合は、systemd のオンライン検出が適切に機能することを確認することをお勧めします。Wi-Fi パスワードの管理に役立つ NetworkManager などのネットワーク管理フレームワークがシステムにすでにインストールされていると思います。
または、有線ネットワークを使用している場合は、.service ファイルを変更してオンライン検出を無効にするのが最も簡単な解決策です。モバイル以外のマシンに NetworkManager をインストールすることは、KISS の原則に反する可能性があり、それは望ましくありません。

アップストリームでの提案にサービスファイルに ドロップインスニペット を使用して次のことを行うことをお勧めしています。

/etc/systemd/system/doh-client.service.d/override.conf
[Unit]
After=multi-user.target

[Service]
Type=idle