NEXUCOM - Support / Knowledge Base

Search:     Advanced search
Browse by category:
Contact Us

How to Close Open DNS Servers

Views: 1031
Votes: 0
Posted: 20 Dec, 2007
by: Tech A.
Updated: 20 Dec, 2007
by: Tech A.

For those of you who check your nameservers and other DNS related issues using the popular site dnsreport you're probbaly seeing Fail Open DNS Servers. We'll show you have to fixed named to close open dns servers.

How do I check my system?
Go to www.dnsreport.com and enter your domain name, eg .yourdomain.com

You’re safe if you see:
PASS Open DNS servers

You need to follow this tutorial if you see:
FAIL Open DNS servers

Closing Open DNS Servers Tutorial

1. Login to your server and su to root.

2. Edit the /etc/named.conf file such as:

# vi /etc/named.conf

Look for:
 

key "rndckey" {
};


After this add the following, replacing mainIP and secondaryIP with your systems nameservers. 

 

acl "trusted" {
mainIP;secondaryIP;127.0.0.1;
};



3. After that’s done you want to add the section that says only the trusted is allowed for certain functions. Check your options area and make sure you add the following:
 

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

 

So the final result looks something like:
 

options {
        directory "/var/named";
        allow-recursion { trusted; };
        allow-notify { trusted; };
        allow-transfer { trusted; };
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
         // query-source address * port 53;
};


 

4. Save the changes and restart the named service: service named restart

5. Recheck your site at dnsreport.com, you should be good!


Note: If you have multiple servers running off the same DNS, make sure that you put all those server IPs in the trusted area if they are resolving through that DNS:

 

 

acl "trusted" {
mainIP;secondaryIP;firstserverip;secondserverip;127.0.0.1;
};

 

 

Others in this Category
document How to add Frame Forwarding to your website
document How to FTP Connection with IE6 [Internet Explorer 6]
document How to ROBOTS.TXT File Use
document How to Email Account Configuration [Microsoft Outlook 2003]
document Netstat Command [Linux/Unix]
document How to Ban an IP Address From The Server
document How to install PRM [Process Resource Monitor]
document How to Install mod_evasive
document How to Install DDoS Deflate
document How to Disable Direct Root Logins
document How to Creating a Welcome message for SSH logins
document How to Hide BIND version
document How to Install TeamSpeak Server [linux]



RSS

Services d'Hébergement: Hébergement Web | Serveurs Dédiés | Streaming | Colocation Serveurs | Nom de Domaine | Support |

Hosting Services: Web Hosting | Dedicated Servers | Streaming | Servers Colocation | Domain Name | Support |

Services: | Hébergement | Serveurs | Colocation |

Copyright © 2003-2008. NEXUCOM, All Rights Reserved.

Mascot - Mascots - DirectAdmin - big - mf - Boiler Biomass - Mascottes - Mascots - Webmail - gt - Chaudière Biomasse - Mascottes - Mascotte -

statistics