Hi
I have posted my dns configuration in ubuntu 10.04 lucid
I tried out using these link
https://help.ubuntu.com/8.04/serverg...iguration.html
Function to install required package
#apt-get install bind9*
Function to adding ipaddress in Dns server
#vi /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See
http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
forwarders {
10.200.2.42;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
Function to modify forward zone entry file
vi /etc/bind/named.conf.local
zone "example.com" {
type master;
file "/etc/bind/db.example.com";
};
Function to create a new zone file
sudo cp /etc/bind/db.local /etc/bind/db.example.com
Function to create a forward zone file
vi /etc/bind/db.example.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA sample.example.com. root.example.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS sample.example.com.
@ IN A 127.0.0.1
@ IN AAAA ::1
sample IN A 10.200.2.42
Function to create a Reverse zone file
vi /etc/bind/named.conf.local
zone "2.200.10.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.10";
};
sudo cp /etc/bind/db.127 /etc/bind/db.10
Function to Create Reverse zone file
vi /etc/bind/db.10
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA sample.example.com. root.example.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS sample.
42 IN PTR sample.example.com.
Function to edit hosts configuration file
#vi /etc/hosts
127.0.0.1 sample localhost.localdomain localhost
127.0.1.1 sample
10.200.2.42 example.com
10.200.2.42 sample.example.com sample
Function to edit resolved
#vi /etc/resolv.conf
search example.com
nameserver 10.200.2.42
nameserver xx.xx.xx.xx
Testing Dnsserver
root@sample:~# dig 10.200.2.42 mx
; <<>> DiG 9.7.0-P1 <<>> 10.200.2.42 mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61212
;; flags: qr aa; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;10.200.2.42. IN MX
;; AUTHORITY SECTION:
. 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2012050900 1800 900 604800 86400
;; Query time: 116 msec
;; SERVER: 10.200.0.6#53(10.200.0.6)
;; WHEN: Wed May 9 19:32:48 2012
;; MSG SIZE rcvd: 104
root@sample:~# dig sample.example.com mx
; <<>> DiG 9.7.0-P1 <<>> sample.example.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24012
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;sample.example.com. IN MX
;; AUTHORITY SECTION:
example.com. 86367 IN SOA ns.domainnetwork.se. hostmaster.melbourneitcbs.com. 2011092801 21600 3600 2419200 867
;; Query time: 1 msec
;; SERVER: 10.200.0.6#53(10.200.0.6)
;; WHEN: Wed May 9 19:33:00 2012
;; MSG SIZE rcvd: 113