CentOS DNS
Bind
Install
1 | yum install bind bind bind-chroot -y |
Start Service
1 | service named start |
Bind 配置
1 | vim /var/named/chroot/etc/named.conf |
1 | options { |
配置主配置文件
1 | cd /var/named/chroot/etc/ |
1 | zone "vitan.me" IN { |
区域配置文件
- 正向解析域
1 | cd /var/named/chroot/var/named |
1 | $TTL 1D |
- 反向向解析域
1 | cd /var/named/chroot/var/named |
1 | $TTL 1D |
重启 DNS 服务
1 | service named restart/reload |
客户端配置与测试
- 以便能使用 nslookup dig 和 host
1 | yum install bind-utils -y |
1 | vim /etc/resolv.conf |
1 | search vitan.me |
Test
1 | dig www.vitan.me |