topics that matter; ideas worth sharing

share a tip, submit a link, add something new

Wrapping Up DJBDNS

August 13, 2002, 12:00 AM —  ITworld — 

At the beginning of this trip down DJBDNS lane, I tagged a challenge at
the end of the message. Unlike my previous [1] challenge, this one had
almost no response, probably because it was lost in obscurity at the
bottom of the email. I'm re-issuing it again this week, and you'll find
it at the end of this article.

Welcome to the home stretch, my last [2] ITworld article on installing
DJBDNS. I'll cover two things here. First, I'll show you how to 'import'
your existing BIND zones into tinydns data format so you don't need to
convert those files by hand. Lastly, I'll show you how to start up the
axfrdns server, which will allow DNS secondaries running BIND to mirror
your DNS zones.

Import Your Existing BIND Zones
First, both of these require another piece of DJB software, ucspi-tcp
(Unix Client Server Program Interface). Run the following to install it:

$ mkdir /tmp/src
$ cd /tmp/src
$ wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
$ tar xzvf ucspi-tcp-0.88.tar.gz
$ cd ucspi-tcp-0.88
$ make
# make setup check

This installs a bunch of different TCP client and server programs in
/usr/local/bin, though we'll only be using two of them: tcpserver and
tcpclient.

So, let's see how we can snag our existing BIND zone files. I'll assume
we want to get the 'example.dom' domain. First, make sure that BIND
allows you to perform DNS transfers for our IP address. Assuming you are
doing this on the same machine, localhost should be allowed in
/etc/named.conf:

allow-transfer { 127.0.0.1; };

If you don't have an allow-transfer directive, then create one like the
one above. Test to verify that you can do a transfer using 'host':

$ host -l example.dom
example.dom SOA example.dom. hostmaster.example.dom 10 3600 180
25920 8640
example.dom name server ns1.example.dom
example.dom name server ns2.example.dom
www.example.dom has address 192.168.1.1
...

If you don't get a listing, then check your logs and make sure that
localhost is allowed to perform a transfer. If all's well, then do the
following:

# cd /etc/tinydns/root
# tcpclient -v 127.0.0.1 53 axfr-get example.dom example.dom.zone
tmpfile

This connects to the local BIND server, snags a copy of the zone, and
saves in the proper format as example.dom.zone in the local directory.
You can do this for all the domains that you support, it's that easy.
Once you've got all the zones saved, you can edit them if you want to
make them more tinydns-ish, for example deleting the TTLs, converting Z
and & lines to .domain lines instead, etc.... However, even if you leave
them as is, they'll work exactly as before. All that's left to do is
merge these files into the data file:

# cat *.zone > data
# make
/usr/local/bin/tinydns-data

That's it. You've just taken all your BIND data and turned it into
tinydns data format. Kill off BIND, tell tinydns

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources