Views in BIND 9

By adminGeneral

BIND 9 views allow you to serve different DNS responses to different clients. This is particularly useful for split-horizon DNS where internal and external clients receive different answers.

What are BIND Views?

Views allow a DNS server to present different data to different clients. For example, internal clients can receive private IP addresses while external clients see public addresses.

Configuring Views

// /etc/named.conf
view "internal" {
    match-clients { 192.168.1.0/24; };
    zone "example.com" {
        type master;
        file "/var/named/internal.example.com";
    };
};

view "external" {
    match-clients { any; };
    zone "example.com" {
        type master;
        file "/var/named/external.example.com";
    };
};

Use Cases

  • Split-horizon DNS for internal/external resolution
  • Geographic-based DNS responses
  • ISP-specific responses