LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   named.conf question (https://www.linuxquestions.org/questions/linux-networking-3/named-conf-question-757634/)

Pogasu 09-24-2009 09:31 PM

named.conf question
 
Hello everyone!

I would like to do what my teacher at School did to configure a DNS server. He did it in fedora 11 and so do I.
I already made the zone files as he did in /var/named/chroot/var/named/ but when i tried to add the zones to named.conf in /var/named/chroot/etc/ there was an error because there isnt such a file in that folder. I read tutorials and everywhere is said that the named.conf file is located in /etc/

I have the next class in 2 weeks and I would like to know why is that. Could you explain me?

Thanks!

kbp 09-24-2009 10:20 PM

This may be complete rubbish, but from memory, when you install bind-chroot it moves /etc/named.conf to /var/named/chroot/etc/named.conf and then puts a symlink in its place... or maybe that was a manual step ...

good luck

Pogasu 09-25-2009 11:03 AM

Thanks for your answer!
I installed bind-chroot before doing the zone files but there wasnt such directory!
Whats the diference between them? What could happen if I modify the /etc/named.conf instead of /var/named/chroot/etc/named.conf ? Or What could happen if I move them manually?

salasi 09-25-2009 02:54 PM

Quote:

Originally Posted by Pogasu (Post 3696275)
Hello everyone!


I already made the zone files as he did in /var/named/chroot/var/named/ but when i tried to add the zones to named.conf in /var/named/chroot/etc/ there was an error because there isnt such a file in that folder. I read tutorials and everywhere is said that the named.conf file is located in /etc/

I'm not sure that I am helping you (given up using BIND as my DNS server quite some years ago) but from what I remember:
  • chroot is difficult (or, at least, one of the more difficult parts of setting up BIND) or at the very, very, least, one of the more tricky little bits of getting things going
  • when bind gets going, I thought it read its conf file from the conventional place (/etc) but, as it changes root (chroot) almost immediately, everything after that gets read relative to the new root directory. So, if bind is chrooted to a directory called /chrootdir, then anything that would have been read relative to /etc/thisdir/thatdir/ is now read relative to /chrootdir/etc/thisdir/thatdir/ (err, and obviously chrootdir could be /somewhere/else/chrootdir, if that's in some way useful to you)
  • and the one really practical tip that I have for you...if you start BIND from the command line, you can see immediately what error messages are issued. This makes seeing what is wrong and taking measures to put it right very much more convenient. Only when you get the start up to occur without errors, is it worth starting BIND automatically at system start start-up.

Quote:

Originally Posted by Pogasu (Post 3696275)
Could you explain me?

To me that seems rather too hard a question

Note: not having explained the problem that you are trying to solve, only how you are trying to solve it (using BIND chrooted) it is impossible to explain to you easier and better ways of solving the problem, which may well exist. OTOH you may well not be interested.

Pogasu 10-02-2009 10:37 PM

Thanks salasi,
I think I must read more about bind-chroot to understand better this thing. I do not have any problem. Sorry if I didnt say so, my question was about /../chroot/... I just wanted to do everything exactly as my teacher did. And the first thing I saw was wrong was the location of named.conf (he had it in /var/named/chroot/var/named/ and I didnt)
I installed bind-chroot, bind-utils but the ../chroot/etc/named.conf still doesnt exist. I will continue with what I have in /etc/

Thanks!

Edit: I found a possible answer thanks to your advice salasi. If someone in the future has the same problem, the answer is here http://www.linuxhomenetworking.com/w...uring_DNS#BIND "There can be confusion with the locations: Regular BIND installs its files in the normal locations, and the chroot BIND add-on RPM installs its own versions in their chroot locations. Unfortunately, the chroot versions of some of the files are empty. Before starting Fedora BIND, copy the configuration files to their chroot locations:........"

salasi 10-03-2009 04:37 AM

Quote:

Originally Posted by Pogasu (Post 3705750)
Edit: I found a possible answer thanks to your advice salasi. If someone in the future has the same problem, the answer is here http://www.linuxhomenetworking.com/w...uring_DNS#BIND "There can be confusion with the locations: Regular BIND installs its files in the normal locations, and the chroot BIND add-on RPM installs its own versions in their chroot locations. Unfortunately, the chroot versions of some of the files are empty. Before starting Fedora BIND, copy the configuration files to their chroot locations:........"

Err, it turns out that you are being more generous with your thanks than is reasonable. I believe that I read exactly that sentence from linuxhomenetworking some years ago and could, potentially, have pointed you to exactly that source of information (I have it bookmarked, but hadn't remembered that it was the original source of the information). Anyway, it worked for you which is the main thing, and you have included the reference for anyone else subsequently reading this thread, which is good too.

scottro11 10-03-2009 06:24 AM

If I remember correctly, they changed the whole setup and didn't bother mentioning it. The reply to someone posting on RedHat bugzilla was the somewhat absurd, "No need, you've posted it here."

The files, if I remember correctly, now have to be copied from /usr/share/doc---wait, I think it's in the CentOS FAQ. (CentOS is based on the enterprise version of RH)

http://wiki.centos.org/FAQ/CentOS5#h...00f7251f3bc496

See if the files are there.

<rant> If documentation is considered software, this is the sort of thing that is almost unforgivable, especially in a distribution aimed at the enterprise, such as RedHat. When you make major changes, if it doesn't get into the release notes, put it there. Don't close it as not a bug.</rant>

As you'll find in your studies, much of the work is simply because those who document these things are either lazy, sloppy, or simply incompetent.

EDIT: I should add that in my experience, the folks documenting Fedora itself are very diligent, doing things like checking Fedora forums to see what is causing new users to have problems and making sure to get it into release notes, common problems, etc. They are very responsive to intelligent comments about what is missing. (As opposed to comments like, "How can you be so stupid as to leave this out?" :)



Curmudgeonly yours,


All times are GMT -5. The time now is 01:27 AM.