LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-01-2009, 01:21 AM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 679

Rep: Reputation: Disabled
caching only name server on mail gateway


I am trying to setup a caching only name server on mail gateway and wondering if I am doing it right. Here is what I have done on RHEL 5.4.

Installed RPMs:

caching-nameserver-9.3.6-4.P1
bind-libs-9.3.6-4.P1
bind-utils-9.3.6-4.P1
bind-chroot-9.3.6-4.P1
bind-9.3.6-4.P1

I have never touched the file /etc/named.caching-nameserver.conf as it says: "DO NOT EDIT THIS FILE - use system-config-bind or use an editor to create named.conf - edits to this file will be lost on caching-nameserver package upgrade."

Created the /var/named/chroot/etc/named.conf
file with the following:

Code:
options {
       listen-on port 53 { 127.0.0.1; };
       directory       "/var/named";
       dump-file       "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
       memstatistics-file "/var/named/data/named_mem_stats.txt";

       // My primary, secondary DNS servers
       forwarders {203.90.12.33; 203.90.18.21;};
       forward first;

       // maximum time (in seconds) for which the server will cache
       // positive answers
       // set to four hours.

       max-cache-ttl 14400;

       allow-query     { localhost; };
       allow-query-cache { localhost; };
};

logging {
       channel default_debug {
               file "data/named.run";
               severity dynamic;
       };
};
view localhost_resolver {
       match-clients      { localhost; };
       match-destinations { localhost; };
       recursion yes;
       include "/etc/named.rfc1912.zones";
};
- created a symlink and changed ownership of named.conf: ln -sf /var/named/chroot/etc/named.conf /etc/named.conf && chown root:named /var/named/chroot/etc/named.conf

- here is my /etc/resolv.conf output:

search mydomain.com
nameserver 127.0.0.1

Everything is working fine: I can resolve DNS queries using 127.0.0.1 as my DNS server.

Have I done the setup correctly? Anything I am missing?

Thanks.

Last edited by noir911; 11-01-2009 at 01:27 AM.
 
Old 11-01-2009, 01:52 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,200

Rep: Reputation: 870Reputation: 870Reputation: 870Reputation: 870Reputation: 870Reputation: 870Reputation: 870
Hi,

This setup is not exactly a caching dns. It's more likely a forwarding/caching dns:
Your server will forward its queries to the servers defined in the "forwarders" line and will cache the response. Only if the forwarders are down it will use the "." hint zone, defined in /etc/named.rfc1912.zones, to query the root servers. In caching name servers only the hint zone is used.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail caching trick Padawan.AVT Linux - Server 2 05-15-2009 09:40 PM
Mail server using VMware: SMTP gateway in the DMZ and maili servers on the LAN numba1 Linux - General 1 12-13-2008 03:58 PM
Help me guide to setup mail server as a mail-gateway use spamassasin (use sendmail) adcom99 Linux - Newbie 1 11-03-2007 04:47 PM
Gateway + Caching Server zaheer Linux - Networking 5 07-08-2007 02:54 PM
Caching DNS server error (lame server resolving) Iggyboo Linux - Networking 1 02-24-2005 04:43 AM


All times are GMT -5. The time now is 02:40 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration