Link to home
Start Free TrialLog in
Avatar of sidd101
sidd101

asked on

Creating DNS server using ISC BIND in ubuntu linux

Hi,

I am new to ubuntu and have a basic knowledge of networking. I applied to an entry level job and they have given me the below technical assignment as a part of the hiring process:

Create a DNS server using ISC BIND

Your job is to get BIND running as a caching and forwarding DNS server. You have the following specific constraints:


•         It must forward to servers at OpenDNS and/ or  Google
•         You must show evidence of it resolving a public FQDN (output from DIG is preferred)
•         You must provide the content of any configuration files you had to edit or create
•         EXTRA CREDIT – host a zone (provide evidence of resolving a record in the zone)

You have completed the assignment if I have copies of DIG output and configuration files before interview.



I am using ubuntu 11.10. I installed Bind 9 successfully and tried editing the configuration files using a step by step process listed on a forum. However i am having problems. Below are my questions:

1. In named.conf.local file, what should i put for zone? I don't have a domain name. Should i register a domain name first and then use it?

2. In named.conf.options file, in the forwarders section, i should put the address of DNS server address for openDNS. Right?

3. In zone definition file, what should i put for DNS Server name and mail server name.

4. What should i put in the resolv.conf file?

5. Finally if bind works successfully, how to verify it using dig? Does dig mention that it is using BIND as the DNS service?

6. finally how to host a zone and provide evidence of resolving a record in the zone?


I will appreciate any help or suggestion or even a different way of doing this.

Thanks,

Sid
SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sidd101
sidd101

ASKER

Thanks farzanj and papertrip.

taking help from the first forum i am able to run bind and forward to openDNS. I also tried to host a zone, i registered a domain name $$$$.us. The Ubuntu forum which farzanj suggested says to modify the file resolv.conf with the following settings:

// replace example.com with your domain name, and 192.168.0.1 with the address of your new DNS server.
search example.com
nameserver 192.168.0.1


When i dig google.com after doing this, it gives the following error:

sid@ubuntu:~$ dig google.com

; <<>> DiG 9.7.3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 61705
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;google.com.                  IN      A

;; Query time: 73 msec
;; SERVER: 208.109.255.21#53(208.109.255.21)
;; WHEN: Tue Oct 25 21:28:50 2011
;; MSG SIZE  rcvd: 28




However when i use 127.0.0.1 in the resolv.conf file and then dig google.com, its a success

sid@ubuntu:~$ dig google.com

; <<>> DiG 9.7.3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28347
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 13, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.                  IN      A

;; ANSWER SECTION:
google.com.            93      IN      A      74.125.159.106
google.com.            93      IN      A      74.125.159.147
google.com.            93      IN      A      74.125.159.99
google.com.            93      IN      A      74.125.159.103
google.com.            93      IN      A      74.125.159.104
google.com.            93      IN      A      74.125.159.105

;; AUTHORITY SECTION:
.                  510738      IN      NS      k.root-servers.net.
.                  510738      IN      NS      i.root-servers.net.
.                  510738      IN      NS      h.root-servers.net.
.                  510738      IN      NS      m.root-servers.net.
.                  510738      IN      NS      a.root-servers.net.
.                  510738      IN      NS      e.root-servers.net.
.                  510738      IN      NS      j.root-servers.net.
.                  510738      IN      NS      c.root-servers.net.
.                  510738      IN      NS      g.root-servers.net.
.                  510738      IN      NS      d.root-servers.net.
.                  510738      IN      NS      b.root-servers.net.
.                  510738      IN      NS      l.root-servers.net.
.                  510738      IN      NS      f.root-servers.net.

;; Query time: 28 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Oct 25 21:31:45 2011
;; MSG SIZE  rcvd: 335


Any ideas why is this happening. How can provide proof of hosting a zone and resolving a record in it?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sidd101

ASKER

The suggestions were good, but were a bit confusing to follow partially from my own lack of knowledge of the subject.