现在的位置: 首页 > 操作系统 > 正文

install and config bind9(named) on linux server

2019年03月11日 操作系统 ⁄ 共 2510字 ⁄ 字号 评论关闭

秒速赛车公式 www.l19l7.cn This article shows my process of installing and configuring bind9 DNS server on a linux server. I didn't touch every aspects of bind9, but following the process, a DNS server is configured with A/AAAA, NAPTR and SRV resource record types. The DNS server
is able to be used for testing.

## download bind-9.10.0-P1.tar.gz

https://www.isc.org/downloads/bind/

## untar the package 
tar xzvf bind-9.10.0-P1.tar.gz

## config and install 
cd bind-9.10.0-P1
./configure 
./make 
./make install 

## test named is installed
named -v
named -g 

## generate rndc.key
cd /etc
rndc-confgen -a

## generate /etc/named.conf with contents 
cat /etc/named.conf
zone "lingcloud.com" {
type master;
file "/etc/bind/zones/lingcloud.com.db";
};

## config zone with example contents
cat /etc/bind/zones/lingcloud.com.db
; BIND data file for lingcloud.com
;
$TTL 14400 ;lingcloud.com
;start of authority resource record type. Every domain must have a Start of Authority record at the cutover
ts parent domain.
@ IN SOA ns1.lingcloud.com. host.lingcloud.com. (
201006601 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
; NS record indicate which name server are authoritative for the zone/domain. It is primarily used if you w
lingcloud.com. IN NS ns1.lingcloud.com.
;A record
lingcloud.com. IN A 10.41.104.171
; ns seems to be name server's ip
ns1 IN A 10.41.104.232

nodeB IN A 10.41.104.171
nodeB.realmB IN A 10.41.104.171
nodeC IN A 10.41.104.171
nodeC.realmC IN A 10.41.104.171

;NAPTR record
realmB IN NAPTR 50 100 "s" "aaa:diameter.tcp" "" _diameter._tcp.srvB.realmB.lingcloud.com.
realmC IN NAPTR 51 101 "s" "aaa:diameter.tcp" "" _diameter._tcp.srvC.realmC.lingcloud.com.
;SRV record
_diameter._tcp.srvB.realmB IN SRV 0 1 3868 nodeB.realmB.lingcloud.com.
_diameter._tcp.srvC.realmC IN SRV 0 1 3868 nodeC.realmC.lingcloud.com.

## start named
/usr/local/sbin/named

## check named status 
rndc status

## nslookup can be used to query DNS server
 nslookup
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> lingcloud.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	lingcloud.com
Address: 10.41.104.172
> nodeB.lingcloud.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	nodeB.lingcloud.com
Address: 10.41.104.171
> set type=NAPTR
> realm1.lingcloud.com     
Server:		127.0.0.1
Address:	127.0.0.1#53

realm1.lingcloud.com	naptr = 50 100 "s" "aaa:diameter.tcp" "" _diameter._tcp.srv1.lingcloud.com.
> set type=SRV
> _diameter._tcp.srv1
Server:		127.0.0.1
Address:	127.0.0.1#53

_diameter._tcp.srv1.lingcloud.com	service = 0 1 3868 nodeB.lingcloud.com.

Reference:

//www.servermom.org/how-to-install-and-setup-bind9-on-ubuntu-server/136/

https://kb.isc.org/article/AA-00768/0/Getting-started-with-BIND-how-to-build-and-run-named-with-a-basic-recursive-configuration.html

//www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-bind-rndc.html

【上篇】
【下篇】

抱歉!评论已关闭.

  • 一以贯之推进党的建设新的伟大工程 2019-03-19
  • 回复@真理论者:你天天在强坛攻击爱因斯坦是不是劳动?创造价值么?负价值也! 2019-03-19
  • 北京天安门广场更换花卉 2019-03-18
  • 党的自我革命是伟大社会革命的强大动力(深入学习贯彻习近平新时代中国特色社会主义思想) 2019-03-18
  • 人民日报人民时评:让安全生产理念成为基本共识 2019-03-18
  • “人民体育 健康中国”马拉松系列赛北京站 2019-03-17
  • 识破“假大学”并没那么难 2019-03-17
  • 佛山:用公积金买装配式住房 贷款额度或可上浮20% ——凤凰网房产北京 2019-03-17
  • 奥运冠军寄语Running Together国际迷你马拉松—在线播放—《奥运冠军寄语Running Together国际迷你马拉松》—体育—优酷网,视频高清在线观看 2019-03-17
  • 【理上网来喜迎十九大】西班牙学者:大国外交令中国成为建立世界新秩序的中流砥柱 2019-03-16
  • 马上背!十九大报告中的四个“新” 2019-03-16
  • 呼市赛罕区南门外小学开展庆父亲节亲子趣味足球赛 2019-03-16
  • 2017大皖客户端徽派栏目全面回顾宣传片 2019-03-15
  • 回复@海之宁:你想自主劳动?全民所有的生产资料凭啥让你自主? 2019-03-15
  • 重庆市南岸区:探索建立“微益坊” 2019-03-15
  • 981| 107| 434| 909| 429| 945| 596| 401| 257| 422|