Ubuntu 12.04 Server 搭建DNS服务器
生活随笔
收集整理的這篇文章主要介紹了
Ubuntu 12.04 Server 搭建DNS服务器
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
這邊簡(jiǎn)單介紹一下,在Ubuntu 12.04 Server 搭建簡(jiǎn)單的DNS 服務(wù)器#apt-get -y install bind9 bind9utils這里我以 hasee.com 域名為例# cat /etc/name.conf=====================================================// This is the primary configuration file for the BIND DNS server named.//// Please read /usr/share/doc/bind9/README.Debian.gz for information on the// structure of BIND configuration files in Debian, *BEFORE* you customize// this configuration file.//// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options"; ? ? ? ? ? ? ? ? ? ? ? ?include "/etc/bind/named.conf.local";include "/etc/bind/named.conf.default-zones";=====================================================接下來(lái)針對(duì) /etc/bind/named.conf.default-zones 進(jìn)行域名添加# vim /etc/bind/named.conf.default-zones========================================================// prime the server with knowledge of the root serverszone "." {type hint;file "/etc/bind/db.root";};
// be authoritative for the localhost forward and reverse zones, and for// broadcast zones as per RFC 1912
zone "localhost" {type master;file "/etc/bind/db.local";};
zone "127.in-addr.arpa" {type master;file "/etc/bind/db.127";};
zone "0.in-addr.arpa" {type master;file "/etc/bind/db.0";};
zone "255.in-addr.arpa" {type master;file "/etc/bind/db.255";};
zone "hasee.com" {? ? ? ? type master;? ? ? ? file "/etc/bind/hasee.local";};
zone "1.in-addr.arpa" {? ? ? ? type master;? ? ? ? file "/etc/bind/db.192";};=============================================================#cp db.local hasee.local#cp db.127 db.192#vim hasee.local#vim db.192#/etc/init.d/bind9 restartroot@ubuntu:/etc/bind# nslookup> www.hasee.comServer: ? ? ? ? 127.0.0.1Address: ? ? ? ?127.0.0.1#53
Name: ? www.hasee.comAddress: 192.168.2.104>好這邊已經(jīng)能夠正常解析
include "/etc/bind/named.conf.options"; ? ? ? ? ? ? ? ? ? ? ? ?include "/etc/bind/named.conf.local";include "/etc/bind/named.conf.default-zones";=====================================================接下來(lái)針對(duì) /etc/bind/named.conf.default-zones 進(jìn)行域名添加# vim /etc/bind/named.conf.default-zones========================================================// prime the server with knowledge of the root serverszone "." {type hint;file "/etc/bind/db.root";};
// be authoritative for the localhost forward and reverse zones, and for// broadcast zones as per RFC 1912
zone "localhost" {type master;file "/etc/bind/db.local";};
zone "127.in-addr.arpa" {type master;file "/etc/bind/db.127";};
zone "0.in-addr.arpa" {type master;file "/etc/bind/db.0";};
zone "255.in-addr.arpa" {type master;file "/etc/bind/db.255";};
zone "hasee.com" {? ? ? ? type master;? ? ? ? file "/etc/bind/hasee.local";};
zone "1.in-addr.arpa" {? ? ? ? type master;? ? ? ? file "/etc/bind/db.192";};=============================================================#cp db.local hasee.local#cp db.127 db.192#vim hasee.local#vim db.192#/etc/init.d/bind9 restartroot@ubuntu:/etc/bind# nslookup> www.hasee.comServer: ? ? ? ? 127.0.0.1Address: ? ? ? ?127.0.0.1#53
Name: ? www.hasee.comAddress: 192.168.2.104>好這邊已經(jīng)能夠正常解析
轉(zhuǎn)載于:https://blog.51cto.com/jin771998569/1076106
總結(jié)
以上是生活随笔為你收集整理的Ubuntu 12.04 Server 搭建DNS服务器的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 漫谈linux文件IO
- 下一篇: Safari下弹窗问题的解决办法