DNS VIEW
- //
- // Sample named.conf BIND DNS server 'named' configuration file
- // for the Red Hat BIND distribution.
- //
- // See the BIND Administrator's Reference Manual (ARM) for details, in:
- // file:///usr/share/doc/bind-*/arm/Bv9ARM.html
- // Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
- // its manual.
- //
- include "/etc/dx.cfg";
- include "/etc/wt.cfg";
- options
- {
- // Those options should be used carefully because they disable port
- // randomization
- // query-source port 53;
- // query-source-v6 port 53;
-
- // Put files that named is allowed to write in the data/ directory:
- directory "/var/named"; // the default
- dump-file "data/cache_dump.db";
- statistics-file "data/named_stats.txt";
- memstatistics-file "data/named_mem_stats.txt";
- };
- logging
- {
- /* If you want to enable debugging, eg. using the 'rndc trace' command,
- * named will try to write the 'named.run' file in the $directory (/var/named).
- * By default, SELinux policy does not allow named to modify the /var/named directory,
- * so put the default debug log file in data/ :
- */
- channel default_debug {
- file "data/named.run";
- severity dynamic;
- };
- };
- //
- // All BIND 9 zones are in a "view", which allow different zones to be served
- // to different types of client addresses, and for options to be set for groups
- // of zones.
- //
- // By default, if named.conf contains no "view" clauses, all zones are in the
- // "default" view, which matches all clients.
- //
- // If named.conf contains any "view" clause, then all zones MUST be in a view;
- // so it is recommended to start off using views to avoid having to restructure
- // your configuration files in the future.
- //
- #view "localhost_resolver"
- #{
- /* This view sets up named to be a localhost resolver ( caching only nameserver ).
- * If all you want is a caching-only nameserver, then you need only define this view:
- */
- # match-clients { localhost; };
- # match-destinations { localhost; };
- # recursion yes;
- # all views must contain the root hints zone:
- # include "/etc/named.root.hints";
-
- /* these are zones that contain definitions for all the localhost
- * names and addresses, as recommended in RFC1912 - these names should
- * ONLY be served to localhost clients:
- */
- #include "/etc/named.rfc1912.zones";
- #};
-
- view "dxzone" {
- match-clients { dx; };
- recursion yes;
- zone "zhoutao.com"{
- type master;
- file "dx/zhoutao.com.zone";
- };
- };
-
- view "wtzone" {
- match-clients { wt; };
- recursion yes;
- zone "zhoutao.com"{
- type master;
- file "wt/zhoutao.com.zone";
- };
- };
-
- view "otherzone" {
- match-clients { any; };
- recursion yes;
- zone"zhoutao.com"{
- type master;
- file "others/zhoutao.com.zone";
- };
- };
etc에서 dx를 만듭니다.cfg 및 wt.cfg 구성 파일[root@localhost etc]# cat dx.cfg acl dx {192.168.3.129;}; [root@localhost etc]# cat wt.cfg acl wt {192.168.3.130;}; /var/named/chroot/var/named에서 3개의 영역 폴더 mkdir dx wt others 만들기root@localhost named]# ls data dx others slaves wt vimdiff dx/zhoutao.com.zone wt/zhoutao.com.zone others/zhoutao.com.zone
- [root@localhost named]# cat dx/zhoutao.com.zone
- $TTL 86400
- @ IN SOA @ root (
- 42 ; serial (d. adams)
- 3H ; refresh
- 15M ; retry
- 1W ; expiry
- 1D ) ; minimum
-
- IN NS @
- www IN A 192.168.3.129
- IN AAAA ::1
-
- [root@localhost named]# cat wt/zhoutao.com.zone
- $TTL 86400
- @ IN SOA @ root (
- 42 ; serial (d. adams)
- 3H ; refresh
- 15M ; retry
- 1W ; expiry
- 1D ) ; minimum
-
- IN NS @
- www IN A 192.168.3.130
- IN AAAA ::1
-
- [root@localhost named]# cat others/zhoutao.com.zone
- $TTL 86400
- @ IN SOA @ root (
- 42 ; serial (d. adams)
- 3H ; refresh
- 15M ; retry
- 1W ; expiry
- 1D ) ; minimum
-
- IN NS @
- www IN A 192.168.3.128
- IN AAAA ::1
/etc/init.d/named start resolv를 수정합니다.conf는dig 또는host 명령으로 192.168.3.129에서 테스트합니다[root@localhost etc]# host www.zhoutao.com www.zhoutao.com has address 192.168.3.129 192.168.3.130에서root@localhost ~]# host www.zhoutao.com www.zhoutao.com has address 192.168.3.130 www.zhoutao.com has IPv6 address: 1 기본 192.168.1.7 [zhoutao@WorkSpace ~]$ host www.zhoutao.com www.zhoutao.com has address 192.168.3.128 www.zhoutao.com has IPv6 address::1
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Django 사용자 인증 시스템의 사용자 정의 구현 방법사용자 인증 시스템 사용자 정의 Django가 자체 보유한 사용자 인증 시스템은 이미 대부분의 상황을 만족시킬 수 있지만, 때때로 우리는 특정한 수요를 필요로 한다.Django는 다른 인증 시스템을 사용하거나 Dja...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.