-
January 30th, 2003, 03:57 AM
#1
DNS server configuration help! (BIND)
Hiii,
I have been trying to learn more about DNS servers. Soo i have read a bit and want to try to set one up on my LAN but it is a little tricky wandering if anyone can help? This is what im tyring to do: I have a LAN that has 1 Redhat machine(Firewall/Router-DNS Server) and 2 windows machines behind it.
I want to set up the DNS server on the LINUX machine. Cause right now the WINDOWS machines are configured soo that there DNS servers are pointing to my ISP DNS server. I want the LINUX machine to do the DNS queries or FORWARD them to my ISP DNS Server.
Im using:
Redhat 7.3(2.4.20)
BIND-9.2.2rc1
Installed it by:
./configure
make
make install
I have been using the "Redhat 7.3 Bible" as a reference.
< EDIT > OK this is what i got soo far now:
I created the file /etc/named.conf which has this in it:
options {
directory "/var/named";
forwarders { <IP address of forwarder>; };
forward only;
};
And running named-checkconf shows no errors.
I also created a directory /var/named but am confused on the next steps! Any Help?
-
January 30th, 2003, 12:53 PM
#2
I'm on my way to work, so I can't post a step-by-step at this moment. In the meantime, try www.justlinux.com and search for "BIND setup" or something similar. I know I've read some detailed instructions there. If that doesn't do it for you, I'll try to walk you through it after I get home tonight.
-
January 30th, 2003, 01:06 PM
#3
Junior Member
-
January 30th, 2003, 04:31 PM
#4
Where exactly are you having trouble?
This should actually be fairly simple. The named.conf file which comes with the RPM(or with the tar file I suspect you downloaded) should be set up exactly as it needs to be in order to perform as a caching name server. I have never set bind up as a forwarding name server, so I can't comment about that.
If you need a named.conf for a caching name server, here is one. This comes from bind 8.1 installed via RPM on a redhat 8.0 machine I have access to.
*****************************************************************
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
include "/etc/rndc.key";
*************************************************************************
Then of course you need to make sure that your firewall is allowing it to make the queries.
Assuming that the install scripts placed the proper startup scripts in the correct places, turn bind on in your default run level by
chkconfig named on
Then start the service
service named start
That should be all you need.
Of course, make sure your firewall is allowing your internal machines to use bind for resolution.
Good luck,
IchNiSan
-
January 30th, 2003, 10:12 PM
#5
I installed the "bind-9.2.2rc1.tar" and it didnt install the file /etc/maned.conf in its directory and didnt create the directory /var/named and i read on the mailing list you have to create those yourself.(maybe i should have installed the RPM) but im going to copy and paste this in the /etc/named.conf file and try that.... am i suppose to have anything in the /var/named directory?
-
January 30th, 2003, 10:15 PM
#6
Yes, there should be several files in the /var/named directory.
I don't have time at the moment, on my way from work to a class in a moment, but there should at least be the files referenced by the named.conf file.
-
January 31st, 2003, 02:47 PM
#7
OK, there should be three files in /var/named, at least.
localhost.zone
named.ca
named.local
localhost.zone should look like this by default...
********************************************************
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
1D IN A 127.0.0.1
********************************************************
The named.ca file is a root hints file, which tells bind where to start when resolving names, you can get the current one here...
ftp://rs.internic.net/domain/named.root
The last file is named.local, and looks like this.
********************************************************
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
*******************************************************
Also, I don't know what you have been reading, but if you are really interested in learning about this, your should pick up the Orielly book DNS and BIND 4th edition, which covers bind 9(I dont have it yet,, but Im thinking about replacing earlier version with it.) It is a bit dry, and may take a while to get through it all, but it is a very very good reference.
Check it out here...
http://www.oreilly.com/catalog/dns4/
Good luck,
IchNiSan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|