dapurhosting.com Blog for Tech

April 19, 2009

Closing Open DNS Servers

Filed under: Securtiy — Tags: , — dh @ 4:31 am

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.confpico /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; };

  3. Now save and restart namedservice named restart

Source:

http://www.cpanelconfig.com/cpanel-security-related-articles/closing-open-dns-servers/

Powered by WordPress