Redhat 5.8 作業系統上DNS詳細配置(DNS resolution for SCAN VIPs)
Redhat 5.8 作業系統上DNS詳細配置( DNS resolution for SCAN VIPs )
1 、準備工作
軟體包支援(bind*、caching-nameserver)
安裝執行 yum install bind* caching-nameserver
看下我已經安裝的有關包
[root@doudou named]# rpm -qa bind* caching-nameserver
bind-utils-9.3.6-20.P1.el5_8.6
bind-libs-9.3.6-20.P1.el5_8.6
bind-chroot-9.3.6-20.P1.el5_8.6
caching-nameserver-9.3.6-20.P1.el5_8.6
bind-9.3.6-20.P1.el5_8.6
開啟named服務、設定開啟啟動
/etc/init.d/named start
chkconfig named on
配置nameserver
[root@doudou named]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:06:FC:D0
inet addr:192.168.1.212 Bcast:192.168.1.255 Mask:255.255.255.0
[root@doudou named]# cat /etc/resolv.conf
nameserver 192.168.1.212
nameserver 8.8.8.8
nameserver 4.4.4.4
2 、詳細配置
檢視named.caching-nameserver.conf 在作業系統上的位置
[root@doudou named]# cd /etc/
[root@doudou etc]# ls -ln named.*
lrwxrwxrwx 1 0 25 51 04-22 16:52 named.caching-nameserver.conf -> /var/named/chroot/etc/ named.caching-nameserver.conf
lrwxrwxrwx 1 0 25 41 04-22 16:52 named.rfc1912.zones -> /var/named/chroot/etc/named.rfc1912.zones
備份並修改named.caching-nameserver.conf (備份是個人習慣) 【注意紅色字型為修改部分】
[root@doudou etc]# cd /var/named/chroot/etc/
[root@doudou etc]# cp -p named.caching-nameserver.conf named.caching-nameserver.conf_backup
[root@doudou etc]# cat named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 127.0.0.1; }; == 》127.0.0.1改成any
listen-on-v6 port 53 { ::1; };
directory "/var/named";
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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { localhost; }; ==>localhost 改成any
allow-query-cache { localhost; }; ==>localhost 改成any
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; }; ==>localhost 改成any
match-destinations { localhost; }; ==>localhost 改成any
recursion yes;
include "/etc/named.rfc1912.zones";
};
備份並修改named.rfc1912.zones
[root@doudou etc]# cd /var/named/chroot/etc/
[root@doudou etc]# cp -p named.rfc1912.zones named.rfc1912.zones_backup
[root@doudou etc]# vi named.rfc1912.zones
尾部新增
zone " scan-doudou.com" IN {
type master;
file " scan-doudou.com.zone";
allow-update { none; };
};
zone " 1.168.192.in-addr.arpa" IN {
type master;
file " 1.168.192.in-addr.arpa.local";
allow-update { none; };
};
配置正向解析
[root@doudou etc]# cd /var/named/chroot/var/named/
[root@doudou named]# cp -p localhost.zone scan-doudou.com.zone
【紅色字型為新增部分】
[root@doudou named]# vi scan-doudou.com.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN NS scan-doudou.com
IN A 127.0.0.1
IN AAAA ::1
www IN A 192.168.1.25
IN A 192.168.1.211
IN A 192.168.1.212
配置方向解析
【紅色字型為新增部分】
[root@doudou named]# cp -p named.local 1.168.192.in-addr.arpa.local
[root@doudou named]# vi 1.168.192.in-addr.arpa.local
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
IN NS scan-doudou.com.
localhost IN A 127.0.0.1
25 IN PTR
211 IN PTR
212 IN PTR
重啟named服務
[root@doudou named]# /etc/init.d/named restart
停止 named:[確定]
啟動 named:[確定]
3 、驗證結果
[root@doudou named]# nslookup
Server: 192.168.1.212
Address: 192.168.1.212#53
Name:
Address: 192.168.1.25
Name:
Address: 192.168.1.211
Name:
Address: 192.168.1.212
[root@doudou named]# ping
PING (192.168.1.212) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.212): icmp_seq=1 ttl=64 time=0.018 ms
[root@doudou named]# ping
PING (192.168.1.211) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.211): icmp_seq=1 ttl=64 time=0.560 ms
[root@doudou named]# ping
PING (192.168.1.25) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.25): icmp_seq=1 ttl=64 time=0.061 ms
[root@doudou named]# nslookup 192.168.1.211
Server: 192.168.1.212
Address: 192.168.1.212#53
211.1.168.192.in-addr.arpa name = .
4 、DNS使用驗證
另一個機器
[root@doudou-32bit ~]# cat /etc/resolv.conf
nameserver 192.168.1.212
nameserver 8.8.8.8
nameserver 4.4.4.4
[root@doudou-32bit ~]# nslookup
Server: 192.168.1.212
Address: 192.168.1.212#53
Name:
Address: 192.168.1.212
Name:
Address: 192.168.1.25
Name:
Address: 192.168.1.211
[root@doudou-32bit ~]# ping
PING (192.168.1.211) 56(84) bytes of data.
64 bytes from doudou-32bit (192.168.1.211): icmp_seq=1 ttl=64 time=0.003 ms
[root@doudou-32bit ~]# ping
PING (192.168.1.25) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.25): icmp_seq=1 ttl=64 time=0.219 ms
[root@doudou-32bit ~]# ping
PING (192.168.1.212) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.212): icmp_seq=1 ttl=64 time=0.336 ms
[root@doudou-32bit ~]# nslookup 192.168.1.212
Server: 192.168.1.212
Address: 192.168.1.212#53
212.1.168.192.in-addr.arpa name = .
總結:
一個簡單的DNS搞了整整一天,但是最終還是成功了,成功還是很高興的。以後安裝RAC,需要使用DNS解析SCAN VIPs 我們就可以搞了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-759114/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 超詳細 DNS 協議解析DNS協議
- Centos7系統配置DNS服務CentOSDNS
- dnsmasq劫持和dns教程詳細解析DNS
- DNS域名系統概述及正向解析實驗(詳細)DNS
- RedHat 7.6作業系統安裝Redhat作業系統
- [20180427]SCAN_IP DNS 反向解析2.txtDNS
- 老牌智慧DNS系統wdDNS出新版,自部署DNS首選DNS
- 詳解 DNS 解析DNS
- 電腦dns配置錯誤無法上網怎麼辦 dns配置錯誤不能上網DNS
- DNS安全問題有哪些?DNS系統存在哪些安全隱患?DNS
- dns配置錯誤網頁打不開 電腦dns配置錯誤無法上網怎麼辦DNS網頁
- linux系統雲主機修改DNSLinuxDNS
- win10系統下dns配置錯誤的修復方法Win10DNS
- Linux系統下如何配置DNS?這些你肯定不知道!LinuxDNS
- DNS:域名系統DNS
- 域名系統dnsDNS
- 配置Ubuntu DNS伺服器UbuntuDNS伺服器
- 正確清除 DNS 快取( 附全平臺詳細教程 )DNS快取
- 作業系統1—作業系統概論(上)作業系統
- DNS劫持 DNS汙染 介紹、dns 劫持 汙染DNS
- DNS Bind日誌詳述DNS
- DNS 查詢原理詳解DNS
- DNS劫持和DNS汙染DNS
- 詳解:CoreDNS作為kubernetes後端的DNS伺服器DNS後端伺服器
- 如何使用 systemd-resolved 在 Fedora 上配置 DNS over TLSDNSTLS
- Linux 中檢視 DNS 與 配置LinuxDNS
- ubuntu 配置靜態IP 和 DNSUbuntuDNS
- dns異常怎麼修復 dns配置異常怎麼處理DNS
- 轉:DNS解析過程詳解DNS
- DNS 請求報文詳解DNS
- DNS 響應報文詳解DNS
- 作業系統基礎配置作業系統
- win10系統如何修改dns為8.8.8.8Win10DNS
- dns汙染與dns劫持,瞭解dns汙染與dns劫持,網站安全不可疏忽DNS網站
- DNS 是什麼?如何運作的?DNS
- 【作業系統】== Win10 安裝 VMware 15 超詳細教程 ==作業系統Win10
- DNS系統解析基本流程有什麼?linux系統學習DNSLinux
- DNS劫持與DNS汙染是什麼意思、dns劫持和汙染DNS
- 域名系統DNS簡述DNS