nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Ubuntu Linux setup and configure a domain name server - BIND

This is a discussion on Ubuntu Linux setup and configure a domain name server - BIND within the Getting started tutorials forums, part of the Linux Getting Started category; Goal setup name server for domain called foo.com. Step # 1: Install BIND First you need to install BIND server. ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 07-20-2006, 08:41 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power: 4
tom is on a distinguished road
Default Ubuntu Linux setup and configure a domain name server - BIND

Goal setup name server for domain called foo.com.

Step # 1: Install BIND
First you need to install BIND server.
Code:
$ sudo apt-get install bind9
Step # 2: Define foo.com domain:
You need to add foo.com domain to bind configuration file /etc/bind/named.conf.local

Open this file and append following text (zone and reverse zone for foo.com):
Code:
$ sudo vi /etc/bind/named.conf.local
Add foo.com zone:
Code:
zone "foo.com" {
        type master;
        file "/etc/bind/zones/foo.com.zone";
        };

zone "1.55.202.in-addr.arpa" {
     type master;
     file "/etc/bind/zones/rev.1.55.202.in-addr.arpa";
};
Save the file.

Step # 3: Create a /etc/bind/zones/ directory:
Code:
$ sudo mkdir /etc/bind/zones
Step # 4: Create a zone file for foo.com domain:
Now create a zone file /etc/bind/zones/foo.com.zone
Code:
$ sudo vi /etc/bind/zones/foo.com.zone
Append following text:
Code:
foo.com. IN      SOA     ns1.foo.com. admin.foo.com. (
          2006071801 
          28800       
          3600        
          604800    
          38400 )    
foo.com. IN      NS      ns1.foo.com.
foo.com. IN      MX     10 mta.foo.com.

www           IN      A       202.55.1.2
mta              IN      A       202.55.1.2
ns1               IN       A        202.55.1.2
Create the reverse zone file:
Code:
$ sudo vi /etc/bind/zones/rev.1.55.202.in-addr.arpa
Append following text
Code:
@ IN SOA ns1.foo.com. admin.foo.com. (
                        2006071801; serial
                        28800; refresh, seconds
                        604800; retry, seconds
                        604800; expire, seconds
                        86400 ); minimum, seconds

                     IN  NS ns1.foot.com.

2                  IN      PTR    foo.com
Save the file and restart the BIND server:
Code:
$ sudo /etc/init.d/bind9 restart
Test it:
Code:
$ nslookup foo.com
Server: 202.55.1.2
Address: 202.55.1.2#53

Name: foo.com
Address: 202.55.1.2

Enjoy! Further reading:
Linux BIND - DNS HOWTO: http://www.tldp.org/HOWTO/DNS-HOWTO.html
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-10-2006, 06:20 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,060
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Hee this is a quick and dirty introduction
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Setting Samba to Bind to an ADS Domain kevv.mai Getting started tutorials 0 04-20-2008 02:47 AM
Configure install pureftp server ubuntu linux jerry Linux software 2 06-12-2007 09:55 AM
Ubuntu Linux firefox flash setup how to chiku Linux software 1 09-18-2006 10:07 PM
install and configure vmware server on Ubuntu Linux server raj Linux software 1 07-18-2006 12:21 AM
Ubuntu Linux: How do I setup print quotas? cityblogger Linux software 1 07-06-2006 06:11 PM


All times are GMT +5.5. The time now is 03:42 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36