우분투에서 Bind9을 네임서버로 어떻게 설정합니까?

우분투에서 Bind9을 네임서버로 어떻게 설정합니까?

내 자신의 DNS 서버 ns1.myhostingdomain.com 및 ns2.myhostingdomain.com을 설정하고 싶습니다.
사용할 두 개의 별도 서버가 있습니다. 하나는 기본 서버로, 다른 하나는 슬레이브로 사용됩니다. 내 목표는 웹 호스팅 설정을 위해 설정하는 것입니다. 새 도메인(영역)을 추가한 다음 새로 구입한(호스팅) 도메인이 ns1.myhostingdomain.com 및 ns2.myhostingdomain.com을 가리키도록 하고 싶습니다.

나는 슬레이브를 추가하지 않고 먼저 기본 작업부터 시작한 다음 기본 작업이 완료되면 슬레이브를 작동시키려고 노력할 것이라고 생각했습니다. 우분투 9.10(karmic)에 바인딩9을 설치했습니다.
부분적으로 구성되어 있는 것 같습니다. 지금까지 다음을 수행했습니다.

수정됨: /etc/bind/named.conf.options - ns1.myhostingdomain.com 서버 위에 있는 이름 서버로 전달자를 변경했습니다(호스트 이름은 실제로 ns1이 아니고 포세이돈입니다.* , 그게 중요하다면)

options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

    // If your ISP provided one or more IP addresses for stable
    // nameservers, you probably want to use them as forwarders.
    // Uncomment the following block, and insert the addresses replacing
    // the all-0's placeholder.

    forwarders {
            69.20.95.4;
            65.61.188.4;
    };

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};


/etc/bind/named.conf.local에 영역을 추가했습니다.

#start_zone myhostingdomain.com
zone "myhostingdomain.com" {
        type master;
        file "/etc/bind/zones/myhostingdomain.com.db";
};

그런 다음 /etc/bind/zones/myhostingdomain.com.db 영역 파일을 만들었습니다.

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns1.myhostingdomain.com. dnsadmin.myhostingdomain.com. (
                        20100809001     ; Serial
                        1H              ; Refresh
                        15M             ; Retry
                        4W              ; Expire
                        1H              ; Negative Cache TTL
                        )
;
@       IN      NS      ns1.myhostingdomain.com.
@       IN      NS      ns2.myhostingdomain.com.
@       IN      A       184.106.207.45
ns1     IN      A       184.106.207.45
ns2     IN      A       184.106.229.136

내가 놓친 것이 있습니까? 아니면 완전히 잘못하고 있습니까?

답변1

등록자 수준에서 DNS 서버를 가리키는 영역이 있습니까? A는 dig +trace ns1.myhostingdomain.com더 많은 정보와 출력을 제공해야 합니다.cat /etc/resolv.conf

답변2

바인딩을 다시 시작하고 syslog에서 오류를 확인하면 작업이 완료됩니다.

시스템 보안을 위한 단계로서 재귀를 주소 공간으로만 제한해야 할 것입니다.

options {
    ...
    // uncomment this section to limit recursion to internal hosts
    allow-recursion {
        localhost;
        10.0.0.0/8;
        172.16.0.0/12;
        192.168.0.0/16;
    };
    ...
};

관련 정보