Open DNS fix for CPanel

Open DNS gives a error and means that anyone can use your DNS resolvers. To lock it down you can add this.

1. Login to your server as root.

2. Wget and run the script as :

Code:

http://shashank.net/scripts/named.patch
sh named.patch

3. It will provide you with an output like :

Code:

allow-recursion {
127.0.0.1;
xxx.xxx.xxx.xxx;
xxx.xxx.xxx.xxx;
};

4. Copy and paste this code in the Options section of your named.conf. Something like :

Code:

options {
options {
directory “/var/named”;
allow-recursion {
127.0.0.1;
xxx.xxx.xxx;
…. ….
…. ….
};
};

5. Save named.conf and restart the named service. All all zones to load and check dns report now. The open nameservers warning no longer shows up. Hope it works fine for you. Any additions, corrections welcome.