Simple DNS settings in Ubuntu

Source: Internet
Author: User
Today, in Ubuntu, I simply set up DNS and write down the process. I forgot to install OS first. I chose Ubuntu, which is the simplest to use, or Debian can be root @ netfs:/etc/bind # uname-aLinuxnetfs2.6.22-14-server #1SMPSunOct1423: 34: 23GMT2007i686GNU/Linux

Today, in Ubuntu, you can simply set up DNS and write down the process.
1 Installation
First of all, I chose the most simple Ubuntu or Debian.
Root @ netfs:/etc/bind # uname-
Linux netfs 2.6.22-14-server #1 SMP Sun Oct 14 23:34:23 GMT 2007 i686 GNU/Linux

Installation Process
Root @ netfs :~ # Apt-get install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Bind9 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
Root @ netfs :~ #

2. Settings
Set the primary dns and modify the/etc/bind/name. conf. local file.
Root @ netfs:/etc/bind # nano named. conf. local
Zone "apt-get.cn "{
Type master;
File "/etc/bind/apt-get.cn.hosts ";
};

Configure dns forwarding
Root @ netfs:/etc/bind # nano named. conf. options
Add the following paragraph to the front of the last section}. Do not add it to the back. After adding it to the back, your bind9 won't be able to start.
Forwarders {
202.103.0.117 port 53;
202.103.24.68 port 53;
};
Forward first;


Set Data Files
Root @ netfs:/etc/bind # nano apt-get.cn.hosts.
$ Ttl 38400 // default activity time
The apt-get.cn. in soa netfs. lcnja.qq.com .(
1199613019
10800 // refresh time
3600 // transmission retry time
604800 // expiration time
38400) // default activity time
Apt-get.cn. in ns netfs. // define a naming server note the following points cannot be lost // NS record nameserver
Web.apt-get.cn. in a 192.168.1.66 // define the name of an address record web.apt-get.cn. // A record address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.