Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

第 33 章 DNS/Bind

目錄

33.1. 安裝 bind9
33.2. forwarders
33.3. Load Balancing
33.4. view
33.5. Master / Slave
33.5.1. master /etc/named.conf
33.5.1.1. /var/named/example.com.zone
33.5.1.2. /var/named/example.com.zone
33.5.2. slave /etc/named.conf
33.5.3. FAQ
33.5.3.1. Master 更改後 Slave 不同步
33.5.3.2. Master 與 Slave 的 Test
33.6. DNS tools
33.6.1. dig - DNS lookup utility
33.6.1.1. any
33.6.1.2. ns
33.6.1.3. A
33.6.1.4. mx
33.6.1.5. cname
33.6.1.6. txt
33.6.1.7. -x addr 反向解析
33.6.1.8. web dig
33.6.2. nslookup - query Internet name servers interactively
33.6.2.1. 刷新 DNS 解析緩存
33.6.2.2. 查看NS記錄
33.6.2.3. Mx 記錄
33.6.2.4. txt
33.7. DNS
33.7.1. OpenDNS
33.7.2. Google DNS
33.8. NamedManager

33.1. 安裝 bind9

neo@master:~$ # apt-get install bind9

named.conf.local.neo.org

neo@master:~$ cat /etc/bind/named.conf.local.neo.org

zone "neo.org" in {
     type master;
     file "db.neo.org";
};

zone "0.16.172.in-addr.arpa" in {
    type master;
    file "db.172.16.0";
};
		

/var/cache/bind/db.neo.org

neo@master:~$ cat /var/cache/bind/db.neo.org
@ IN SOA        neo.org. root.neo.org. (
                          200211131 ; serial, todays date + todays serial #
                          28800 ; refresh, seconds
                          7200 ; retry, seconds
                          3600000 ; expire, seconds
                          86400 ) ; minimum, seconds
        NS ns.neo.org.
@       IN A         172.16.0.1
www     IN A         172.16.0.1
mail    IN A         172.16.0.1
@       MX 10 mail.neo.org.
		

/var/cache/bind/db.172.16.0

neo@master:~$ cat /var/cache/bind/db.172.16.0
@ IN SOA neo.org root.neo.org. (
                               2002111300 ; Serial
                               28800 ; Refresh
                               14400 ; Retry
                               3600000 ; Expire
                               86400 ) ; Minimum
                               IN NS ns.neo.org.

1 PTR www1.neo.org.
2 PTR www2.neo.org.
3 PTR www3.neo.org.
neo@master:~$

		

/etc/resolv.conf

neo@master:~$ cat /etc/resolv.conf
search neo.org
nameserver 172.16.0.2
neo@master:~$