Cau hinh DNS (Lab_DNS_Docchitiet.pdf)
+ Cai dich vu named (Da cai dat)
+ Kiem tra: rpm -qa bind* (1)
Neu co goi ...chroot... -> duong dan file cau hinh thay doi (2)
+ Cau hinh:
1. file /etc/named.conf ((2) -> /var/named/chroot/etc/named.conf)
Chu y: local thuan (3), local nghich (4), domain thuan, domain nghich
2. File phan giai thuan /var/named/tenfilethuan
(2) -> /var/named/chroot/var/named/tenfilethuan
3. file phan giai nghich /var/named/tenfilenghich
(2) -> /var/named/chroot/var/named/tenfilenghich
+ Restart service named
Chu y :
- Cu phap giong trong file huong dan
- Day du file thuan, nghich cho tung domain
- Duong dan
- (3), (4) da co trong file named.rfc1912... va duoc include trong file /etc/named.confg
domain thuan: /var/named/t3h.com.hosts
@ IN SOA dnsserver.t3h.com. root.t3h.com. (
2001112800;
10800;
1800;
36000;
86400 )
IN NS dnsserver.t3h.com.
IN MX 0 mail server.t3h.com.
dnsserver IN A 192.168.2.14
server IN A 192.168.2.1
mailserver IN A 192.168.2.2
www IN CNAME server.t3h.com.
domain nghich: /var/named/t3h.com.localhost
@ IN SOA dnsserver.t3h.com. root.t3h.com. (
2001112800;
10800;
1800;
3600000;
86400 )
IN NS dnsserver.t3h.com.
IN MX 0 mailserver.t3h.com.
2 IN PTR dnsserver.t3h.com.
1 IN PTR server.t3h.com.
///// /var/named/chroot/etc/named.conf
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
forwarders {192.168.2.14;}
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
//Khai bao zone thuan t3h.com
zone "t3h.com" {
type master;
file "t3h.com.hosts";
allow-query{any;};
};
//Khai bao zone nghich t3h.com
zone "t3h.com" {
type master;
file "t3h.com.localhost";
allow-query{any;};
};
include "/etc/named.rfc1912.zones";
+ Cai dich vu named (Da cai dat)
+ Kiem tra: rpm -qa bind* (1)
Neu co goi ...chroot... -> duong dan file cau hinh thay doi (2)
+ Cau hinh:
1. file /etc/named.conf ((2) -> /var/named/chroot/etc/named.conf)
Chu y: local thuan (3), local nghich (4), domain thuan, domain nghich
2. File phan giai thuan /var/named/tenfilethuan
(2) -> /var/named/chroot/var/named/tenfilethuan
3. file phan giai nghich /var/named/tenfilenghich
(2) -> /var/named/chroot/var/named/tenfilenghich
+ Restart service named
Chu y :
- Cu phap giong trong file huong dan
- Day du file thuan, nghich cho tung domain
- Duong dan
- (3), (4) da co trong file named.rfc1912... va duoc include trong file /etc/named.confg
domain thuan: /var/named/t3h.com.hosts
@ IN SOA dnsserver.t3h.com. root.t3h.com. (
2001112800;
10800;
1800;
36000;
86400 )
IN NS dnsserver.t3h.com.
IN MX 0 mail server.t3h.com.
dnsserver IN A 192.168.2.14
server IN A 192.168.2.1
mailserver IN A 192.168.2.2
www IN CNAME server.t3h.com.
domain nghich: /var/named/t3h.com.localhost
@ IN SOA dnsserver.t3h.com. root.t3h.com. (
2001112800;
10800;
1800;
3600000;
86400 )
IN NS dnsserver.t3h.com.
IN MX 0 mailserver.t3h.com.
2 IN PTR dnsserver.t3h.com.
1 IN PTR server.t3h.com.
///// /var/named/chroot/etc/named.conf
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
forwarders {192.168.2.14;}
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
//Khai bao zone thuan t3h.com
zone "t3h.com" {
type master;
file "t3h.com.hosts";
allow-query{any;};
};
//Khai bao zone nghich t3h.com
zone "t3h.com" {
type master;
file "t3h.com.localhost";
allow-query{any;};
};
include "/etc/named.rfc1912.zones";