nns 구축 및 흔한 문제
내 프로필 보내기
//
// named.conf
//
// Provided by Red Hat bind 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.
//
options {
listen-on port 53 { 192.168.122.20; };
//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";
allow-query { 192.168.122.0/24; }; //
recursion yes;// DNS
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "sh.com" IN {
type master;
file "sh.com.hosts";
};
zone "122.168.192.in-addr.arpa" IN {
type master;
file "192.168.0.rev";
};
key "rndc-key" {
algorithm hmac-md5;
secret "xgxzJPDFyVGEFnT44Rw3OA==";
};
controls { 192.168.0.rev
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
내 도메인 파일 보내기
sh.com.hosts
$TTL 38400
@ IN SOA rhel.sh.com. root.sh.com.(
1268360234
10800
3600
604800
38400 )
@ IN NS rhel.sh.com.
rhel IN A 192.168.122.20
linux IN A 192.168.122.50
www IN CNAME rhel.sh.com.
mail IN CNAME rhel.sh.com.
ftp IN CNAME rhel.sh.com.
@ IN MX 10 mail.sh.com.
192.168.0.rev
$TTL 1D
@ IN SOA rhel.sh.com. root.sh.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ NS rhel.sh.com.
20 PTR rhel.sh.com.
50 PTR linux.sh.com.
ps: 보조 dns 서버를 구축하는 절차와 앞의 두 단계와 같은 추가역의 형식은 다음과 같다. zone "sh.com"IN {type slave;masters {192.168.122.20;}; file "slaves/sh.com.hosts"; };\\/var/named/slaves 동기화 마스터에서 해당 영역을 추가한 파일을 자동으로 생성합니다.dns 서버를named에 완전히 전송합니다.conf에 fowarders {IP;} 추가; forward only; 조건부 전송 DNS 서버는 도메인에 대해 특정 도메인을 DNS zone "xx.com"IN{type forward;fowarders {IP;}로 전송합니다. };도메인 위임은 DNS의 부담을 줄이지만 새 호스트가 가상 서브도메인을 사용하면/var/named/지하에만 사용되는 도메인 파일을 간단하게 처리할 수 있습니다. 예를 들어 $ORIGIN sh.com.$ORIGIN xx.sh.com. IN NS leaf.xx.sh.com.leaf IN A 192.168.122.20 편집/etc/resolve.conf에 부모 DNS 서버를 추가하면 캐시 서버가named에 있는지 확인할 수 있습니다.conf에 데이터 크기 예를 들어 100M 추가;도메인 이름sh.com을 직접 사용할 수 있습니다.IN A 192.168.122.2 범도메인 이름 해석 *.sh.com. IN A 192.168.122.2 액세스 제어 named.conf에allow-query{액세스 제어 목록 이름}acl 액세스 제어 목록 이름 {!192.168.122.1:192.168.122.0/24; };이 세그먼트가 1을 제외한 dns가 bind-chroot에 액세스할 수 있도록 하는 것은 비교적 안전한 dns##########################################################################################################################key "rndc-key"{ algorithm hmac-md5; secret "xgxzJPDFyVGEFnT44Rw3OA==";};controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; };};/etc/init.d/named 두 줄 오류가 발생했을 때/etc/named에 추가합니다.conf 가능cat/etc/rndc.conf dig 명령을 사용하여 먼저 bind-utilsdig 도메인 이름dig - x ip를 설치합니다.
dig -t 유형 1.DNS를 시작할 때 Generating/etc/rndc.가 나타납니다.키:여기 걸렸어[root@RedHat named]#/etc/init.d/named restartStopping named: [ OK ]Generating/etc/rndc.key:^C[root@redhatnamed]# 해결 방법: [root@redhat named]# rndc-confgen -r/dev/urandom -awrote key file "/etc/rndc.key"[root@redhat named]#/etc/init.d/named restartStopping named: [ OK ]Starting named: [ OK ] linux
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.