redhat 5 dns配置示例一
--dns配置詳解
http://space.itpub.net/?uid-9094533-action-viewspace-itemid-73572
---啟動dns named失敗
[root@rhel5 named]# service named start
Starting named: [FAILED]
---檢視系統日誌
[root@rhel5 log]# tail -50 /var/log/messages
May 6 11:01:39 rhel5 named[5497]: could not configure root hints from 'named.root': file not found
---進入如下目錄
[root@rhel5 etc]# cd /var/named
--複製一個提示找不到的檔案
[root@rhel5 named]# cp -a named.local named.root
--啟動成功
[root@rhel5 named]# service named start
Starting named: [ OK ]
[root@rhel5 named]# ps -ef|grep name
named 5539 1 0 11:05 ? 00:00:00 /usr/sbin/named -u named
root 5550 5447 0 11:05 pts/1 00:00:00 grep name
dns正向解析配置如下
----------------------------------------------------
[root@rhel5 named]# more /etc/named.conf
// Red Hat BIND Configuration Tool
//
// Default initial "Caching Only" name server configuration
//
//options為一個節,指定dns全域性配置資訊
options {
directory "/var/named"; //directory指定域配置檔案所在的目錄
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//zone為專門的域配置檔案的節,指定具體的域配置檔名稱相關資訊
zone "." IN {
type hint;
file "named.root";--file指定域配置檔名稱,如無此檔案dns named會失敗
};
zone "localdomain." IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "sina.com" IN { //sina.com為測試的域
type master;
file "sina.com.zone";//域配置檔名稱
allow-update { none; };
};
zone "localhost." IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa." IN {
type master;
file "named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa." IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa." IN {
type master;
file "named.zero";
allow-update { none; };
};
include "/etc/rndc.key";
//如下為具體的域配置檔案
[root@rhel5 named]# more /var/named/sina.com.zone
$TTL 86400
@ IN SOA ns.sina.com root.sina.com (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns.sina.com
ns IN A 192.168.1.1
www IN CNAME ns.sina.com
mail IN CNAME ns.sina.com
localhost IN A 127.0.0.1
[root@rhel5 named]# clear
[root@rhel5 named]# more /etc/named.conf
// Red Hat BIND Configuration Tool
//
// Default initial "Caching Only" name server configuration
//
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
zone "." IN {
type hint;
file "named.root";
};
zone "localdomain." IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "sina.com" IN {
type master;
file "sina.com.zone";
allow-update { none; };
};
zone "localhost." IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa." IN {
type master;
file "named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa." IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa." IN {
type master;
file "named.zero";
allow-update { none; };
};
include "/etc/rndc.key";
[root@rhel5 named]#
[root@rhel5 named]# more /var/named/sina.com.zone
$TTL 86400
@ IN SOA ns.sina.com root.sina.com (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns.sina.com
ns IN A 192.168.1.1
www IN CNAME ns.sina.com
mail IN CNAME ns.sina.com
localhost IN A 127.0.0.1
[root@rhel5 named]# nslookup ns.sina.com
Server: 192.168.1.1
Address: 192.168.1.1#53
Name: ns.sina.com
Address: 192.168.1.1
[root@rhel5 named]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-759864/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- redhat linux dns反向解析示例RedhatLinuxDNS
- Redhat linux DNS配置指南RedhatLinuxDNS
- Redhat9上配置DNS(轉)RedhatDNS
- redhat7.2 DNS配置筆記(轉)RedhatDNS筆記
- redhat network網路卡配置示例Redhat
- RHEL 5 DNS 配置DNS
- redhat6.5關於rac配置DNS的問題RedhatDNS
- Redhat 5.8 作業系統上DNS詳細配置(DNS resolution for SCAN VIPs)Redhat作業系統DNS
- redhat 5 linux配置network網路及route路由閘道器小示例RedhatLinux路由
- Redhat 5 中裸裝置(raw) 的配置Redhat
- HBase + Kerberos 配置示例(一)ROS
- [轉]RedHat 5中裸裝置(raw)的配置Redhat
- redhat6.5 DNS 問題解決RedhatDNS
- RedHat配置IPRedhat
- redhat 5 iscsiRedhat
- solaris DNS 配置DNS
- redhat5 rpm -e --nodeps --allmatches 解除安裝java jdk示例RedhatJavaJDK
- redhat linux 5 之配置YUM源並安裝包RedhatLinux
- redhat shutdown關機及重啟示例Redhat
- Redhat(02):yum 配置Redhat
- redhat 6.2 配置 zabbixRedhat
- redhat網路配置Redhat
- redhat 6.0配置yumRedhat
- 配置linux DNSLinuxDNS
- scan-dns配置DNS
- 配置dns和apacheDNSApache
- CENTOS下配置DNSCentOSDNS
- DNS配置全文(轉)DNS
- solaris的dns配置DNS
- 【YUM】Redhat5和6YUM源配置的區別Redhat
- Linux RedHat ftp配置LinuxRedhatFTP
- REDHAT5.1 cluster配置Redhat
- redhat4 配置xmanagerRedhat
- RMAN配置示例
- Linux + OS RedHat AS 5LinuxRedhat
- redhat5 的毛病Redhat
- linux 修改 dns 配置LinuxDNS
- Linux中DNS配置LinuxDNS