Link to home
Start Free TrialLog in
Avatar of Mccalma1
Mccalma1

asked on

Need help with setting up DNS on a client machine

Hi,

I setup a server and performed forward and revers lookups (via dig and nslookup) on the server (main) and on localhost. The server side looks good to me, but I'm not an expert at setting up servers. Would you please look at the attached file (Server_DNS_nslookup_and_dig_results.txt) and let me know if it looks good to you? If there are issues, then would you please help me fix them?

Also, I have no idea how to get the client to do DNS lookups. I can ping the server's hostname, but that is because it's in the hosts file. I get all bad results when I type nslookup or dig  an the client computer (see the results below).

Any assistance would be greatly appreciated!

Thanks,
Mark

root@ubuntu:/net# nslookup
> set debug
> main
Server:            137.244.226.231
Address:      137.244.226.231#53

------------
    QUESTIONS:
      main.simnet.net, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
** server can't find main.simnet.net: REFUSED
;; Got SERVFAIL reply from 137.244.226.231, trying next server
Server:            127.0.0.1
Address:      127.0.0.1#53

------------
    QUESTIONS:
      main, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ->  .
      origin = a.root-servers.net
      mail addr = nstld.verisign-grs.com
      serial = 2013051700
      refresh = 1800
      retry = 900
      expire = 604800
      minimum = 86400
      ttl = 1323
    ADDITIONAL RECORDS:
------------
** server can't find main: NXDOMAIN
> main.simnet.net
Server:            137.244.226.231
Address:      137.244.226.231#53

------------
    QUESTIONS:
      main.simnet.net, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
** server can't find main.simnet.net: REFUSED
Server:            137.244.226.231
Address:      137.244.226.231#53

------------
    QUESTIONS:
      main.simnet.net.simnet.net, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
** server can't find main.simnet.net.simnet.net: REFUSED
> 137.244.226.231
Server:            137.244.226.231
Address:      137.244.226.231#53

------------
    QUESTIONS:
      231.226.244.137.in-addr.arpa, type = PTR, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
** server can't find 231.226.244.137.in-addr.arpa: REFUSED
Server:            137.244.226.231
Address:      137.244.226.231#53

------------
    QUESTIONS:
      231.226.244.137.in-addr.arpa, type = PTR, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
** server can't find 231.226.244.137.in-addr.arpa: REFUSED

root@ubuntu:/net# dig -q main.simnet.net

; <<>> DiG 9.8.1-P1 <<>> -q main.simnet.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 58793
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;main.simnet.net.            IN      A

;; Query time: 0 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 10:20:50 2013
;; MSG SIZE  rcvd: 33

root@ubuntu:/net# dig -x 137.244.226.231

; <<>> DiG 9.8.1-P1 <<>> -x 137.244.226.231
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 9066
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;231.226.244.137.in-addr.arpa.      IN      PTR

;; Query time: 1 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 10:21:00 2013
;; MSG SIZE  rcvd: 46
Server-DNS-nslookup-and-dig-resu.txt
ASKER CERTIFIED SOLUTION
Avatar of Steven Vona
Steven Vona
Flag of United States of America 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
Avatar of Mccalma1
Mccalma1

ASKER

Here is what is in my /etc/resolv.conf file:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 137.244.226.231
nameserver 127.0.0.1
search simnet.net

This was a pain to figure out how to edit. It must be an Ubuntu thing, but I had to add the following to the following file to get the name server in there:

more /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 137.244.226.231

The head file updated the resolv.conf file. Very strange!

Anyway, your question forced me to try and remember how I setup the server and to take a second look at my work. I basically utilized google to figure out how to setup the DNS. I figured it was good once DNS could resolve hostnames and IPs on the server. Anyway, I looked at my files and found issues with my named.conf file. I commented out the options section during setup, but never finished setting up the file. It appears that DNS is now working on the client.

Would you please look at the results and verify that it looks ok? If not, then what files would you like to see to get to the bottom of my issues?

On the client computer:

root@ubuntu:/etc# nslookup
> main.simnet.net
Server:            137.244.226.231
Address:      137.244.226.231#53

Name:      main.simnet.net
Address: 137.244.226.231
> main
Server:            137.244.226.231
Address:      137.244.226.231#53

Name:      main.simnet.net
Address: 137.244.226.231
> 137.244.226.231
Server:            137.244.226.231
Address:      137.244.226.231#53

231.226.244.137.in-addr.arpa      name = main.simnet.net.
> fallback
Server:            137.244.226.231
Address:      137.244.226.231#53

Name:      fallback.simnet.net
Address: 137.244.226.232
> 137.244.226.232
Server:            137.244.226.231
Address:      137.244.226.231#53

232.226.244.137.in-addr.arpa      name = fallback.simnet.net.
> exit

root@ubuntu:/etc# dig -x 137.244.226.231

; <<>> DiG 9.8.1-P1 <<>> -x 137.244.226.231
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40348
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;231.226.244.137.in-addr.arpa.      IN      PTR

;; ANSWER SECTION:
231.226.244.137.in-addr.arpa. 604800 IN      PTR      main.simnet.net.

;; AUTHORITY SECTION:
226.244.137.in-addr.arpa. 604800 IN      NS      main.simnet.net.

;; ADDITIONAL SECTION:
main.simnet.net.      38400      IN      A      137.244.226.231

;; Query time: 1 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 14:10:21 2013
;; MSG SIZE  rcvd: 105

root@ubuntu:/etc# dig -q main.simnet.net

; <<>> DiG 9.8.1-P1 <<>> -q main.simnet.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14563
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;main.simnet.net.            IN      A

;; ANSWER SECTION:
main.simnet.net.      38400      IN      A      137.244.226.231

;; AUTHORITY SECTION:
simnet.net.            38400      IN      NS      main.simnet.net.

;; Query time: 2 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 14:10:32 2013
;; MSG SIZE  rcvd: 63

root@ubuntu:/etc# dig -q main

; <<>> DiG 9.8.1-P1 <<>> -q main
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 61737
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;main.                        IN      A

;; Query time: 3 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 14:10:38 2013
;; MSG SIZE  rcvd: 22
Well you are getting answers, that is good.

Without being able to know if the information is correct, you are now getting answers.  

If you are happy with the answers then I am happy.
Thanks for your help, I really appreciate it!