Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there a tool that will take the information from a DNS lookup like dig google.com and turn it into a bind configuration file? (In this case google.com is an example, i would be using a domain that I own, but i don't have access to the bind config file.)

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Normally you'd want to have the domain's owner allow you to perform an AXFR to fetch the whole zone. However, you can get a start to a functioning zone:

dig +multiline google.com any > google.com.zone

The above will load but probably not be of much use. Anyway, point is the output of dig is conveniently formatted for BIND.

If you can get whomever is operating your DNS to allow transfers (the allow-transfer statement for BIND) you can do.

dig +multiline google.com axfr > google.com.zone

This will be a complete copy of the zone file. If you want to go a step further, you can ask them to send you notifies whenever the serial number of the zone is incremented. Then you can set up your own slave nameserver:

zone "google.com" {
    type slave;
    file "google.com.zone";
    masters {
        11.22.33.44;
    }
};

That'll get a copy of the zone file whenever it is updated on the master.

share|improve this answer

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.