你的位置:首页 > 操作系统

[操作系统]Linux搭建DNS服务器


Linux系统信息:

Version: Centos 6.6

Ip address:10.0.0.104

Hostname: extmail.com

  1. 配置系统

    hostname

Vim /etc/sysconfig/network


 

Vim /etc/hosts


 

Vim /etc/resolv.conf


 

  1. 安装

Yum install bind bind-libs bind-chroot bind-utils


 

  1. 配置

Vim /etc/named.conf


 

// 在后面增加

vim /etc/named.rfc1912.zones


 

// extmail.com.zone

Vim /var/named/extmail.com.zone

 

$TTL 1D

@ IN SOA extmail.com. rname.invalid. (

0 ; serial

1D ; refresh

1H ; retry

1W ; expire

3H ) ; minimum

NS @

A 127.0.0.1

AAAA ::1

mail IN A 10.0.0.104

smtp IN A 10.0.0.104

pop3 IN A 10.0.0.104

// zone.extmail.com

Vim /var/named/zone.extmail.com

$TTL 1D

@ IN SOA extmail.com. rname.invalid. (

0 ; serial

1D ; refresh

1H ; retry

1W ; expire

3H ) ; minimum

NS @

AAAA ::1

104 PTR mail.extmail.com.


 

  1. 测试