Go Back   Linux Forums by TotalPenguin! Get linux Help! > Linux > Linux Web Server

Linux Web Server Web Server help and support (including cpanel, whm, plesk, etc.)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-2008, 03:07 PM
Member
 
Join Date: Oct 2007
Posts: 30
Valor is on a distinguished road
Default Check /etc/named.conf for recursion restrictions

In CSF for WHM I am getting this error:

Code:
You have a local DNS server running but do not have any recursion restrictions  set in /etc/named.conf. This is a security and performance risk and you should  look at restricting recursive lookups to the local IP addresses only
But it does not specify how to fix the problem. I figured named.conf would be a config file but it looks more like a script. I couldn't figure out what to do. Could anyone help?
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-05-2008, 02:36 PM
Jordan's Avatar
Administrator
 
Join Date: Nov 2006
Posts: 572
Jordan will become famous soon enough
Default

Take a look at your named.conf file. It should look like this:

Code:
include "/etc/rndc.key";

controls {
        inet 127.0.0.1 allow { localhost; } keys { "rndckey"; };
};

//
// named.conf for Red Hat caching-nameserver
//

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
};
You need to add some lines to allow localhost recursion but nothing from the outside. If you disable this completely and run a DNS server this will cause the service to halt.

You need to add these lines:

Code:
allow-recursion { trusted; };
allow-notify { trusted; };
allow-transfer { trusted; };
forwarders { 127.0.0.1; };
in Options and

Code:
acl "trusted" {
127.0.0.1;
};
So it should look like this:

Code:
include "/etc/rndc.key";

controls {
        inet 127.0.0.1 allow { localhost; } keys { "rndckey"; };
};

//
// named.conf for Red Hat caching-nameserver
//

acl "trusted" {
127.0.0.1;
};

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        allow-recursion { trusted; };
        allow-notify { trusted; };
        allow-transfer { trusted; };
        forwarders { 127.0.0.1; };
};
Restart bind.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:41 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.