cPanel Config

Welcome to cPanelConfig the fastest growing cPanel configuration and troubleshooting guide on the internet. Please take the time and register. We would love to have your contribution to this completely free cPanel resource. We are updating this daily so be sure to visit us on a regular basis.

Closing Open DNS Servers

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)
Loading ... Loading ...

Posted by yolau


Allowing DNS Recursion is like running an Open SMTP Relay. You allow anyone to query your DNS server and this can easily lead to abuse.
You can fix this by disabling recursive lookups for not authorized IP’s.
This article will teach you step by step how to do this.

  1. Login to your server as root
  2. Edit /etc/named.conf
  3. pico /etc/named.conf

    Add before options {} the fallowing:

    acl “trusted” {
    MAIN_IP;
    SECONDARY_IP;
    127.0.0.1;
    };


    Where MAIN_IP and SECONDARY_IP are the IP’s of your nameservers on that server.

    Now you have to add in the same file /etc/named.conf in the options {} part of the file the fallowing:

      allow-recursion { trusted; };
      allow-notify { trusted; };
      allow-transfer { trusted; };

  4. Now save and restart named
  5. service named restart

Share this:
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Netvouz
  • description
  • ThisNext
  • MisterWong
  • Wists
  • De.lirio.us
  • Furl
  • MyShare
  • Smarking
  • Technorati
  • YahooMyWeb

If you enjoyed this post, make sure you subscribe to my RSS feed!

One Response to “Closing Open DNS Servers”

  1. Your blog has helped me allot with all of your security tips, I thought i would share a named secret of my own.

    Inside your options {} If you add

    version “What ever you would like here”

    Instead of displaying the BIND version you use on port scan applications it will show your custom banner.

    Keep up the good posts :)

Leave a Reply