BIND 9 Configure Views To Partition External and Internal DNS Information

BIND 9 Configure Views To Partition External and Internal DNS Information

To configure views in BIND 9 to partition external and internal DNS information, you can use the view block in the BIND configuration file (usually named.conf).

The view block specifies a DNS view, which is a logical grouping of DNS data that can be accessed by specific clients or networks. You can use views to configure different sets of DNS data for different sets of clients, or to separate internal and external DNS information.

Here is an example of how to configure views in BIND 9 to partition external and internal DNS information:

view "internal" {
  match-clients { 192.0.2.0/24; localhost; };
  zone "example.com" {
    type master;
    file "/etc/bind/zones/example.com.internal.db";
  };
};

view "external" {
  match-clients { any; };
  zone "example.com" {
    type master;
    file "/etc/bind/zones/example.com.external.db";
  };
};
So‮cru‬e:www.lautturi.com

This configuration defines two views: "internal" and "external".

The "internal" view is configured to match clients in the network 192.0.2.0/24 and the localhost, and serves the DNS data from the file /etc/bind/zones/example.com.internal.db for the zone example.com.

The "external" view is configured to match all clients, and serves the DNS data from the file /etc/bind/zones/example.com.external.db for the zone example.com.

You can use the match-clients option to specify the clients or networks that should be matched by the view. You can use the zone block to specify the DNS data that should be served by the view.

Keep in mind that you need to define the DNS data for each view in separate zone files, and specify the correct file for each view in the view block.

Created Time:2017-10-27 14:56:34  Author:lautturi