- 浏览: 379387 次
文章分类
最新评论
-
zhuifengmzw:
如果耶稣时主,那他就不会死,也就谈不上复活。
他是人,所以才会 ...
:::::. 十月二十六日 -
sepac:
顶个,有感觉!
让我想起了武松。。。
..:诗如剑 -
paofan:
呵呵,在java爱, 你应该算一个人物,有些观点是很有代表性的 ...
开源人物之九:赖霖枫 -
ray_linn:
paofan 写道神和妖有时间只是一念之差。
网易一开始也只 ...
开源人物之九:赖霖枫 -
paofan:
神和妖有时间只是一念之差。网易一开始也只不过是个perl bb ...
开源人物之九:赖霖枫
Howto: Setup a DNS server with bind
Note: delete some comments.
After looking on Ubuntu forum for an easy step-by-step howto for instaling a DNS server, I decided the best idea would probably be to write this howto myself.... So, here it is!
Step 1: Install Ubuntu dapper, or use your WORKING installation.
Step2: Install bind 9:
Code:
sudo apt-get install bind9
Step 3: Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file named.conf. However, Ubuntu provides you with a pre-configured Bind, so we will edit another file:
Code:
sudo vi /etc/bind/named.conf.local
This is where we will insert our zones. By the way, a zone is a domain name that is referenced in the DNS server
Insert this in the named.conf.local file:
Code:
# This is the zone definition. replace example.com with your domain name
zone "example.com" {
type master;
file "/etc/bind/zones/example.com.db";
};
# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation - e.g my network address is 192.168.0
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
};
Ok, now, let's edit the options file:
Code:
sudo vi /etc/bind/named.conf.options
We need to modify the forwarder. This is the DNS server to which your own DNS will forward the requests he cannot process.
Code:
forwarders {
# Replace the address below with the address of your provider's DNS server
123.123.123.123;
};
Now, let's add the zone definition files (replace example.com with your domain name:
Code:
sudo mkdir /etc/bind/zones
sudo vi /etc/bind/zones/example.com.db
The zone definition file is where we will put all the addresses / machine names that our DNS server will know. You can take the following example:
Code:
// replace example.com with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
example.com. IN SOA ns1.example.com. admin.example.com. (
// Do not modify the following lines!
2006081401
28800
3600
604800
38400
)
// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name
example.com. IN NS ns1.example.com.
example.com. IN MX 10 mta.example.com.
// Replace the IP address with the right IP addresses.
www IN A 192.168.0.2
mta IN A 192.168.0.3
ns1 IN A 192.168.0.1
Now, let's create the reverse DNS zone file:
Code:
sudo vi /etc/bind/zones/rev.0.168.192.in-addr.arpa
Copy and paste the following text, modify as needed:
Code:
//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 1, as my IP address is 192.168.0.1.
@ IN SOA ns1.example.com. admin.example.com. (
2006081401;
28800;
604800;
604800;
86400
)
IN NS ns1.example.com.
1 IN PTR example.com
Ok, now you just need to restart bind:
Code:
sudo /etc/init.d/bind9 restart
We can now test the new DNS server...
Step 4: Modify the file resolv.conf with the following settings:
Code:
sudo vi /etc/resolv.conf
enter the following:
Code:
// replace example.com with your domain name, and 192.168.0.1 with the address of your new DNS server.
search example.com
nameserver 192.168.0.1
Now, test your DNS:
Code:
dig example.com
Note: delete some comments.
After looking on Ubuntu forum for an easy step-by-step howto for instaling a DNS server, I decided the best idea would probably be to write this howto myself.... So, here it is!
Step 1: Install Ubuntu dapper, or use your WORKING installation.
Step2: Install bind 9:
Code:
sudo apt-get install bind9
Step 3: Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file named.conf. However, Ubuntu provides you with a pre-configured Bind, so we will edit another file:
Code:
sudo vi /etc/bind/named.conf.local
This is where we will insert our zones. By the way, a zone is a domain name that is referenced in the DNS server
Insert this in the named.conf.local file:
Code:
# This is the zone definition. replace example.com with your domain name
zone "example.com" {
type master;
file "/etc/bind/zones/example.com.db";
};
# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation - e.g my network address is 192.168.0
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
};
Ok, now, let's edit the options file:
Code:
sudo vi /etc/bind/named.conf.options
We need to modify the forwarder. This is the DNS server to which your own DNS will forward the requests he cannot process.
Code:
forwarders {
# Replace the address below with the address of your provider's DNS server
123.123.123.123;
};
Now, let's add the zone definition files (replace example.com with your domain name:
Code:
sudo mkdir /etc/bind/zones
sudo vi /etc/bind/zones/example.com.db
The zone definition file is where we will put all the addresses / machine names that our DNS server will know. You can take the following example:
Code:
// replace example.com with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
example.com. IN SOA ns1.example.com. admin.example.com. (
// Do not modify the following lines!
2006081401
28800
3600
604800
38400
)
// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name
example.com. IN NS ns1.example.com.
example.com. IN MX 10 mta.example.com.
// Replace the IP address with the right IP addresses.
www IN A 192.168.0.2
mta IN A 192.168.0.3
ns1 IN A 192.168.0.1
Now, let's create the reverse DNS zone file:
Code:
sudo vi /etc/bind/zones/rev.0.168.192.in-addr.arpa
Copy and paste the following text, modify as needed:
Code:
//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 1, as my IP address is 192.168.0.1.
@ IN SOA ns1.example.com. admin.example.com. (
2006081401;
28800;
604800;
604800;
86400
)
IN NS ns1.example.com.
1 IN PTR example.com
Ok, now you just need to restart bind:
Code:
sudo /etc/init.d/bind9 restart
We can now test the new DNS server...
Step 4: Modify the file resolv.conf with the following settings:
Code:
sudo vi /etc/resolv.conf
enter the following:
Code:
// replace example.com with your domain name, and 192.168.0.1 with the address of your new DNS server.
search example.com
nameserver 192.168.0.1
Now, test your DNS:
Code:
dig example.com
- bindset.tar.gz (2.8 KB)
- 下载次数: 0
发表评论
-
开源人物之九:赖霖枫
2010-01-27 11:34 1693雨林木风,ylmf。 这个人与洪磊的境遇,一个是天上,一个是 ... -
关于承诺的意见及未来的影响
2009-04-05 01:38 849很多很多事需要重头计划 重头做起 -
微软病毒
2008-10-20 00:00 963马上发作 这是一个伟大的时刻。 为此我激动万分。 -
汶川地震与开源社区
2008-05-17 02:54 0有网友前往灾区,发贴提出以下需求: ============= ... -
Editor
2008-04-16 10:38 1103I hope I can change it. -
夏特古道
2008-01-26 01:48 1402夏特古道穿越重要 ... -
模拟城市开源了
2008-01-14 12:41 4491http://www.donhopkins.com/home/ ... -
开源人物之八:Herbert Xu
2007-12-07 10:35 4834年底了,大家怀着不同的心情, ,期待着2008年的到来。 前 ... -
上海开源组织第17次会议(2007.12.01)
2007-11-29 11:32 1072Coffee Bean&Tea Leaf 地址: 黄 ... -
龙软基地
2007-11-15 11:08 1070闪电,光 -
:::亿家门菜馆
2007-11-14 15:56 1344赵善德, 这是一个奇迹。宝山区长逸路15号建配龙西大门(近淞良 ... -
::: 关键字
2007-11-14 10:00 929五一国际劳动节五四青年节听说明年开始要改了哈有意思。 -
::: 你可以
2007-11-13 17:30 877用goole的地图看这个世界用goole的搜索找熟悉的名字你可 ... -
::: 松下
2007-11-09 12:14 9961894年生1918 创业1932 再次创业 -
::: 记者
2007-11-09 11:36 1086进入阿富汗的第一位华人女记者。此次又成为进入伊拉克战地的中国记 ... -
::: Free Software
2007-11-08 17:40 973There is no free lunch.There is ... -
::: 上海需要什么?
2007-11-08 13:37 949需要向海尔这样的民族工业。俞老师, 你行。 -
::: 这一年
2007-11-08 13:20 831过得太快了 啊 -
::: 2007 Special Year
2007-11-08 13:07 805For me -
龙芯真象
2007-11-05 10:54 2821看了这篇文章,相当难过。 但即使是这样,我认为龙芯还是有希望。 ...
相关推荐
Pro DNS and BIND guides you through the challenging array of features surrounding DNS, with a special focus on BIND, the worlds most popular DNS implementation. This book unravels the mysteries of DNS...
主要介绍了C++ 11 std::function和std::bind使用详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
Maven坐标:jakarta.xml.bind:jakarta.xml.bind-api:2.3.3; 标签:bind、xml、api、jakarta、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化...
大家都知道C++11中增加了许多的新特性,下面在这篇文中我们就来聊一下lambda表达式,闭包,std::function以及std::bind。文中介绍的很详细,相信对大家具有一定的参考价值,有需要的朋友们下面来一起看看吧。
人偶DNS(BIND9)模块 设置DNS的模块(bind9) 支持: Ubuntu:14.04、12.04 CentOS:7.x,6.x 欢迎支持其他操作系统的补丁程序。 该模块取决于concat( )。 此模块“将”覆盖所有绑定配置,将其应用于具有现有绑定...
DNS and Bind 第五版和Pro DNS and Bind 10, 两本很经典的DNS bind书籍,值得阅读或者当工具书使用
Maven坐标:jakarta.xml.bind:jakarta.xml.bind-api:2.3.3; 标签:bind、xml、api、jakarta、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...
DNS And Bind 5th edition
DNS & BIND Cookbook
You'll learn how DNS was extended to accommodate IPv6 addresses, and how you can configure a BIND name server to run on the network. This book also features methods for troubleshooting problems with ...
http://bbs.51cto.com/thread-656516-1.htmlXP的DNS服务器(BIND)配置环境:WindowsXP(Win7也测试通过)工具:1.HYPERLINK"ftp://ftp.bind....请确定电脑
Red Hat Enterprise Linux 5中的DNS服务器是通过Bind软件来实现的,在安装系统过程中选择“DNS Server”选项卡安装如下软件包: bind-*:DNS名称服务器软件。 bind-devel-*:DNS开发工具,不是必需的。 ...
dns-and-bind.pdf详细讲解dns 和bind软件。
DNS与BIND 第5版
DNS与BIND的工作原理以及配置实例步骤!
dns-bind代码流程分析
DNS与BIND 原版 第五版 需要的同学可以下载 // BIND configuration file options { directory "/var/named"; // Place additional options here. }; zone "movie.edu" in { type master; file "db.movie.edu"; }; ...
this book include configuration of DNS in ubuntu
DNS原理,LINUX下构建CASH服务器