Linux 上如何定 IPv6 - Name Server | 列印 |

 


 

 

[快速及簡單的設定 Linux IPv4/IPv6 Dual Mode Name Server

  的方法]
 


  
   1. 編輯 /etc/named.conf 或 /var/named/chroot/etc/named.conf 如下:

       注意: 若相關的設定檔是在 /var/named/chroot 目錄下, 則設定檔中的所有的目錄

               就會放在 /var/named/chroot 之下.
 
      options {
         directory "/named";
         listen-on-v6 { any; };
      };
 
      zone "my_domain.com" {
         type master;
         file "my_domain";
      };
 

   2. 編輯 /named/my_domain 或 /var/named/chroot/named/my_domain 如下:

      $TTL 36000                                                                     
      @         IN SOA  dns1.my_domain.com. dns2.my_domain.com. (
                 1206211752
                 3600
                 3600
                 604800
                 86400 )
 
      @          IN      NS         my_domain.com.
      @          IN      AAAA    2621:0:1cfe:face:b00c::1
      @          IN      A          10.0.0.4
      dns1       IN      AAAA    2621:0:1cfe:face:b00c::1
                   IN      A          10.0.0.4
      dns2       IN      AAAA    2621:0:1cfe:face:b00c::1
                   IN      A          10.0.0.4
 

   3. 重新啟動 name server
 
      /sbin/service named restart
 
   4. 用 nslook 來測試設定是否正確
 
      nslookup
      >server 2621:0:1cfe:face:b00c::1
      >set type=a
      >dns1.my_domain.com

       Server:         2621:0:1cfe:face:b00c::1
       Address:       2621:0:1cfe:face:b00c::1#53
 
       Name:    dns1.my_domain.com
       Address: 10.0.0.4

      >set type=aaaa
      >dns1.my_domain.com

       Server:         2621:0:1cfe:face:b00c::1
       Address:       2621:0:1cfe:face:b00c::1#53
 
       dns1.my_domain.com       has AAAA address 2621:0:1cfe:face:b00c::1

 
Hjemmeside Wildberry Telefoni Internet