Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-21-2008, 10:00 AM   #1
LQ Newbie
Registered: May 2008
Posts: 3

Rep: Reputation: 0
private DNS confusion


The external DNS server for our domain "" is provided by our ISP. We have mail, www, ftp machines hosted by another hosting company.

Now we have a machine on our LAN that is available on the internet (hostname is ""). We have the external DNS setup correctly for "" at our ISP.

However for internal users to get to "" we now are running a private internal DNS server. It is on CentOS 5.1 (it is actually the same box as "").

How do I configure the internal DNS server to:
1. resolve "" to it's LAN address.
2. forward ALL other "" requests to our ISP's DNS server.
3. forward ALL other DNS requests to our ISP's DNS server.

So the internal DNS server's sole purpose is to handle name requests for "" and forward all other requests to the ISP nameserver.

Any ideas on how to configure this using BIND 9?
Old 05-21-2008, 07:53 PM   #2
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
I believe that if you have a cacheing nameserver already set up on your CentOS machine, all you need to do is to make it authoritative for the subdomain, by providing a zone file to it which contains a SOA record for that subdomain (and an A record to specify the address).

For extra credit, you might be able to add your ISP's nameserver to the hints file that all cacheing nameservers load, so that they have a clue about how to begin resolving a name.
Old 05-21-2008, 10:04 PM   #3
Registered: Feb 2002
Posts: 50

Rep: Reputation: 15
in your named.conf something like this would help

options {
directory "/var/named";
allow-query {; };
forwarders {;; };
zone-statistics yes;

Put your ISP DNS servers in the forwarders section
Old 05-22-2008, 08:42 AM   #4
LQ Newbie
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks guys. It works now. That is actually the first setup I tried and it didn't work. Queries for "" would time out. Queries for "" and the others would work fine.

So I went with a setup for a zone file of "" but then I had to duplicate the information for the other "" hosts (www, ftp, mail). And that worked but I didn't like it because of the duplication.

After reading your posts I tried doing the setup for a zone of "" again to avoid the duplication problem. It works now! I'm not sure why it didn't work the first time, but I think it may be because I had this line in the configuration that didn't work:


I excluded that line this time and it worked. So my final zone file looks like this:

$TTL 3h
@ IN SOA (
200805204 ; serial
2H ; refresh slaves
5M ; retry
1W ; expire
1M ; Negative TTL


And my final named.conf looks like this:

zone "" IN {
type master;
zone-statistics no;
file "";
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
allow-query { acl_all; };
forwarders {;; };
logging {
channel default_debug {
file "/var/named/data/";
severity dynamic;
print-time yes;
print-severity yes;
print-category yes;

Thanks for the help!


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS not resolving private ip tsaravan Linux - Networking 1 10-04-2007 02:13 PM
DNS/BIND and file confusion ACDII Linux - General 2 07-27-2007 07:38 AM
dns confusion cope Linux - Server 7 04-18-2007 11:08 AM
Mysterious DNS Lookups on private host neiljt Linux - Security 3 08-31-2004 07:31 PM
Newbie DNS confusion thomas.nichols Linux - Networking 3 07-19-2001 09:04 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:29 PM.

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