LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-03-2016, 05:15 AM   #1
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
setting external DNS for one zone in Bind


Hi everyone.

I hope this is the correct sub forum for Bind related questions. If not, feel free to move my post.

I'm trying to configure an external DNS for one zone different from the other forwarders.

I created the following zone file /etc/bind/db.example.com
Code:
$TTL    604800
example.com.     IN      SOA     ns1.dreamhost.com. hostmaster.dreamhost.com. (
                        27
                        604800
                        86400
                        2419200
                        604800 )
;
example.com.     IN      NS      ns1.dreamhost.com.
example.com.     IN      NS      ns2.dreamhost.com.
and included it in /etc/bind/named.conf.local
Code:
zone "example.com." {
        type master;
        file "/etc/bind/db.example.com";
        };
But it is not working at all and I can't figure out, why. When I run

Code:
dig any example.com @ns1.dreamhost.com
it shows me all configured records.

The reason why I'm trying to do this is, I'm in the process of moving a domain to a different registrar/hoster. I setup all subdomains, email accounts etc. and want to test everything from my LAN before changing the nameserver at my old provider.
 
Old 03-03-2016, 07:46 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
http://www.zytrax.com/books/dns/

You might miss the A records for {ns1,ns2}.dreamhost.com. Not sure. Check out the book.
 
1 members found this post helpful.
Old 03-03-2016, 08:12 AM   #3
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by zhjim View Post
http://www.zytrax.com/books/dns/

You might miss the A records for {ns1,ns2}.dreamhost.com. Not sure. Check out the book.
I thought that too, but I can't put the A records in the same zone file as bind will complain about them not being in the same zone. And also {ns1,ns2}.dreamhost.com already resolve on my DNS through the forwarders I already setup. And the A records could change at any time without me noticing it. I don't have control over them.

/etc/bind/named.conf.options
Code:
...
forwarders {
        208.67.222.222;
        208.67.220.220;
        8.8.8.8;
        8.8.4.4;
        };
...
Edit: I found in the link what I needed to do. The term I had to look for is "Per Domain Forwarding". From the book:

Code:
// zone section fragment of named.conf 
zone "example.com" IN {
	type forward;
	forwarders {10.0.0.1; 10.0.0.2;};
};
Though it only accepts IP's as forwarders, not names. But I can live with that for now.

Thanks very much

Last edited by hortageno; 03-03-2016 at 08:13 AM.
 
Old 03-03-2016, 09:46 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Your welcome. This book helped me out tons. I really like it.

Please mark the thread as solved. Top of the page "Thread Tools".
 
  


Reply



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
Which zone bind dns work either in forward zone are reverse zone sanjay87 Linux - Server 2 06-05-2012 04:21 AM
BIND DNS -- Zone inescapeableus Linux - Networking 17 10-08-2006 03:46 PM
Bind Dns zone lhrt Linux - Software 2 09-26-2006 08:45 AM
Bind DNS Slave zone macadam Linux - Networking 2 03-02-2005 06:49 AM
Dyn. update of DNS zone in BIND 9.2.1 on RH8.0? Tom Bombadil Linux - Networking 0 03-11-2004 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration