close

Ubuntu的DNS server一樣是用bind,但設定檔案位置與centos不一樣,

統一放在 /etc/bind 底下。

 

安裝bind套件:

sudo apt-get install bind9

 

編輯 sudo nano /etc/bind/named.conf.local ,最底下加入:

zone    "bell.idv.tw"  IN {

#hostname是你註冊的網域名稱,bell.idv.tw是我的網域,填入你想要的 hostname 即可


        type master;
        file "/etc/bind/db.bell";   

};

最後一行是指定網域設定的檔案位置與名稱,可以依照自己的需要取名。

 

編輯 sudo nano /etc/bind/db.bell

$TTL 86400
@       IN      SOA     bell.idv.tw.   bell.bell.idv.tw. (

                        2013111409      ; serial
                        86400           ; refresh
                        1800            ; retry
                        1728000         ; expire
                        1200            ; Negative Caching
                        )
@      IN        NS             dns.bell.idv.tw.
dns             IN      A       220.133.51.88;

@             IN      A       220.133.51.88;


@              IN      MX          0       mail.bell.idv.tw.

@              IN      MX       10      bell.idv.tw.

@              IN      MX       20     www.bell.idv.tw.

;
;
localhost               IN      A       127.0.0.1
loopback                IN      CNAME   localhost
www             IN    A              220.133.51.88
owncloud        IN      A        220.133.51.88
nextcloud    IN      A           220.133.51.88
ftp             IN      CNAME   www
bbs             IN      CNAME   ms1

 

 

檔案寫好後存檔離開。

重新啟動bind:

sudo systemctl restart bind9

 

設定開機後啟動:

sudo systemctl enable named

 

嘗試用nslookup指令去檢查設定是否正確,回應正確表示設定OK。

 

arrow
arrow
    全站熱搜

    呂阿谷 發表在 痞客邦 留言(0) 人氣()