Skip to content

Instantly share code, notes, and snippets.

@krishnamurthydasari
Last active February 1, 2018 10:08
Show Gist options
  • Save krishnamurthydasari/ce800483efe91d812461f19f63398477 to your computer and use it in GitHub Desktop.
Save krishnamurthydasari/ce800483efe91d812461f19f63398477 to your computer and use it in GitHub Desktop.
If server is used only for forward requests:
options {
.
.
allow-query { localhost; any; };
recursion yes;
forward only;
.
.
dnssec-enable yes;
dnssec-validation no;
.
.
forwarders {
8.8.8.8;
8.8.4.4;
};
};
If DNS server has other forward and reverse zones and you also want to add forward zone based on condition, for example, all requests related to example.com should be forwarded to server2,
options {
.
.
allow-query { localhost; any; };
recursion yes;
dnssec-enable yes;
dnssec-validation no;
.
.
};
zone "." IN {
type hint;
file "named.ca";
};
zone "krishna.com" IN {
type master;
file "krishna.fwd.zone";
};
zone "example.com" {
type forward;
forward only;
forwarders { DNS_Server2; };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment