Sublime directory Surf the web anonymous Pagerank Monitor


DNS with bind

xkf
Fri 2 September 2005, 01:12 pm GMT +0300
I've just bought a dedicated server account(linux), which comes with BIND. I would like to create a subdomain in my site, but I don't know nothing about bind.

Can you please help me on this?

Nikolas
Fri 2 September 2005, 01:26 pm GMT +0300
Well here is what you have to do. Having root access on your server go to the directory where the domain records are stored

eg.

Code:
cd /var/named/domains

There must be a file with your domain name. eg. something.com

Edit this file with a text editor:

Code:
vi something.com

The file contents is like this:

Code:
$ORIGIN something.com.
@ 86400 IN SOA something.com. (
                          2005083100 ; serial
                          8H         ; refresh
                          2H         ; retry
                          1W         ; expire
                          1D         ; minimum
                          )
@                         1D IN NS     ns2.dnsprovider.com.
@                         1D IN NS     ns1.dnsprovider.com.
@                         1D IN MX 10  mail
mail                      1D IN A      62.38.134.112
www                       1D IN A      62.103.148.30
ftp                       1D IN CNAME  www
something.com.          1D IN A      62.103.148.30

To explain a little bit the ip (62.103.148.30) is the ip of your server. What you have to do is add a line to the end of the file with this:

Code:
subdomain            1D IN A      62.103.148.30

Then you have to replace the date in this line :

Code:
                          2005083100 ; serial

with the current date(year, month, day). eg
Code:
                          2005090200 ; serial

After that save the file and restart the service.

Code:
service named restart

Of course after that you should setup the virtual host to Apache (or whatever web server you are using)

xkf
Fri 2 September 2005, 01:34 pm GMT +0300
Hey Nikolas I really apreciate this!

Thank you very much

:)

Nikolas
Wed 28 December 2005, 01:48 am GMT +0200
I forgot to mention something.

When you make a new domain entry you should allways edit your named.conf file adding these lines :

Code:
zone "something.com" {
    type master;
    file "domains/something.com";
}

Also a small tip. If you are creating a DNS entry in your server and your pc don't 'see' the updates, you can flush the DNS cache using this command in the command prompt (windows)

Code:
ipconfig /flushdns


meth0d420
Wed 28 December 2005, 02:05 am GMT +0200
ipconfig/ flushdns, very nifty. thx nik

xkey
Wed 28 December 2005, 02:12 am GMT +0200
Hehe. I was rebooting my pc to do that.....

soulwatcher
Thu 16 February 2006, 01:24 pm GMT +0200
 Its probbaly not the answer your looking for but why not use a paid DNS service like www.dnsmadeeasy.com Visit through proxy. I have 5 name servers per domain. And they have 100% uptime. You get 25 domains for $59.95 per year. And you never have to worry about your dns ever going down.

Nikolas
Thu 16 February 2006, 01:27 pm GMT +0200
Its probbaly not the answer your looking for but why not use a paid DNS service like www.dnsmadeeasy.com Visit through proxy. I have 5 name servers per domain. And they have 100% uptime. You get 25 domains for $59.95 per year. And you never have to worry about your dns ever going down.

I don't think a service like that is really usefull.

I mean that as I have one server holding all the services (dns, mail, web, mysql) if the dns has some downtime, then the whole server is down, so it doesn't matter.

I suppose that kind of service is usefull only for decreasing the server load, but anyway the DNS(at least BIND) is not produces much overhead on the server.

soulwatcher
Thu 16 February 2006, 01:37 pm GMT +0200

I don't think a service like that is really usefull.

I mean that as I have one server holding all the services (dns, mail, web, mysql) if the dns has some downtime, then the whole server is down, so it doesn't matter.

I suppose that kind of service is usefull only for decreasing the server load, but anyway the DNS(at least BIND) is not produces much overhead on the server.

 Ya your right if the DNS goes down the server is probbaly down. But if I had a back up server I could auto direct the traffic to that server untill my server was up.

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional