!C 未満の逆引 うまくいかない時には allow-transfer { any; }; allow-query { any; }; をつける。 // If named is being used only as a local resolver, this is a safe default. // For named to be accessible to the network, comment this option, specify // the proper IP address, or delete this option. // listen-on { 127.0.0.1; }; // << コメントアウトする!!!! の行をコメントアウトする。(でないと localhost からしか通信できない。。 PORT は TCP と UDP 両方通信出来ること !キャッシュサーバネットワークの指定 named.conf に options { (省略) allow-recursion { service-networks; # 定義された acl を用いた例 #(none/any/localhost/localnets が標準で定義されている) 192.168.1.2; # ホストのIPを指定した場合 192.168.20.0/24; # ネットワーク単位で指定した場合 }; (省略) }; # 以下 ACL の書方 acl service-networks { 192.168.100.100; 192.168.200.0/24; }; を追加する 192.168.1.2 , 192.168.20.0/24, 192.168.100.100, 192.168.200.0/24 から許可される ! bind の IPv6 を止める // an IPv6 address, or the keyword "any". // listen-on-v6 { ::1; }; listen-on-v6 { none; }; ! named.conf_sample # diff ./named.conf ./named.conf.sample 11d10 < 23c22 < // listen-on { 127.0.0.1; }; --- > listen-on { 127.0.0.1; }; 29d27 < listen-on-v6 { none; }; 46d43 < 342,343d338 < server 0.0.0.0/0 { edns no; }; < 386,437d380 < /*******************************************************************/ YOUR_ZONE_SETTINGs < < // < // End of File < // < < !Windows AD サーバの対応 参考 http://www.linuxquestions.org/questions/linux-networking-3/howto-ms-active-directory-with-bind-on-linux-379377/ http://technet.microsoft.com/ja-jp/library/cc985025.aspx 動作上以下の内容が必要 ( ドメイン名は適宜 ) $ORIGIN _tcp.dc._msdcs.corp.com. _kerberos SRV 0 0 88 AD.CORP.COM. _ldap SRV 0 0 389 AD.CORP.COM. $ORIGIN _tcp.corp.com. _kerberos SRV 0 0 88 AD.CORP.COM. _ldap SRV 0 0 389 AD.CORP.COM. _kpasswd SRV 0 0 464 AD.CORP.COM. _gc SRV 0 0 3268 AD.CORP.COM. $ORIGIN _udp.corp.com. _kerberos SRV 0 0 88 AD.CORP.COM. _kpasswd SRV 0 0 464 AD.CORP.COM. $ORIGIN _tcp.Default-First-Site-Name._sites.corp.com. _kerberos SRV 0 0 88 AD.CORP.COM. _ldap SRV 0 0 389 AD.CORP.COM. _gc SRV 0 0 3268 AD.CORP.COM. $ORIGIN _tcp.Default-First-Site-Name._sites.dc._msdcs.corp.com. _kerberos SRV 0 0 88 AD.CORP.COM. _ldap SRV 0 0 389 AD.CORP.COM. $ORIGIN _tcp.Default-First-Site-Name._sites.ad.corp.com. _ldap SRV 0 0 389 AD.CORP.COM. _gc SRV 0 0 3268 AD.CORP.COM. $ORIGIN _tcp.corp.com. _ldap SRV 0 0 389 AD.CORP.COM. _gc SRV 0 0 3268 AD.CORP.COM. _ldap._tcp.pdc._msdcs SRV 0 0 389 AD.CORP.COM. _ldap._tcp..domains._msdcs SRV 0 0 389 AD.CORP.COM. _ldap._tcp.Default-First-Site-Name._sites.gc._msdcs SRV 0 0 3268 AD.CORP.COM. _ldap._tcp.gc._msdcs SRV 0 0 3268 AD.CORP.COM. _ldap._tcp.Default-First-Site-Name._sites.ad.corp.com SRV 0 0 389 AD.CORP.COM. _ldap._tcp.ad.corp.com SRV 0 0 389 AD.CORP.COM. ADサーバからのIPの更新の対応を設定 zone "ad01.adserver.foo.bar.domain" in { type master; file "ad01.adserver.foo.bar.domain.zone"; allow-update { 172.16.0.1; 172.16.0.2; 172.16.0.3; }; }; ---- !master の名前の連番化 (省略) $ORIGIN example.jp. $GENERATE 20-250 host$ A 192.168.11.$ (省略) !逆引きの連番 (省略) $GENERATE 20-250 $.11.168.192.in-addr.arpa. PTR host$.example.jp. (省略) !ファイルの読み込み $INCLUDE master/include/foobar.zone $INCLUDE master/include/foobar.rev ---- ! named.conf のoption のサンプル options { directory "/var/named"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; #### 追加(ここから) #### allow-query{ 127.0.0.1; 192.168.1.0/24; # ← このDNSサーバーを使用するのは内部のみ }; allow-recursion{ 127.0.0.1; 192.168.1.0/24; # ← このDNSサーバーをキャッシュサーバーとして使用するのは内部のみ }; allow-transfer{ 127.0.0.1; 192.168.1.0/24; # ← このDNSサーバーのゾーンデータの転送先は内部のみ }; forwarders{ 192.168.1.1; # ← ルーター経由接続環境の場合はルーターのIPアドレスを指定※ # XXX.XXX.XXX.XXX;  ← PPPoE接続環境の場合はプロバイダから通知されたDNSサーバー(プライマリ)のIPアドレスを指定 # XXX.XXX.XXX.XXX; # ← PPPoE接続環境の場合はプロバイダから通知されたDNSサーバー(セカンダリ)のIPアドレスを指定 }; #### 追加(ここまで) #### };