Skip to main content

Ubuntu 계열

# 필요 패키지

sudo apt install bind9 bind9utils bind9-doc

 

# IPv4 전용으로 설정을 변경

sudo vi /etc/default/named

OPTIONS="-u bind -4"

 


# /etc/bind/named.conf.local 

zone "spelix.com" IN {
        type master;
        file "/etc/bind/zones/db.spelix.com";
        allow-update { none; };
};

 

# /etc/bind/zones/db.spelix.com
    • zones 라는 디렉토리가 없으면 만든다.
    • zone 파일의 첫 열(row, 세로)에 공백이 있어서는 안된다.

 

$TTL 1D
spelix.com.  IN  SOA  ns1.spelix.com. krauss.spelix.com. (
                             1             ; serial
                             10800     ; refresh after 3 hours
                             3600      ; retry after 1 hour
                             604800   ; expire after 1 week
                             86400    ; minimum TTL of 1 day
)

spelix.com.  IN NS  ns1.spelix.com.

ns1.spelix.com.  IN  A  115.71.1.39
m1.packstack.spelix.com.  IN  A  115.71.1.40

; web server that is places out side of this local network
www.spelix.com.  IN  A  34.149.87.45

ntp.spelix.com.  IN  CNAME  ns1.spelix.com.