Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to do some changes to the BIND source code. In order to test those changes I want to be able to post queries to my local BIND server and for it to use only the local zone files.
I know how to make the zone files and somewhat the named.conf file but what should i put in /etc/resolv.conf?

In resolv.conf currently there is the line
nameserver 192.168.0.1
witch i guess is my router IP address and the queries go through the router to my ISP.

I want those queries to go to the local BIND server and to look for answers in the zone files i provided.

Is there a way for this using resolf.conf file or should i do something else?

share|improve this question

migrated from stackoverflow.com Feb 16 '11 at 13:57

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 0 down vote accepted

Also make sure your test BIND is set to listen on 127.0.0.1 (and only 127.0.0.1) by changing the appropriate option in /etc/bind/named.conf.options (if you are using Debian Linux, as an example).

You can also use the nslookup command to query a specific nameserver, as in nslookup example.invalid 127.0.0.1

To make it use only local zone files you want to make sure that /etc/bind/named.conf.options has no forwarders stanzas and that none of your zone files reference an external DNS server.

share|improve this answer
add comment

You could use:

nameserver 127.0.0.1

in /etc/resolv.conf.

However, a better idea is to use dig to test your configuration as it will not break your existing setup.

For instance if you use the command

dig @127.0.0.1 www.google.com

It will query the nameserver at 127.0.0.1 for the address of www.google.com.

share|improve this answer
    
Thanks Phil, i did try this before,but with no success. I guess I am doing something else wrong. Never the less this is helpfull a lot. –  Anonymous Feb 16 '11 at 13:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.