zoukankan      html  css  js  c++  java
  • Ubuntu14.04 bind9配置

    apt-get install bind9
    
    配置域名: cn.archive.ubuntu.com
    对应IP: 10.60.233.244
    
    vim  /etc/bind/name.conf.default-zones 
    在文件后面添加:
    zone "archive.ubuntu.com" {
            type master;
            file "/etc/bind/db.archive.ubuntu.com";
    };
    
    zone "233.60.10.in-addr.arpa" {
            type master;
            file "/etc/bind/db.10";
    };
    
    1、添加正向解析:
    vim /etc/bind/db.archive.ubuntu.com
    创建文件并添加:
    ;
    ; BIND data file for local loopback interface
    ;
    $TTL    604800
    @       IN      SOA     ns.archive.ubuntu.com. root.archive.ubuntu.com. (
                                  2         ; Serial
                             604800         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
    ;
    @       IN      NS      ns.archive.ubuntu.com.
    @       IN      A       10.60.233.244
    ns      IN      A       10.60.233.244
    cn      IN      A       10.60.233.244
    
    2、添加反向解析:
    vim /etc/bind/db.10
    创建文件并添加:
    ;
    ; BIND reverse data file for local loopback interface
    ;
    $TTL    604800
    @       IN      SOA     ns.archive.ubuntu.com. root.archive.ubuntu.com. (
                                  1         ; Serial
                             604800         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
    ;
    @       IN      NS      archive.ubuntu.com.
    1.0.0   IN      PTR     cn.archive.ubuntu.com.
    244     IN      PTR     archive.ubuntu.com.
    244     IN      PTR     www.archive.ubuntu.com.
    244     IN      PTR     dns.archive.ubuntu.com.
    244     IN      PTR     cn.archive.ubuntu.com.
    
    修改 /etc/bind/named.conf.options :
    如下设置:
            forwarders {
                    8.8.8.8;
                    8.8.4.4;
            };
    
            allow-query { any; };
    
    OK, 重启服务 service bind9 restart  
    
    测试:
    root@trait:/etc/bind# nslookup cn.archive.ubuntu.com
    Server:         127.0.0.1
    Address:        127.0.0.1#53
    
    Name:   cn.archive.ubuntu.com
    Address: 10.60.233.244
    
    或者:
    
    root@trait:/etc/bind# host cn.archive.ubuntu.com 10.60.235.100
    Using domain server:
    Name: 10.60.235.100
    Address: 10.60.235.100#53
    Aliases: 
    
    cn.archive.ubuntu.com has address 10.60.233.244
  • 相关阅读:
    CentOS7 下nginx与PHP的安装与配置
    Windows下mysql的下载和安装
    用.htaccess文件实现URL重写
    使用PHP_XLSXWriter代替PHPExcel 实现excel数据的导入导出
    window中php的交互模式
    Http状态码
    Windows下Apache与PHP的安装与配置
    java 访问控制权限
    Java 数组 可变参数
    java 同步导出excel数据
  • 原文地址:https://www.cnblogs.com/danxi/p/6181855.html
Copyright © 2011-2022 走看看