LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Thread Tools
Old 11-01-2009, 01:21 AM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Distribution: OpenBSD, Redhat, OpenSUSE, Solaris
Posts: 654
Thanked: 1
caching only name server on mail gateway


[Log in to get rid of this advertisement]
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..
windows_vista noir911 is offline     Reply With Quote
Old 11-01-2009, 01:52 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,045
Thanked: 224
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
linuxslackware bathory is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


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 03:24 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration