1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

bind9でのforwarders設定

Last updated at Posted at 2022-02-10

bind9での転送設定

軽くハマったのでメモしておきます。

環境

バージョン

# named -V
BIND 9.16.1-Ubuntu (Stable Release) <id:d497c32>

構成

  • 外部に社内DNSあり(172.16.0.2)
  • private NW(192.168.4.0/24, Domain:hoge.localdomain)を作り、DNS(bind9)も建てる
  • DNSはprivate NW内からhoge.localdomainのnodeを名前解決する
  • hoge.localdomain以外の名前は社内DNSへforwardする

設定

/etc/bind/named.conf.optionsを修正する。

デフォルト

named.conf.options
options {
        directory "/var/cache/bind";
        dnssec-validation auto;
        listen-on-v6 { any; };
};

修正後

named.conf.options
options {
        directory "/var/cache/bind";
        forwarders {
                172.16.0.2;
        };
        dnssec-validation no;
        allow-recursion {127.0.0.1; 192.168.4.0/24; };
        listen-on-v6 { any; };
};

環境次第でしょうが、私の利用環境ではforwardersで転送先DNSサーバを設定するほかに、dnssec-validationは明示的に"no"設定にしないとforwardされませんでした(コメントアウトではダメ)。
forwarders設定したのに外部ノードの解決がされない場合は試してみてください。

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?