ZoneMan
Description
ZoneMan is a command line interface for controllng PowerDNS SQL based back ends.
Requirements
- Ruby
- Ruby Gems
- ActiveRecord >= 2.0
Usage
$ ./zoneman help
Help:
show [domainname]
delete_record domainname recordname
delete domainname [domainname] ...
stats
add_domain domainname
add_record domainname name type content [ttl] [priority]
edit_record currentname currenttype name type content ttl priority
Installation
Grab the latest version from RubyForge
and stick it in your path. Open the file in your favorite text editor and point the database
info to your PowerDNS database. Make sure you have met all of the requirements above. Once
you've changed the database info to point to your instance you can by issuing the following
command:
$ ./zoneman show
If the above command doesn't list all zones and records in the database then something
isn't working quite right. Take a look at any error messages and correct them.
Examples
Add domain
$ ./zoneman add_domain example.com
example.com has been created.
Add SOA record
$ ./zoneman add_record example.com example.com SOA "localhost webmaster@example.com 1" 86400
example.com has been created
Add A record
$ ./zoneman add_record example.com example.com A 10.1.1.1
example.com has been created
Add NS record
$ ./zoneman add_record example.com example.com NS ns.example.com
example.com has been created
Add CNAME record
$ ./zoneman add_record example.com www.example.com CNAME example.com
www.example.com has been created
Delete domain
$ ./zoneman delete example.com
example.com has been deleted
Current Features
- Add domains
- Add domain records (A, MX, CNAME, etc...)
- Edit records
- Delete records
- Delete domains (including all domain records)
- List all domains and associated records
- List an individual domain and records associated with that domain
Planned Features
- Search and replace functionality
- ex: ./zoneman replace 10.1.1.1 192.168.1.1
- Automatically append the domain name if it's left off
- ex: ./zoneman add_record example.com www1 CNAME example.com
instead of
./zoneman add_record example.com www1.example.com CNAME example.com - Create an interactive mode
- Create better reporting with fancier formatting
- Export to CSV
- Prompt for database password (will be optional)
Probable Features
- Convert to gem for easier install and handling of dependencies
Blog
Check out the ZoneMan blog for regular announcements on what's going on.