Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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).
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
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!
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.