Closing open DNS server. Add the following to your named.conf file.
Add the following, replacing mainIP and secondaryIP with your systems nameservers.
acl “trusted” {
mainIP;secondaryIP;127.0.0.1;
};
Example:
acl “trusted” {
mainIP;secondaryIP;firstserverip;secondserverip;127.0.0.1;
};
Only the trusted IP is allowed for certain functions.
allow-recursion { trusted; };
allow-notify { trusted; };
allow-transfer { trusted; };
Example:
include “/etc/rndc.key”;
controls {
inet 127.0.0.1 allow { localhost; } keys { “rndckey”; };
};
acl “trusted” {
ip1;ip2;ip3;ip4;ip5;127.0.0.1;
};
//
// [...]