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

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-05-25
  • 【十九大·理论新视野】动漫:“社会主义现代化强国”如何建成 2019-05-25
  • 太原黑臭水体治理接受国家专项督查 2019-05-24
  • 白芦笋:一年一会矜贵食 2019-05-24
  • 安徽通报2018年上半年全省旅游投诉情况 2019-05-24
  • 女性之声——全国妇联 2019-05-23
  • 【新华微视评】偏远农村的“智慧消防” 2019-05-23
  • 万花瞳:万花迷人眼 慧瞳观天下 2019-05-23
  • 视频:热心球迷!陈奕迅吴秀波惊现世界杯开幕式现场 2019-05-22
  • 【北京神龙京津车型报价】北京神龙京津4S店车型价格 2019-05-22
  • 国外看中国科技:中国隧道技术发展迅速享誉世界 2019-05-22
  • 孕妇在巴黎大区快线列车上产子 宝宝获赠“大礼” 2019-05-22
  • 【学习时刻】中国人民大学副校长刘元春:中央经济工作会议的四大亮点 2019-05-21
  • 环球佳酿举行新品发布会 百余款酒品集中发售 2019-05-21
  • 改造后的老旧楼房抗震能力是否提高?新老建筑是否共用逃生通道? 2019-05-21
  • 331| 873| 499| 893| 805| 521| 291| 715| 879| 683|