Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DNS for Linux 3

Status
Not open for further replies.

DonSJ67

Technical User
Jun 1, 2001
11
US
Hi, does anyone know how to set up a Linux DNS server for Windows Clients in a private network? Is it possible? If so how do I do it and what versions of Windows will it work for.
 
You need to install BIND, which is the DNS server software for Linux. It will work with all versions of Windows. The newest versions of BIND even support dynamic DNS updates for Win2K and XP clients. You can download BIND here --> BIND 9.2.1 is the newest version.

ChrisP

If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
Once I install Bind how to I set it up to work on a private network? It seems that most thing I read about it use A registered Domain Name. Do I have to edit any files to make this work?
 
If its on a private network, you don't need a registered domain. You can make up any name you want.

Here are some notes I have written on BIND for Linux. I copied and pasted from the document I wrote a few months ago. It doesn't have all the formatting that I originally made it with (bold, underline, bullets, etc.), but it is still good. The placement of each line (indents and stuff) and everything didn't copy over exactly how I had it either.





DNS (Domain Name Service)
- on all Linux systems, DNS is implemented with the BIND (Berkeley Internet Name Domain) software
- BIND DNS is a client/server system where the client is called the resolver
- the name server daemon is called named – named only runs on name servers

Configuring the Resolver - /etc/resolv.conf
-the resolver is configured by the /etc/resolv.conf file
-Linux reads this file each time it needs to resolve an address, so any changes you make to the file take effect immediately
-nameserver ‘address’ - defines the IP address of the name server to use
-up to 3 nameserver commands can be included in the configuration
-if no nameserver entry is found in /etc/resolv.conf, the name server running on the local host is used as the default
-domain ‘domainname’ – defines the local domain, which is used to expand the host name in a query before it is sent to the name server. If the domain command is not used, the values defined in the search command are used.
-search ‘searchlist’ – defines a list of domains that are used to expand a host name before it is sent to the name server
-searchlist contains up to 6 domain names separated by spaces. This is used so that clients can resolve host names that aren’t FQDN’s.

DNS Server
-to check that its installed, run which named – it should tell you that its in /etc/sbin/named. You can also try rpm –q bind, it its installed as an RPM
-to start/stop the service, run service named restart
- you can also stop/start the script from /etc/rc.d/init.d/named restart
-to check for DNS errors, cat /var/log/messages | grep named

/etc/named.conf
-defines basic parameters and points to the sources of domain database info
-there are 7 valid configuration statements for the BIND named.conf file – acl, include, key, logging, options, server, and zone

options statement
-most named.conf files open with an options statement that defines global parameters for BIND and sets the defaults used by other statements in the configuration file
-only one options statement is allowed
-usually the options statement looks like this

options {
directory “/var/named”;
};

-the directory “/var/named”; defines the working directory for the server

zone statement
-defines a zone that is serviced by this name server
-defines the type of name server that this server is for the zone (master or slave)
-example
zone “yourdomain.com” in {
type master;
file "yourdomain.com.zone”;
check-names fail;

-the type command can be either master, slave, or hints. Hints means that this is the hints file that is used to initialize the name server during startup. Every server has one hints zone.
-the file “yourdomain.com.zone”; option points to the file that contains the domain database information. For a master server, this is the file that is created by the domain administrator
-check-names has to do with hosts having underscores in their name – the options for this are fail, ignore, and warn
-if you wanted to set up a slave server, instead of a master, it would like look…

zone “yourdomain.com” {
type slave;
file “yourdomian.com.zone”;
masters { 192.168.1.5; };
};

-the “yourdomain.com.zone” is the file that the server will write/read info from
-the masters line identifies the master server from where your local named should download the zone information


/var/named/named.local
-this is the reverse lookup zone for 127.0.0.1
-this file does not need to be edited


/var/named/'domain.com'.zone
-forward lookup zone file for the 'domain.com' domain
-this is the actual zone file for your domain
-it contains all of the resource records such as SOA, MX, A, CNAME, and NS

The Zone files

SOA Record – e.g.
@ IN SOA wren.foobirds.org chris.wren.foobirds.org. (
200031301 ; serial
21600 ; refresh
1800 ; retry
4w ; expire
1h ; negative cache TTL

-the numbers above control the zone transfers between your master and slave servers
-the @ symbol in the beginning of the file represents the domain name this file is for
-comments are marked with a ;
-wren.foobirds.com – this is the host name of the master server for this zone
-chris.wren.foobirds.org – this is the email address of the personal responsible for the domain. The @ symbol is replaced with a . after chris

MX Records – e.g.
IN MX 10 wren.foobirds.org
IN MX 20 parrot.foobirds.org

-the first MX record says that wren is the mail server for the foobirds.org domain
-the lower the preference number, the more preferred the server – mail is only sent to parrot if wren is unavailable
-if mail is sent directly to user@parrot.foobirds.org, then it will be delivered to parrot regardless of the preference number


/var/named/192.rev.zone
-this file is used as the reverse lookup zone for the subnet
-it looks like the forward lookup zone, except with only NS and PTR RR's

/var/named/named.ca
-this is the root hints file
-the hints file contains the names and addresses of the root name servers on the Internet around the world
-commonly used names are named.ca, named.root, root.hints, and root.cache
-you do not need to create or edit this file
-if needed, you can download this file from InterNic's FTP server
-you do not need this file if your DNS is only going to resolve for a local intranet


/etc/resolv.conf
-this file tells you what DNS servers to use
-you want to specify yourself as the DNS server to use, like this...
search yourdomain.com
nameserver 127.0.0.1




ChrisP



If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
So if I edit these files in Linux I should be able to log into the domain from my Windows Client? By using my domain name specified in:?

zone “yourdomain.com” in {
type master;
file "yourdomain.com.zone”;
check-names fail;
 
If its a Win2K domain, you need an Active Directory-integrated zone on a Windows domain controller first. You can always make a Linux box a secondary name server to the Window AD-integrated zone. If you do this, take a look at the /var/named/'domain.com'.zone file afterwards. You will see why you can't realistically have only Linux DNS servers in a Win2K domain.

ChrisP If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
Thank you for your help. That must be why I have not been able to get it to work. Ive been trying to make it a Domain controller for a Windows XP/2000 Domain with out using another domain controller.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top