- 浏览: 387243 次
文章分类
最新评论
-
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 1773雨林木风,ylmf。 这个人与洪磊的境遇,一个是天上,一个是 ... -
关于承诺的意见及未来的影响
2009-04-05 01:38 913很多很多事需要重头计划 重头做起 -
微软病毒
2008-10-20 00:00 1030马上发作 这是一个伟大的时刻。 为此我激动万分。 -
汶川地震与开源社区
2008-05-17 02:54 0有网友前往灾区,发贴提出以下需求: ============= ... -
Editor
2008-04-16 10:38 1155I hope I can change it. -
夏特古道
2008-01-26 01:48 1447夏特古道穿越重要 ... -
模拟城市开源了
2008-01-14 12:41 4543http://www.donhopkins.com/home/ ... -
开源人物之八:Herbert Xu
2007-12-07 10:35 4895年底了,大家怀着不同的心情, ,期待着2008年的到来。 前 ... -
上海开源组织第17次会议(2007.12.01)
2007-11-29 11:32 1115Coffee Bean&Tea Leaf 地址: 黄 ... -
龙软基地
2007-11-15 11:08 1113闪电,光 -
:::亿家门菜馆
2007-11-14 15:56 1391赵善德, 这是一个奇迹。宝山区长逸路15号建配龙西大门(近淞良 ... -
::: 关键字
2007-11-14 10:00 968五一国际劳动节五四青年节听说明年开始要改了哈有意思。 -
::: 你可以
2007-11-13 17:30 915用goole的地图看这个世界用goole的搜索找熟悉的名字你可 ... -
::: 松下
2007-11-09 12:14 10621894年生1918 创业1932 再次创业 -
::: 记者
2007-11-09 11:36 1123进入阿富汗的第一位华人女记者。此次又成为进入伊拉克战地的中国记 ... -
::: Free Software
2007-11-08 17:40 1005There is no free lunch.There is ... -
::: 上海需要什么?
2007-11-08 13:37 1017需要向海尔这样的民族工业。俞老师, 你行。 -
::: 这一年
2007-11-08 13:20 881过得太快了 啊 -
::: 2007 Special Year
2007-11-08 13:07 844For me -
龙芯真象
2007-11-05 10:54 2821看了这篇文章,相当难过。 但即使是这样,我认为龙芯还是有希望。 ...
相关推荐
C++ 11 std::function和std::bind使用详解 C++ 11 中引入了两个重要的功能:std::function 和 std::bind,它们都是基于 C++ 11 的新特性,用于实现函数指针的功能。下面将详细介绍这两个功能的使用和区别。 std::...
### DNS与BIND知识点详解 #### 一、DNS基础概念 **DNS**(Domain Name System)即域名系统,是一种用于实现域名到IP地址转换的核心服务。它通过一个分布式的数据库系统,帮助用户通过易于记忆的域名来访问互联网资源...
《DNS and Bind》第五版与《Pro DNS and Bind 10》是DNS系统管理员和网络专业人士的必备参考资料,这两本书深入浅出地介绍了DNS(Domain Name System)与BIND(Berkeley Internet Name Domain)的原理、配置和管理。...
Maven坐标:jakarta.xml.bind:jakarta.xml.bind-api:2.3.3; 标签:bind、xml、api、jakarta、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化...
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...
BIND支持多种DNS记录类型,如A记录、MX记录、CNAME记录等,同时也支持DNSSEC安全扩展。 #### 三、DNS服务器的重要性 对于网络工程师而言,理解和掌握DNS服务器的配置和管理至关重要。DNS服务器不仅是互联网的基础...
在深入理解DNS基础与BIND服务器配置之前,我们首先需要对DNS系统的基本工作原理有所了解。 DNS系统采用分布式数据库,由众多DNS服务器共同维护。当用户在浏览器中输入一个域名时,本地DNS客户端会向最近的DNS服务器...
根据提供的信息,“dns-and-bind.pdf”是一本详细讲解域名系统(DNS)与Berkeley Internet Name Domain(BIND)软件的专业书籍。这本书由Cricket Liu和Paul Albitz共同编写,ISBN号为1−56592−512−2,共502页,...
1. **BIND基础知识**:理解DNS系统的工作原理,包括DNS记录类型(A, AAAA, CNAME, MX, NS等)以及它们的作用。了解BIND软件的架构和配置文件结构。 2. **安装与配置BIND**:在Linux环境中安装BIND服务器软件,配置...
《DNS & BIND 4th Edition》是一本深受IT专业人士欢迎的经典教材,主要涵盖了域名系统(DNS)和BIND(Berkeley Internet Name Domain)的基础知识、高级概念以及实际操作技巧。DNS是互联网上的关键基础设施,它负责...
《DNS与BIND 原版 第五版》是由Paul Albitz和Cricket Liu共同编写的,这是一本深入解析互联网基础设施中至关重要的分布式主机信息数据库——DNS(Domain Name System)及其主要实现软件BIND(Berkeley Internet Name...
《DNS与BIND英文版(第四版)》是深入学习域名系统(DNS)和BIND软件的重要参考资料,对于IT行业的网络管理员、系统管理员以及网络技术爱好者来说,这本书无疑是一本宝贵的宝典。BIND,全称为Berkeley Internet Name...
《配置Linux DNS与BIND服务器》是一本专注于DNS服务器在Ubuntu操作系统中配置的指南。DNS(Domain Name System)是互联网的一项核心服务,它将人类可读的域名转换为计算机可识别的IP地址。BIND(Berkeley Internet ...
根据提供的文件信息,“DNS与BIND 第5版”这本书主要聚焦于域名系统(DNS)和Berkeley Internet Name Domain(BIND)软件的深入讲解。虽然提供的内容有限,但我们可以基于书名和描述来推测这本书可能覆盖的一些关键...
文档详细介绍了DNS基础、BIND资源要求、名字服务器配置、高级DNS特征、从不安全转换到安全、BIND9对IPv6的支持以及BIND9配置参考等多个方面。 3. DNS基础: - 域和域名区:定义了域名空间的层次结构。 - 权威...
### 关于《Pro DNS and BIND》一书的知识点解析 #### 书籍基本信息 - **书名**:《Pro DNS and BIND》 - **作者**:Ron Aitchison - **出版社**:Apress - **出版年份**:2005年 - **ISBN**:1-59059-494-0 - **...