Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Created December 24, 2022 09:18
Show Gist options
  • Save gilangvperdana/6ab987b1c8b9abb5c9c17403ab162439 to your computer and use it in GitHub Desktop.
Save gilangvperdana/6ab987b1c8b9abb5c9c17403ab162439 to your computer and use it in GitHub Desktop.
BIND9 DNS Forwarder

named.conf

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

named.conf.options

acl goodclients {
    172.20.0.0/16;
    10.0.0.0/16;
    localhost;
    localnets;
};
options {
        directory "/var/cache/bind";

        dnssec-enable yes;
        dnssec-validation yes;

        recursion yes;
        allow-query { goodclients; };

        forwarders {
                1.1.1.1;
                8.8.4.4;
                1.0.0.1;
                8.8.8.8;
                208.67.222.222;
                208.67.220.220;
        };

        forward only;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

statistics-channels {
  inet 127.0.0.1 port 8053 allow { 127.0.0.1; };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment