Discussion Locked

setup DNS in linux

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I first time in linux. I want to know how to setup the DNS server for me to host my website. Can anyone tell me how to setup DNS server in linux

thanks

12 replies

by mtuppen

I have never setup a DNS server myself, but there is a DNS-howto. You can get howto's from: www.linuxdoc.org (and many other places, of course).
I know that bind is used for DNS. Looking at what's in it may help (ie. if you use rpm, do an rpm -qil bind|more).

Regards,
Mike.

by cpfeiffe

You have a somewhat tough task ahead of you for a first time. First, you must get bind. You can ftp to ftp.isc.org and log in as anonymous to download the most recent version. It should have ports for your version of Linux and you will need to follow any new directions in the readme files for the Linux port that fits your OS, but the typical is (1) configure (2) make stdlinks (3) make depend (4) make all (5) make install. If you've never installed binaries before this will be foreign so I suggest you read the install instructions very closely. If you make a mistake it won't hurt your OS and if you want to start over you can just do `make clean` in the root of the directory that you are installing. Make sure you are installing in a new subfolder. Once you have bind you can setup your DNS. You will have to set up zone files for every zone you are going to be the owner of. This is relatively easy, but requires a lot of syntax to be correct. You should pick up DNS and Bind by O'Reily, unless you've done this before on another OS and are familiar with it. If you've done it on NT that doesn't really apply because you probably used the DNS manager GUI, so you won't know how to build a file on the command line and will need the book.

Good luck.

If you get specific questions along the way you can email my alias.

by stillatit

The O'Reily book on DNS is your best source of information on DNS, but here is a simplified answer:

1. You need to have loaded DNS when you installed linux, or you have to add it from the distribution disk (or download).

2. The 'linuxconf' program has a DNS section. There are some (poor) man pages which cover the dns section. In short, you need to create a primary DNS server, filling in the blanks for your domain name, person in charge, etc. Accept the defaults where they are offered. After you have defined the primary server information, you add hosts to the domain (name and IP pairs).

3. If you want your DNS to be used by the world, you will need to know where your domain registration specifies your DNS to be. If this is your box, you are in good shape. If it is your ISP, you can take two routes. If you want to be the only DNS server (and you have set up two machines), you can change your domain registration to point to your machines. The other route is to have your ISP bethe secondary DNS, and take a block upload from your machine.

4. You will also have to open your firewall to allow DNS access to your server.

Good luck.

by zbrain75

The CTDP Linux User's Guide at:
http://ctdp.tripod.com/os/linux/usresguide/index.html
explains the setup of a DNS server (item 44). This guide is for Redhat Linux 6.1/6.2 but I think the files are still in the same location for 7.X. The guide explains how to set the files up, one at a time. If you use it with the DNS how-to, you should be able to get it up and running fairly easily. If you have too much trouble, send an e-mail.

by admin

First, while you are learning, the easiest way to set up dns is to go to www.zoneedit.com and use the free service.
This has a graphical interface and is very easy.

Also, http://soa.granitecanyon.com/ is the public DNS, and although harder to set up, still much easier to learn to write DNS entries there than set up a whole server.

Having said this, if you want to run your own DNS server, you will need to get BIND (which is a seperate program that can run in Linux) and install it.
You can get BIND here: http://www.isc.org/products/BIND/bind9.html

And find the info to use it here (there's a lot): http://www.isc.org/ml-archives/bind-users/

Or better yet, here's a book on it:
http://www1.fatbrain.com/asp/BookInfo/BookInfo.asp?theisbn=1565925122&from=xjb375

Sorry I cannot explain all of it in the space here. But getting O'Reilly's book will get you where you need if you want to run your own DNS and if not, just use the free DNS services. Zoneedit has a very good explaination of how it works. :)

This discussion is closed to new replies.