On Fri, Dec 31, 2010 at 04:52:53PM -0800, Marc Chamberlin wrote: [ 8< ]
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.
Which bug report have you filed? ID please.
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.
Sorry, here I'm not able to follow you. /etc/sysconfig/named clearly states what's done. If the documentation isn't clear or straight enough file a bug report. Discussiong an issue on a list isn't a bug report. ;)
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.
Then you have to rename and reorganize the structure of the named %files section. And this results in changing the location of files. This includes the risk to break running configurations. Unfortunately moving configuration files which are tagged as %config(noreplace) in the %files section of the spec file isn't that easy.
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.
Either the implemantation is broken or you've not read the comments in /etc/sysconfig/named Please consider to open a bug report for this particular include issue.
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!
And this sounds like you've not read the comments in the sysconfig file. Either use relative path names or fully qualified file/ path names.
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!!!...
This is covered by which bug ID? No report in bugzilla = no issue. Which files are deleted or overwritten? Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany