LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-10-2007, 12:38 PM   #1
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Rep: Reputation: 15
BIND - 2 Nameservers on one system (2 IPs)


Hi,

I have a VPS with 2 spare IPs to be used for nameservers. What I'm wondering is, all the tutorials I'm reading seem to be geared to having 2 servers hosting nameservers. I don't have two servers, but rather 1 server (a VPS) with 2 spare IPs for nameservers.

Do you know if there is a way to host 2 nameservers off of 2 IPs on one server?

Thanks!

Splenden
 
Old 01-10-2007, 01:23 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
You could install 2 instances of bind, and tell each instance to only listen on one IP address within named.conf.

That isn't a good idea however. You should have 2 nameservers at 2 seperate locations, that way if one looses power or internet connectivity, the other still can supply DNS info. With only one box and 1 access to the net, if your connection goes down, all of your DNS goes down.

Peace,
JimBass
 
Old 01-10-2007, 02:09 PM   #3
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Original Poster
Rep: Reputation: 15
I understand. Unfortunately, I don't have another server to put DNS on. (Of course, if my DNS went down, Apache would too since it's on the same machine.)

I might try 2 instances of BIND. I'm only doing 2 NS servers to meet the DNS requirements from my registrar (2 nameservers).

Thanks!

Splenden
 
Old 01-10-2007, 02:15 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Well, you don't need to run two instances of bind. You could have, but as long as you give DNS answers on the 2 addresses you give the registrar, you'll be fine. Just install bind once, and make sure it listens on all interfaces. Test it out with
Code:
dig yahoo.com @first.ip.address
dig google.com @2nd.ip.address
If you get answers for both, then the DNS is working on both interfaces.

Peace,
JimBass
 
Old 01-10-2007, 02:26 PM   #5
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Is there a way to make it listen on 2 specific IP addresses rather than all IP addresses?

Thanks!

Splenden
 
Old 01-10-2007, 02:27 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
Quote:
Originally Posted by Splenden
I understand. Unfortunately, I don't have another server to put DNS on. (Of course, if my DNS went down, Apache would too since it's on the same machine.)

I might try 2 instances of BIND. I'm only doing 2 NS servers to meet the DNS requirements from my registrar (2 nameservers).

Thanks!

Splenden
JimBass is correct. Just point both your ns1 and ns2 at the registrar level to two IP's that the machine may have and just have Bind listen on all, should work instead of having two Bind's running.. that's just silly!
 
Old 01-10-2007, 02:28 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
Quote:
Originally Posted by Splenden
Is there a way to make it listen on 2 specific IP addresses rather than all IP addresses?

Thanks!

Splenden
Well, for DNS resolution though it's only technically going to use the two you have for ns1 and ns2.. but you can just easily block the others if you have other IP's with iptables just so port 53 isn't listening on all IP's.
 
Old 01-10-2007, 02:36 PM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yes, it is best to listen on everything.

You can restrict listening to given interfaces, but you probably have only a single interface with multiple addresses, so you can't easily restrict it. You can google for listen-on in named.conf, that will give you info, but there is no good reason to do that.

Peace,
JimBass
 
Old 01-10-2007, 02:48 PM   #9
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Original Poster
Rep: Reputation: 15
IPtables. Great idea! Thanks everyone!

Splenden
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does bind has some dns-server ips inside? zhjim Linux - Software 2 11-07-2006 12:05 PM
Bind other ips while running mirc\egg indiano Linux - Newbie 0 01-31-2006 05:03 PM
how to edit/make nameservers to ips? trebbor Linux - Networking 1 06-30-2005 01:10 PM
bind mysqld to multiple IPs demian Linux - Software 0 05-03-2005 08:10 PM
How to bind IPs using webmin? swijaya0101 Linux - Newbie 0 05-25-2003 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:45 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration