「CoreDNS」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(新規作成)
 
 
(他の1人の利用者による、間の5版が非表示)
3行目: 3行目:
 
{{Related|ドメイン名前解決}}
 
{{Related|ドメイン名前解決}}
 
{{Related articles end}}
 
{{Related articles end}}
  +
[[en:CoreDNS]]
[https://coredns.io/ CoreDNS] is a DNS server/forwarder, written in Go, that chains plugins. Each plugin performs a (DNS) function.
 
  +
[https://coredns.io/ CoreDNS] は、Go で書かれた DNS サーバー/フォワーダーで、プラグインをチェーンしています。各プラグインは、(DNS)機能を実行します。
   
  +
CoreDNS は、高速で柔軟な DNS サーバーです。キーワードは柔軟性です。CoreDNS では、プラグインを利用することで、DNS データで好きなことをすることができます。もし、ある機能が最初から提供されていない場合、プラグインを書くことでそれを追加することができます。
CoreDNS is a fast and flexible DNS server. The key word here is flexible: with CoreDNS you are able to do what you want with your DNS data by utilizing plugins. If some functionality is not provided out of the box you can add it by writing a plugin.
 
   
CoreDNS can listen for DNS requests coming in over UDP/TCP (go'old DNS), TLS (RFC 7858), also called DoT, DNS over HTTP/2 - DoH - (RFC 8484)
+
CoreDNS は、UDP/TCP (go'old DNS), TLS (RFC 7858), DoT, DNS over HTTP/2 - DoH - (RFC 8484) で入ってくる DNS 要求をリッスンすることができます。
   
 
== インストール ==
 
== インストール ==
15行目: 16行目:
 
== 設定 ==
 
== 設定 ==
   
Currently only {{AUR|coredns-git}} provides an example configuration file. You can find that here: [https://aur.archlinux.org/cgit/aur.git/tree/corefile.example?h=coredns-git Example CoreDNS configuration file]
+
現在、{{AUR|coredns-git}} だけが設定ファイルの例を提供しています。それはこちらで見ることができます。 [https://aur.archlinux.org/cgit/aur.git/tree/corefile.example?h=coredns-git CoreDNS の設定ファイル例]
   
systemd will look in {{ic|/etc/coredns/Corefile}}, save the above configuration file in that location.
+
systemd {{ic|/etc/coredns/Corefile}} を探すので、上記の設定ファイルをここに保存してください。
   
[[Start/enable]] {{ic|coredns.service}}.
+
{{ic|coredns.service}} を[[起動/有効化]]します。
 
* {{man|1|coredns|url=https://coredns.io/manual/toc/}}
 
* {{man|1|coredns|url=https://coredns.io/manual/toc/}}
   
With the example configuration CoreDNS will start on port 1053. You can use the {{ic|drill}} command to verify to use CoreDNS is working: {{ic|drill archlinux.org @127.0.0.1 -p 1053}}
+
この設定例では、CoreDNS 1053番ポートで起動します。CoreDNS の利用を確認するために、{{ic|drill}} コマンドを使用することができます。{{ic|drill archlinux.org @127.0.0.1 -p 1053}}
   
 
=== アップストリームリゾルバとしての NextDNS ===
 
=== アップストリームリゾルバとしての NextDNS ===
   
  +
再帰的なリクエストを暗号化したい場合は、Corefile を編集して、設定例の 6 行目から 12 行目を削除してください。
If you would like to encrypt your recursive requests, edit the Corefile and remove lines 6 through 12 in the example configuration.
 
 
{{ic|forward . tls://45.90.28.0 tls://45.90.30.0 { tls_servername dns.nextdns.io }}}
 
{{ic|forward . tls://45.90.28.0 tls://45.90.30.0 { tls_servername dns.nextdns.io }}}
   
 
* {{man|7|coredns-forward|url=https://coredns.io/plugins/forward/}}
 
* {{man|7|coredns-forward|url=https://coredns.io/plugins/forward/}}
You can use any dns53 or DoT resolver in the forward. as the local resolver, edit {{ic|/etc/coredns/Corefile}} and change {{ic|.:1053}} to {{ic|.:53}} you can then configure {{ic|127.0.0.1}} as your nameserver (see see [[Domain name resolution]]). [[Restart]] {{ic|coredns.service}} after that.
 
   
  +
フォワードでは、任意の dns53 または DoT リゾルバーを使用できます。ローカルリゾルバとして、{{ic|/etc/coredns/Corefile}} を編集し、{{ic|.:1053}} を {{ic|.:53}} に変更すると、ネームサーバとして {{ic|127.0.0.1}} を設定できます([[ドメイン名前解決]]参照)。その後、{{ic|coredns.service}} を[[再起動]]します。
Run {{ic|journalctl -u coredns}} as root to verify things are working by default. The resolver will now listen on port {{ic|53}}. If the resolver should be accessible from other hosts, configure other network interfaces in {{ic|/etc/coredns/Corefile}} with {{ic|bind}}. Also the {{ic|acl}} plugin can be used to block ranges that should be use the server for recursion. Refer to [https://coredns.io/plugins/ CoreDNS plugin documentation] for more information.
 
  +
  +
root で {{ic|journalctl -u coredns}} を実行し、デフォルトで動作していることを確認します。リゾルバはポート {{ic|53}} をリッスンするようになります。リゾルバが他のホストからアクセスできるようにするには、{{ic|/etc/coredns/Corefile}} で他のネットワークインターフェイスを {{ic|bind}} で設定します。また、{{ic|acl}} プラグインを使用して、再帰的にサーバを使用すべき範囲をブロックすることができます。詳しくは [https://coredns.io/plugins/ CoreDNS plugin documentation] を参照してください。
  +
 
* {{man|7|coredns-bind|url=https://coredns.io/plugins/bind/}}
 
* {{man|7|coredns-bind|url=https://coredns.io/plugins/bind/}}
   
  +
{{Note|オープン DNS リゾルバを特に実行したい場合を除き、パブリック(インターネットに面した)IPアドレスをリッスンするようにリゾルバを構成しないでください。}}
{{Note|Unless you specifically want to run an open DNS resolver, do not configure the resolver to listen on a public (internet-facing) IP address.}}
 
 
* {{man|7|coredns-acl|url=https://coredns.io/plugins/acl/}}
 
* {{man|7|coredns-acl|url=https://coredns.io/plugins/acl/}}
   
  +
リゾルバが {{ic|/etc/hosts}} ファイルからのエントリーを尊重する必要がある場合、{{ic|/etc/coredns/Corefile}} に {{ic|hosts}} 行を追加してください。
If the resolver should respect entries from the {{ic|/etc/hosts}} file, add a {{ic|hosts}} line to {{ic|/etc/coredns/Corefile}}.
 
 
* {{man|7|coredns-hosts|url=https://coredns.io/plugins/hosts/}}
 
* {{man|7|coredns-hosts|url=https://coredns.io/plugins/hosts/}}
   
78行目: 81行目:
 
* [https://coredns.io/plugins/ CoreDNS plugins]
 
* [https://coredns.io/plugins/ CoreDNS plugins]
 
* [https://github.com/coredns/coredns CoreDNS github]
 
* [https://github.com/coredns/coredns CoreDNS github]
  +
  +
{{TranslationStatus|CoreDNS|2022-06-30|735622}}

2022年8月16日 (火) 14:10時点における最新版

関連記事

CoreDNS は、Go で書かれた DNS サーバー/フォワーダーで、プラグインをチェーンしています。各プラグインは、(DNS)機能を実行します。

CoreDNS は、高速で柔軟な DNS サーバーです。キーワードは柔軟性です。CoreDNS では、プラグインを利用することで、DNS データで好きなことをすることができます。もし、ある機能が最初から提供されていない場合、プラグインを書くことでそれを追加することができます。

CoreDNS は、UDP/TCP (go'old DNS), TLS (RFC 7858), DoT, DNS over HTTP/2 - DoH - (RFC 8484) で入ってくる DNS 要求をリッスンすることができます。

インストール

corednsAURcoredns-binAUR または coredns-gitAUR パッケージをインストールします

設定

現在、coredns-gitAUR だけが設定ファイルの例を提供しています。それはこちらで見ることができます。 CoreDNS の設定ファイル例

systemd は /etc/coredns/Corefile を探すので、上記の設定ファイルをここに保存してください。

coredns.service起動/有効化します。

この設定例では、CoreDNS は 1053番ポートで起動します。CoreDNS の利用を確認するために、drill コマンドを使用することができます。drill archlinux.org @127.0.0.1 -p 1053

アップストリームリゾルバとしての NextDNS

再帰的なリクエストを暗号化したい場合は、Corefile を編集して、設定例の 6 行目から 12 行目を削除してください。 forward . tls://45.90.28.0 tls://45.90.30.0 { tls_servername dns.nextdns.io }

フォワードでは、任意の dns53 または DoT リゾルバーを使用できます。ローカルリゾルバとして、/etc/coredns/Corefile を編集し、.:1053.:53 に変更すると、ネームサーバとして 127.0.0.1 を設定できます(ドメイン名前解決参照)。その後、coredns.service再起動します。

root で journalctl -u coredns を実行し、デフォルトで動作していることを確認します。リゾルバはポート 53 をリッスンするようになります。リゾルバが他のホストからアクセスできるようにするには、/etc/coredns/Corefile で他のネットワークインターフェイスを bind で設定します。また、acl プラグインを使用して、再帰的にサーバを使用すべき範囲をブロックすることができます。詳しくは CoreDNS plugin documentation を参照してください。

ノート: オープン DNS リゾルバを特に実行したい場合を除き、パブリック(インターネットに面した)IPアドレスをリッスンするようにリゾルバを構成しないでください。

リゾルバが /etc/hosts ファイルからのエントリーを尊重する必要がある場合、/etc/coredns/Corefilehosts 行を追加してください。

設定例

これは、便利なプラグインを使用した設定です。

/etc/coredns/Corefile
.:53 {
       bind 127.0.53.1 192.168.1.254 192.0.0.1 
       bufsize 1232 
       acl { 
               allow net 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 192.0.0.0/24
               block
       }
       hosts { 
               reload 0
               fallthrough
       }
       loadbalance
       forward . tls://45.90.28.0 tls://45.90.30.0 {
               tls_servername dns.nextdns.io
       }
       cache {
               success 4096
               denial  1024
               prefetch 512
       }
       prometheus :9153
       errors
       log
}

参照

翻訳ステータス: このページは en:CoreDNS の翻訳バージョンです。最後の翻訳日は 2022-06-30 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。