Trying to figure out/understand this BIND/DNS thing
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Trying to figure out/understand this BIND/DNS thing
Hi
I've recently been dinkin around with DNS a bit, just to figure out how things work and stuff. Anyway...
I've setup djbdns, but really didn't feel comfortable with it, and quickly removed my work and moved onto BIND. Now I've got Bind installed, and have read the TLDP DNS HOW-TO, yet still don't quite understand what I am doing or how to setup other machines on my network to use the server's DNS. Here's what I've done/tried:
I've got BIND setup on "192.168.1.25" and from that box I can dig, ping, and lynx my way around, and afterwards, dig reports things much faster (showing me the DNS is working, at least that's my understanding). On this same box, in my /etc/resolv.conf I've got:
nameserver 192.168.1.25
search curvins.com
(curvins.com is actually what I have, that's not an example).
So then, after all these things work, I am happy. Even though I don't fully understand what I did, or how it works (yet), I am happy to see that things are working. So then I move onto another box on my network, and (here's where I screw up ) I assume that by editing /etc/resolv.conf to mirror the above's:
nameserver 192.168.1.25
search curvins.com
That it will pick it up and start working. But no dice.
If anyone can break things down a bit more to me, that'd be great. However, I am more concerned right now with getting the other machines on my LAN to use the BIND DNS on 192.168.1.25 (named "cooler") as their DNS. I think I'll learn as I go how things actually work.
first of all ur (2) linux box should only have that 'name server' entry. no 'search' entry is required in /etc/resolve.conf' file.
in 'named.conf' file of ur DNS server u should add following 'options{}' entry if the entries r not already there-
(a) u should use allow-query option to allow (2) machine to use ur name server.
(b) if u r using two ethernet cards and want to use both ethernet cards for DNS service, then u should use listen-on to specify cards.
for further detail about named.conf entries try 'man named.conf'
I setup the allow-query option, however it doesn't seem to work, I still cannot ping, dig, lynx outside my network.
Here's the syntax, maybe that's my problem:
Code:
allow-query {
192.168.1.50;
};
Or for the full deal:
Code:
options {
directory "/var/bind";
// uncomment the following lines to turn on DNS forwarding,
// and change the forwarind ip address(es) :
forward first;
forwarders {
4.2.2.5
4.2.2.6;
};
listen-on-v6 { none; };
listen-on { 127.0.0.1; };
// to allow only specific hosts to use the DNS server:
allow-query {
192.168.1.50;
};
// if you have problems and are behind a firewall:
//query-source address * port 53;
pid-file "/var/run/named/named.pid";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};
zone "127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};
I'll be readin up on the man page, but if anything looks blatently incorrect, I'd appreciate any info
Bind/DNS is quite complex. I've set it up a while ago, and its working fine now.
I read the DNS-howto, you should do a google search on it, I'm not sure were to find it.
This howto has a step by step guide on installing a DNS server, and everything is explained in it. Might help you a bit too, it was very helpfull too me anyway
I actually read over that thing, followed along trying to 'soak up' some information, but it seemed very complex and not really aimed at one without a lot of 'networking knowledge' or one looking to gain some. I guess just practicing with it a few times, figure out how things work more (follow the manual more) and reading: The BIND Adminstrator Reference Manual will help me get the hang of it. I still can't get my second machine to use the DNS server on the '192.168.1.25' box (cooler), but again, maybe I'll figure that out as well.
If anyone has any additional pointers or comments, please feel free to add. Thank you for the replies so far
I've changed that as posted above, and it had no negative effect on the 'localhost' ping/lynx/dig but when I edit the other boxes resolv.conf to:
nameserver 192.168.1.25
Again I get nothing. Put my ISP's nameserver back, and it works just fine again.
Thank for the suggestion, and I'll try plugging through the Adminstrator Manual a bit more tonight to see if I can suss this thing out. If anyone has any more suggestions, please, let your voice be heard
Ah, I wasn't sure if I had to do that or not, I've been having some issues with my zone comprehension, and was testing some stuff out. I'll put an A record up now, thank you David!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.