DNS settings in Ubuntu

Do you set up dns when using Ubuntu system? But there are also many friends who do not know how to set up dns, so in the following content

Let Xiaobian introduce the content about DNS settings under Ubuntu.

 

Today, simply set up DNS under Ubuntu, write the process, memo, ha ha


1 Installation
is the choice of OS first. I chose Ubuntu, which is the simplest to use, or Debian is all possible.
Root @ netfs: / etc / bind # uname -a
Linux netfs 2.6.22-14-server # 1 SMP Sun Oct 14 23:34:23 GMT 2007 i686 GNU / Linux

安装过程
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 Set and
set the master dns, modify the /etc/bind/name.conf.local file
root @ netfs: / etc / bind # nano named.conf.local
zone " " {
type master;
file "/etc/bind/apt-get.cn.hosts";
};

Set the forwarding of dns
root @ netfs: / etc / bind # nano named.conf.options
add the following paragraph to the last}; in front of it, do n’t add it to the back, and add it to the back. Ca n't start
forwarders {
202.103.0.117 port 53;
202.103.24.68 port 53;
};
forward first;


Set the data file
root @ netfs: / etc / bind # nano apt-get.cn.hosts
$ ttl 38400 // default activity time
apt-get.cn. IN SOA netfs. Lcnja.qq.com. (
1199613019
10800 // Refresh time
3600 // Transmission retry time
604800 // Expiry time
38400) // Default activity time
apt-get.cn. IN NS netfs. // Define a name server Note that the following points can not be lost // NS record nameserver
web. apt-get.cn. IN A 192.168.1.66 // Define an address record name web.apt-get.cn. // A record address

The content described above is about DNS settings under Ubuntu. How do you learn after reading it? Only when we have mastered professional knowledge can we not fear anyone.

Guess you like

Origin www.cnblogs.com/sha1234/p/12704715.html
Recommended