installation and basic configuration of a domain with bind9 on CentOS
To maintain a domain is necessary to install and configure a DNS server. The most commonly used in Linux environments is the Bind (version 9.7.2-P2 at the time of write this article.)
The first step is to install from the CentOS repositories. This is done with the command yum install Wednesday, November 3, 2010
What Are Organizations That Help People
bind
Once installed, you must create a configuration file. The following steps cover a simple configuration, to keep up a DNS server in a short time. The server configuration is file / etc / named.conf . All statements available to configure bind server can be found in the
Administrator Reference Manual Once installed, you must create a configuration file. The following steps cover a simple configuration, to keep up a DNS server in a short time. The server configuration is file / etc / named.conf . All statements available to configure bind server can be found in the
ARMv9.6
The file can be edited with the command: nano / etc / named.conf
content to be entered is:
options {directory "/ var / named"; }; zone "." {type hint;
};
zone "trombotic. tic " {type master;
file "trombotic.tic.zone" }; zone "1.168.192.in-addr.arpa" {type master ;
file "1.168.192.in-addr.arpa.zone" file "trombotic.tic.zone" }; zone "1.168.192.in-addr.arpa" {type master ;
};
The sentence options to configure global options from the server. In this case only contains the sub-statements
directory that indicates the system directory where the zone files. The sub-statements type indicates the type of area and for putting master means that this server is the one with the original copy of the data in the area (not a secondary server.) Finally, the sub-statements
file indicates the name of the zone file.
dns server domain used to define areas. A zone contains information that manages a dns, ie the relationship between host names and IP addresses (and some other things.) This information is represented by resource records included in the zone files. For example, on this server there is an area called
trombotic.tic
that corresponds to the domain
trombotic.tic
zone file which is called
trombotic.tic.zone
. As in the sentence
options exist sub-statements
directory
value / var / named
, the zone file for trombotic.tic
is
/ var / named / trombotic.tic.zone
. This area is responsible for resolving domain names to IP addresses. Besides, there is also an area called 1.168.192.in-addr.arpa which is in charge of reverse lookups, ie from an ip address to get the domain name. It is not compulsory to have name resolution, but is required for some services work well. Reverse lookup zones are called network address or subnet, without the zeros, written backwards, with the suffix. In-addr.arpa. in this case the network address is 192.168.1.0/24 so it takes the 192.168.1, he turns around to make it 1,168,192 and added. in-adder. harp. After creating the configuration file, create the zone files. Within directory / var / named should create three files:
named.root
containing a copy of the DNS root servers.
trombotic.tic.zone that contains records of trombotic.tic area. addr.arpa.zone 1.168.192.in-containing reverse lookup records for the network address 192.168.1.0/24. can get an updated copy of the root DNS servers www.internic.net. To download the file named.root can use the command: wget-O - http://www.internic.net/zones/named.root> / var / named / named.root The contents of / var / named / trombotic.tic.zone could be: @
IN SOA ns.trombotic.tic admin.trombotic.tic ( 1 ;serial 24h ;refresh 1h ;retry 7d ;expire 1h ;negative ttl ) IN NS ns.trombotic.tic. @ IN MX 1 server. trombotic.tic.
server IN A 192.168.1.200 router IN A 192.168.1.1 ns IN CNAME server
smtp pop3 IN CNAME server
- IN CNAME server www IN CNAME server
- ftp IN CNAME server
- Zone files contain records of recuros that is information handled by the DNS server on the area. There are several types of resource records: SOA, a, ns, mx, cname, ptr ... As this article is not intended as a manual bind (you can search google and sure to leave hundreds), suffice it to say that this file is indicating the following (in brackets is the type of record that shows this information):
- email the administrator of the area is admin@trombotic.tic (SOA).
servidor.trombotic.tic
alias (CNAME).
that the domain has a unique e-mail server that collects call servidor.trombotic.tic (MX).
that there is a machine called servidor.trombotic.tic
with ip address 192.168.1.200 (A).
that there is a machine called
router.trombotic.tic
with ip address 192.168.1.1 (A).
servidor.trombotic.tic
that has several names (CNAME):
ns.trombotic.tic
,
smtp.trombotic.tic
,
pop3.trombotic.tic
,
and
www.trombotic.tic ftp.trombotic.tic
.
Basically in this network is a single machine that provides all the services, which is
servidor.trombotic.tic
and one that connects our network to the Internet, which is router.trombotic.tic .
- File content / var/named/1.168.192.in-addr.arpa.zone
- could be: @ IN SOA ns.trombotic.tic admin.trombotic.tic (
- 1; serial 24 ; refresh 1h; retry 7d; EXPIRE 1h; negative ttl )
- IN NS ns.trombotic.tic. 200 IN PTR servidor.trombotic.tic. 1 IN PTR
- router.trombotic.tic.
- In this zone file is the most important information: that there is a machine with ip address 192.168.1.200 called servidor.trombotic.tic (PTR).
- that there is a machine with ip address 192.168.1.1 called router.trombotic.tic (PTR). Keep in mind that the resource record set only the last number of the ip address and the server itself adds the name of the area to obtain the full ip address. For example, in the line that begins with 200 , add at the end 1.168.192.in-addr.arpa and hence are obtained 200.1.168.192.in-addr.arpa. It takes the in-addr.arpa and turns it so that it is the address 192.168.1.200 . Once configured
a question? You can use the comments of the article.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment