Click to See Complete Forum and Search --> : Need help with DNS
wyseguy79
04-07-2001, 03:48 PM
im not sure if this is the correct place to post, but it has to do with Web serving, so here goes.
I reciently had a crash of my old Red Hat system, So Im went and had to format the drive without gettting all my old data (total loss) so now im starting from scratch. I install Red Hat 7, and all the needed utilities to do web serving, and I installed the DNS package that comes with it. I cant find where I go to setup up zones and all the domain names that I want this box to host. Before I used to go into my var/named/zone and they were setup there, now its like i have var/named and thats it. Also in the Linuxconf, I could setup the DNS stuff. That no longer exists. If anyone could point me the right direction or tell me what i should do, that would be great.
bdg1983
04-08-2001, 03:50 PM
BIND? Haven't had a chance to try it myself, but I do know the documentation for the package should be under /usr/doc. Should tell you where the configuration files now reside.
wyseguy79
04-08-2001, 04:52 PM
well I looked into that, and my box doesnt have a usr/doc folder. I have a usr folder, but no doc folder inside =(
Fireman-x
04-08-2001, 05:26 PM
Look in your /etc/named.conf file, it'll tell you where to look.
Try the /etc/bind directory too...
wyseguy79
04-08-2001, 06:28 PM
well the named.conf just shows all my domains that i have, and where their record file is. I dont have a etc/named =(
freebsd
04-08-2001, 07:40 PM
>> and where their record file is
Then where those zone files should be in?
Check and see if there is a directory directive within options.
Within each zone, if it says [b]file "your.zone.record.file", then that's the relative directory (same dir in this case) under your directory in options.
wyseguy79
04-09-2001, 02:01 AM
huh? I have no idea what you mean. =(
bdg1983
04-09-2001, 06:36 AM
Have you checked to see if RH has anything on Bind, or the actual Bind website. Probably can find lots more using a web search. www.google.com/linux (http://www.google.com/linux)
If the package is rpm based, then query the rpm database for where all the files are installed including the documentation.
freebsd
04-09-2001, 10:29 AM
>> I have no idea what you mean
I was talking about your named.conf file. Check your named.conf, it has everything you were looking for.
wyseguy79
04-09-2001, 12:43 PM
what would be the url for Bind?
wyseguy79
04-09-2001, 05:53 PM
If anyone has like a default copy of the /etc/named.conf file that they could mail me or post on the Fourm, cauze ive seemed to narrow the problem down to that. It would be greatly appreciated.
stiles
04-09-2001, 08:20 PM
Originally posted by wyseguy79:
<STRONG>what would be the url for Bind?</STRONG>
http://www.isc.org/products/BIND/
wyseguy79
04-09-2001, 08:25 PM
If for some Jank reason I cannot get named running on my box, is their another software choice I could go with? :)
freebsd
04-09-2001, 09:31 PM
>> is their another software choice I could go with?
Yes -> http://cr.yp.to/djbdns/ but not recommended since BIND is relatively easy to configure and you were asking for something that can be easily found in named.conf.
If you read my 1st two replies you would have figured out the answer yourself.
wyseguy79
04-10-2001, 12:10 PM
Correct, i did go off your suggestions, that was actully the first thing I did. I even had a friend send me a copy of his named.conf file. And yet no results. I just copied over the direct file, and it tells me that it IS NOT loading its configuration file. pretty rude that it says it in Caps.
BigBlockMopar
04-14-2001, 04:07 PM
Wyseguy:
(Is your nick any relation to the terminals? Uhhh..)
Okay, you need a basic /etc/named.conf. Here goes. I've edited out stuff which might display too much info about me, I don't want to get my box rooted. :)
Now, this is a named.conf file that, with the exception of having had the domain name and IP address edited out, and had a few comments added in, is running DNS for a domain that I host out of my home and which gets several hundred hits per day.
Take a deep breath. Read a book. Read all the docs. This is not an easy subject to get your head around. But once you do, you'll be angry with yourself that it took so long to understand it.
(Trust me, I've been there.)
[******@proxy *****]$ cat /etc/named.conf
options {
directory "/var/named";
};
// "/var/named" is the directory where all
// the zone files are saved.
// Primary DNS: you create the zone records.
// Secondary DNS: BIND mirrors them from the
// primary nameserver.
zone "." {
type hint;
file "named.ca";
};
// this record refers to the file "named.ca"
// which resides in my /var/named directory.
// It contains a list of all the root name
// servers. 'zone "."' should be read as
// zone root. ie. It's God in DNS terms.
// Take a less at it and see what's in there
// sometime.
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
// This provides the translation of loopback
// (ie. 127.0.0.1) into the name "localhost".
// It's master DNS for the name "localhost",
// and it is described in the zone file
// /var/named/named.local.
// Yes, the zone name is backwards. Reason?
// You read it from right to left, like you
// do with an ordinary domain name.
// Example:
// www.mydomain.com: (http://www.mydomain.com:)
// .com is GOD. Over mydomain, over yahoo,
// over cnn, etc.
// mydomain.com is a subset of the .com top
// level domain.
// www.mydomain.com (http://www.mydomain.com) is a hostname or a
// subdomain to mydomain.com.
// When you point your browser at
// www.mydomain.com, (http://www.mydomain.com,) first it asks .com's
// servers for the location of mydomain.com.
// Once it's got a hold of mydomain.com's
// nameserver, it asks for the location (IP)
// of the host "www" in mydomain.com.
// Clear? Read it again and again until you
// are.
// Now, imagine the same order of operations
// with your IP address. *That* is why it's
// backwards.
zone "0.168.192.in-addr.arpa" {
type master;
file "named.192.168.0";
notify no;
};
// local LAN reverse resolution...
// notify no to make sure that named
// doesn't attempt to prime other
// nameservers with my private LAN... :)
// (They should ignore it as junk since it's
// a private IP range, but...)
zone "789.456.123.in-addr.arpa" {
type master;
file "named.123.456.789";
notify yes;
};
// Okay, these are fake IPs used for this
// example. Note that the IP address is only
// THREE of four octets long (ie 3 groups of
// numbers) and, like the 127.0.0.1 and
// local LAN records, the IP address in the
// zone name is backwards.
// This is reverse resolution, allowing
// other Internet hosts to figure out your
// domain named based on your IP address.
// This one would keep the zone record in
// /var/named/named.123.456.789.
// (The naming scheme doesn't matter as
// long as you can figure it out in a hurry
// six months from now when your DNS goes
// down for some weird reason and you need
// it back *right now*. [grin])
zone "mydomainname.com" {
type master;
file "named.mydomainname.com";
notify yes;
};
// Zone for "mydomainname.com" lives in the
// zone record at
// /var/named/named.mydominname.com.
//
// Leave the notify=no while you're playing
// around, that way, if you screw something
// up, it won't be sent to your
// secondary DNS (and probably screw it up).
// BUT, once you've got a handle on this
// complicated and confusing subject and are
// SURE that your server is set right,
// remember to change to "notify yes" on
// both reverse and forward zone records
// when the DNS goes live!
// Default with no notify argument is
// "notify yes".
wyseguy79
04-14-2001, 04:13 PM
wow, thanks for the descriptive help, im sure to try it. One question is, do you know what it means when the status of named is reporting Named IS NOT loading its configuration? And what should it say when its loading correctly
i simplyed typed in ./named status
and it gave me that.
BigBlockMopar
04-16-2001, 12:51 AM
Originally posted by wyseguy79:
<STRONG>wow, thanks for the descriptive help, im sure to try it. One question is, do you know what it means when the status of named is reporting Named IS NOT loading its configuration? And what should it say when its loading correctly
i simplyed typed in ./named status
and it gave me that.</STRONG>
Here's what I get for named status:
named 8.2.3-REL Sun Jan 21 09:22:14 EST 2001 BLAHBLAH@felix.CENSORED.com:
/usr/src/bs/BUILD/bind-8.2.3/src/bin/named
config (/etc/named.conf) last loaded at age: Sun Apr 1 22:43:01 2001
number of zones allocated: 64
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running
Note the last line, "server is up and running". With a different build on a different host, I also get "server is ready to respond to queries". Do you have something like that there? Were there any errors in /var/log/messages when named loaded?
I typed +named +"not loading configuration" into Yahoo and this came up through Google:
http://www.isc.org/ml-archives/bind-users/2000/11/msg00605.html
Take a look at the bottom of the page:
>P.S. Even though I am getting the "proper" >responses with nslookup, using
>"/etc/rc.d/init.d/named status" on the >command line yields several comments
>including "bind is not loading >configuration file." My next step is to try
>listing the caching only server as the only >DNS server on a Win95/98 client that uses a >static address.
>
>That's just a misleading status message. >Read it as "nameserver
>IS DONE loading its configuration". Makes >more sense that way.
Note also the last step the guy asking the question was going to do: if you set up another machine (ie. a Windows box on your LAN) to use your Linux box as a DNS server, then you can determine whether your DNS server is at least responding to queries - and therefore contacting top-level servers - properly. That's half the battle. Divide and conquer!
Keep at it. Take a deep breath. Relax. You can do it.