Mailinglist Archive: opensuse (888 mails)

< Previous Next >
Re: [opensuse] Split DNS? Solved
On 12/28/2010 10:00 AM, Lars Müller wrote:
On Mon, Dec 27, 2010 at 04:12:28PM -0800, Marc Chamberlin wrote:
Hi - Wonder if anyone has set up a split DNS server running on a
single system, with two NICs, under openSuSE? If so, did you rework
any of the daemon scripts to start a second named daemon? How did
you reorganize the named directories in the chrooted dir
/var/lib/named? Looking at the scripts this looks rather hairy, so
if someone has already done this, sure could use some pointers and
reworked scripts...
Last time I had to use this it worked. And the DNS server is still in
operation.

Even if you have to serve several networks with fitting zone files this
is mainly a question of the named runtime configuration. There is no
need to modify the init script as it is packaged.

Store your settings in /etc/named.d/<my_named>.conf and ensure to
include this file in the /etc/sysconfig/named:NAMED_CONF_INCLUDE_FILES

If this doesn't work for you please file a bug report.

Lars
Thanks Lars, Cristian, Lews for your help. I did not have to use dnsmasq or set up a second DNS server after all. Turns out the latest version of Bind, which is 9, has a new feature called Views. These allow the DNS server to answer queries based on who is asking the question, and that is exactly why I needed a split DNS server. So using Views allowed me to accomplish what I was after... Pretty NEAT!

That said, there is not much in the way of good documentation/examples on how to use Views, so anyone wanting to do so, you are going to have to do some trial and error methods. Will offer a few pointers and suggestions for any openSuSE developer who happens to be reading this-

1. Do NOT use the Yast DNS server tool to do any configuration for you, if you wish to use Views. It is braindead about both views and include mechanisms and will simply trash your work on you, I don't think it can handle em yet.

2. The organization of files for the named server is somewhat difficult to comprehend. It is not really clear what files get copied out of the /etc directory over to the chroot directory /var/lib/named and what don't without grokking the scripts. What is worse is that all the config and include files exist in a flat space in /etc. This could use some reorganization so that all named files exist under a single root directory, IMHO, so as to make it easier to comprehend what files go where. In particular the built in include mechanism does not assume anything about exactly where to find include files, and if one uses it as I did, to create separate directories to hold the config files for each view, then it will force you to run the rcnamed script from the /etc directory. The fact that the rcnamed script will prepend the chroot dir path to the source file/dir name when creating the target dir, for these copy operations, forces one to use relative paths names, which is why rcnamed can only then be used from within the /etc directory once include files are defined. This is either a poor design of this script or a file model is being used that is not well documented or intuitive to understand, again IMHO!

3. Last, be careful of using rcnamed when restarting the server. It can and will delete files and directories in the /var/lib/named area without doing any kind of backup first. That is poor programming on someone's part also and breaks a fundamental rule of good computer science - NEVER delete or change user data without backing it up first and making sure you have a good backed up copy before making such changes, or deleting it!!!...

Marc Chamberlin....


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >