☀️ 🌙

DNSNet

Enterprise DNS, DHCP, Cloud & IPAM Management Toolkit

by DNSScience.io

Why DNSNet?

Managing DNS and DHCP across multiple platforms is complex. Enterprise teams juggle Infoblox, BlueCat, Route53, Cloudflare, and more - each with different APIs, interfaces, and workflows. DNSNet provides a unified CLI that works across all major platforms with enterprise-grade security and compliance built in.

  • One CLI, Many Platforms: Manage Infoblox, BlueCat, Route53, Cloudflare, Azure DNS, Google Cloud DNS, OCI, Akamai, NS1, BIND, PowerDNS, and more from a single tool.
  • Compliance Built-In: SOX, HIPAA, PCI-DSS, GDPR audit logging with tamper-evident trails and 7-year retention support.
  • Security First: RBAC, SAML/OAuth, MFA, encrypted credentials, and comprehensive audit logging.
  • Ticketing Integration: Link every change to Jira, ServiceNow, or BMC Remedy tickets automatically.
  • Format Conversion: Convert between BIND, NSD, PowerDNS, tinydns, and JSON formats seamlessly.

Installation

Quick Install (Recommended)

# Install from PyPI
pip install dnsscience-dnsnet

# Verify installation
dnsnet --version

Alternative Installation Methods

Using pipx (Isolated Environment)

# pipx installs in isolated environment
pipx install dnsscience-dnsnet

From Source

# Clone the repository
git clone https://github.com/straticus1/dnsscience-dnsnet.git
cd dnsscience-dnsnet

# Install in development mode
pip install -e ".[dev]"

Using Poetry

git clone https://github.com/straticus1/dnsscience-dnsnet.git
cd dnsscience-dnsnet
poetry install

Docker

# Build Docker image
docker build -t dnsnet .

# Run with config volume mounted
docker run -v ~/.config/dnsnet:/root/.config/dnsnet dnsnet --help

Requirements

  • Python 3.11 or higher
  • pip or pipx package manager
  • Network access to DNS/DHCP platforms you want to manage

Platform-Specific Notes

macOS

# Install Python 3.11+ using Homebrew
brew install python@3.11
pip3 install dnsscience-dnsnet

Ubuntu/Debian

sudo apt update
sudo apt install python3.11 python3.11-venv python3-pip
pip3 install dnsscience-dnsnet

RHEL/CentOS/Rocky

sudo dnf install epel-release
sudo dnf install python3.11 python3.11-pip
pip3.11 install dnsscience-dnsnet

Supported Platforms

Enterprise DNS/DHCP

  • Infoblox WAPI
  • BlueCat Address Manager
  • EfficientIP SOLIDserver
  • Alcatel-Lucent VitalQIP
  • Men&Mice Micetro

Cloud DNS Providers

  • AWS Route53
  • Cloudflare DNS
  • Azure DNS
  • Google Cloud DNS
  • Oracle Cloud (OCI) DNS
  • Akamai Edge DNS
  • NS1

Load Balancer DNS/GSLB

  • A10 Thunder ADC
  • F5 BIG-IP DNS (GTM)

Local DNS Servers

  • BIND/named
  • NSD
  • Unbound
  • PowerDNS
  • djbdns (tinydns/dnscache)

DHCP Servers

  • ISC DHCP
  • Infoblox DHCP
  • BlueCat DHCP

Ticketing Systems

  • Jira (Cloud & Server)
  • ServiceNow ITSM
  • BMC Remedy

Quick Start

Initialize Configuration

# Create default configuration
dnsnet config init

# Show current configuration
dnsnet config show

Configure Provider Credentials

Infoblox
# Configure Infoblox connection
dnsnet infoblox config --host grid.example.com --username admin

# Test connection
dnsnet infoblox test-connection
AWS Route53
# Using AWS CLI profile
dnsnet cloud route53 config --profile production

# Or with explicit credentials
dnsnet cloud route53 config --access-key YOUR_KEY --secret-key YOUR_SECRET
Cloudflare
dnsnet cloud cloudflare config --api-token YOUR_TOKEN

DNS Management Examples

List and Export Zones

# List zones from different providers
dnsnet infoblox dns zones list
dnsnet cloud route53 zones list
dnsnet cloud cloudflare zones list

# Export zone to BIND format
dnsnet infoblox dns zones export example.com --format bind

# Export zone to YAML
dnsnet infoblox dns zones export example.com --output zone.yaml

Manage DNS Records

# Create A record
dnsnet infoblox dns records create example.com www A 192.168.1.1 --ttl 3600

# Create MX record
dnsnet infoblox dns records create example.com @ MX "10 mail.example.com"

# Create TXT record (SPF)
dnsnet infoblox dns records create example.com @ TXT "v=spf1 include:_spf.google.com ~all"

# Update record
dnsnet infoblox dns records update example.com www A 192.168.1.2

# Delete record
dnsnet infoblox dns records delete example.com www A

# Batch operations from file
dnsnet infoblox dns records batch example.com --file changes.yaml

Dry-Run Mode

Always preview changes before applying them in production:

# Preview what would be created
dnsnet infoblox dns records create example.com www A 192.168.1.1 --dry-run

# Preview import
dnsnet infoblox dns import zone.yaml --dry-run

DHCP Management

Network and Reservation Management

# List networks
dnsnet infoblox dhcp networks list

# Create reservation
dnsnet infoblox dhcp reservations create \
  --network 192.168.1.0/24 \
  --ip 192.168.1.100 \
  --mac 00:11:22:33:44:55 \
  --hostname workstation1

# List reservations
dnsnet infoblox dhcp reservations list --network 192.168.1.0/24

# View active leases
dnsnet infoblox dhcp leases list

# Search by MAC address
dnsnet infoblox dhcp leases search --mac 00:11:22:33:44:55

Cloud DNS Providers

AWS Route53

# List hosted zones
dnsnet cloud route53 zones list

# Create record
dnsnet cloud route53 records create Z123456 www.example.com A 192.168.1.1

Cloudflare

# List zones
dnsnet cloud cloudflare zones list

# Create proxied record
dnsnet cloud cloudflare records create example.com www A 192.168.1.1 --proxied

Oracle Cloud Infrastructure DNS

# Configure OCI
dnsnet cloud oci config --config-file ~/.oci/config --profile DEFAULT

# List zones
dnsnet cloud oci zones --compartment-id ocid1.compartment.oc1..example

Akamai Edge DNS

# Configure Akamai
dnsnet cloud akamai config --edgerc ~/.edgerc --section default

# List zones
dnsnet cloud akamai zones

NS1

# Configure NS1
dnsnet cloud ns1 config --api-key YOUR_API_KEY

# List zones
dnsnet cloud ns1 zones

Load Balancer DNS/GSLB

A10 Thunder ADC

# Configure A10
dnsnet a10 config --host thunder.example.com --username admin

# List GSLB zones and sites
dnsnet a10 gslb-zones
dnsnet a10 gslb-sites

# List service groups and virtual servers
dnsnet a10 service-groups
dnsnet a10 virtual-servers

F5 BIG-IP DNS (GTM)

# Configure F5
dnsnet f5 config --host bigip.example.com --username admin

# List Wide IPs
dnsnet f5 wideips
dnsnet f5 wideips --type A

# List pools and data centers
dnsnet f5 pools
dnsnet f5 datacenters

# Create Wide IP
dnsnet f5 create-wideip www.example.com --type A --pool pool1

Security Testing & Validation

DNSNet integrates with dnsscience.io for comprehensive security testing:

DNS Propagation Check

# Check A record propagation globally
dnsnet test propagation example.com A

# Check with specific nameservers
dnsnet test propagation example.com A --nameservers 8.8.8.8,1.1.1.1

# Full propagation report
dnsnet test propagation example.com A --detailed

DNS Security Scan

# Basic security scan
dnsnet test scan example.com

# Advanced scan
dnsnet test scan example.com --mode advanced

# Expert-level scan
dnsnet test scan example.com --mode expert

Email Security Validation

# Check SPF, DKIM, DMARC
dnsnet test email-security example.com

# Validate specific DKIM selector
dnsnet test email-security example.com --dkim-selector google

DNSSEC Validation

# Validate DNSSEC chain
dnsnet test dnssec example.com

# Check DS records
dnsnet test dnssec example.com --check-ds

Secure DNS (DoH/DoT)

# DNS over HTTPS query
dnsnet test doh example.com A --provider cloudflare

# DNS over TLS query
dnsnet test dot example.com A --provider google

# Compare multiple providers
dnsnet test secure-compare example.com A

Supported DoH Providers: Cloudflare, Google, Quad9, NextDNS, AdGuard, and 12+ more

Supported DoT Providers: Cloudflare, Google, Quad9, and 6+ more

Visual Traceroute

Network path tracing with rich ASCII art visualization and IP intelligence:

Basic Usage

# Full visual traceroute (default path style)
dnsnet trace run google.com

# Quick traceroute without IP enrichment (faster)
dnsnet trace quick 8.8.8.8

# Specify maximum hops
dnsnet trace run example.com --max-hops 20

Visualization Styles

# Path diagram - vertical flow with hop details
dnsnet trace run google.com --style path

# Table view - tabular format with all metrics
dnsnet trace run 8.8.8.8 --style table

# Compact - one line per hop, minimal output
dnsnet trace run 1.1.1.1 --style compact

# ASCII geographic map
dnsnet trace run cloudflare.com --style map

# RTT latency histogram
dnsnet trace run google.com --style histogram

# ASN path flow diagram
dnsnet trace run amazon.com --style asn

Specialized Commands

# Latency histogram view
dnsnet trace latency google.com

# ASN path visualization
dnsnet trace asn cloudflare.com

# Geographic map view
dnsnet trace map amazon.com

# Compare multiple targets
dnsnet trace compare google.com cloudflare.com 8.8.8.8

IP Enrichment: Traceroute can enrich hop data with geolocation and ASN information via IPinfo.io. Set your token:

export IPINFO_TOKEN=your_token_here

Ping Utility

Comprehensive ping utility with statistics and visualization:

Basic Ping

# Ping with default 4 packets
dnsnet ping run google.com

# Specify packet count
dnsnet ping run 8.8.8.8 -c 10

# Custom interval and timeout
dnsnet ping run 1.1.1.1 -i 0.5 -W 3 -c 20

Visualization Modes

# Statistics summary with all stats
dnsnet ping stats cloudflare.com -c 100

# Table view of all responses
dnsnet ping table google.com -c 10

# ASCII RTT graph
dnsnet ping graph 1.1.1.1 -c 30

Compare and Health Check

# Compare latency to different DNS servers
dnsnet ping compare 8.8.8.8 1.1.1.1 9.9.9.9

# Quick connectivity check (returns exit code 0/1)
dnsnet ping check google.com

# Use in scripts
if dnsnet ping check 8.8.8.8 -c 2; then
    echo "Network is up"
fi

Statistics Provided: Packets sent/received/lost, loss percentage, RTT min/avg/max/stddev, jitter

Infrastructure as Code (IaC) Integration NEW

DNSNet provides comprehensive IaC integration for importing, exporting, validating, and detecting drift in DNS configurations across popular IaC formats:

Supported IaC Formats

  • Terraform / OpenTofu (HCL & JSON)
  • Ansible (Playbooks & Roles)
  • Pulumi TypeScript
  • Pulumi Python
  • Pulumi Go
  • Pulumi YAML

Supported DNS Providers

  • AWS Route53
  • Cloudflare
  • Azure DNS
  • Google Cloud DNS
  • NS1
  • Infoblox
  • DigitalOcean
  • Akamai Edge DNS

Import IaC Configurations

Import DNS configurations from IaC repositories to your database or push directly to DNS providers:

# Import from local Terraform directory
dnsnet iac import ./terraform/dns --to-db

# Import from git repository
dnsnet iac import https://github.com/org/dns-config.git --to-db

# Import Ansible playbooks and push to provider
dnsnet iac import ./ansible/dns --to-provider

# Import specific zones only
dnsnet iac import ./terraform --to-db --zone example.com --zone example.org

# Dry run to preview changes
dnsnet iac import ./terraform --to-db --dry-run

# Shortcut commands
dnsnet iac tf-import ./terraform          # Terraform shortcut
dnsnet iac ansible-import ./ansible       # Ansible shortcut

Export to IaC Formats

Generate Terraform, Ansible, or Pulumi code from your database or live DNS providers:

# Export database to Terraform
dnsnet iac export --from-db --format terraform -o dns.tf

# Export live Route53 configuration to Terraform
dnsnet iac export --from-provider route53 --format terraform -o route53.tf

# Export to Ansible playbook
dnsnet iac export --from-db --format ansible -o dns_playbook.yml

# Export to Pulumi TypeScript
dnsnet iac export --from-db --format pulumi-ts -o ./pulumi/

# Export specific zones to Pulumi Python
dnsnet iac export --from-provider cloudflare --format pulumi-python \
  --zone example.com -o ./pulumi/

# Create separate file per zone
dnsnet iac export --from-db --format terraform --split-zones -o ./terraform/

# Shortcut commands
dnsnet iac tf-export --from-db            # Export to Terraform
dnsnet iac ansible-export --from-db       # Export to Ansible

Drift Detection

Compare your IaC configuration against live DNS state or database to detect configuration drift:

# Compare Terraform against live Route53
dnsnet iac diff ./terraform --against live --provider route53

# Compare Ansible playbook against Cloudflare
dnsnet iac diff ./ansible/dns --against live --provider cloudflare

# Compare against database
dnsnet iac diff ./terraform --against db

# Ignore TTL differences
dnsnet iac diff ./terraform --against live --ignore-ttl

# Show all records including unchanged
dnsnet iac diff ./terraform --against live --show-unchanged

# Filter specific zones
dnsnet iac diff ./terraform --against live --zone example.com

Drift detection shows:

  • + Creates: Records in IaC but not live
  • ~ Updates: Records that differ between IaC and live
  • - Deletes: Records live but not in IaC

Configuration Validation

Validate IaC configurations for correctness, security issues, and best practices:

# Validate Terraform configuration
dnsnet iac validate ./terraform

# Strict validation (treat warnings as errors)
dnsnet iac validate ./ansible --strict

# Custom TTL limits
dnsnet iac validate ./terraform --min-ttl 300 --max-ttl 3600

# Skip security checks
dnsnet iac validate ./terraform --no-security

Validation checks for:

  • Invalid record types and values
  • TTL out of range (too low or too high)
  • CNAME conflicts with other record types
  • SPF record security issues
  • Wildcard record usage
  • Private IP address exposure
  • Missing MX record targets

Auto-Detection

DNSNet automatically detects the IaC type in a directory:

# Detect IaC type
dnsnet iac detect ./infrastructure

# Output:
# IaC Type: terraform
# Confidence: 100%
# Detected files:
#   ./infrastructure/main.tf
#   ./infrastructure/dns.tf
#   ./infrastructure/providers.tf

List Supported Providers

# Show all supported IaC providers
dnsnet iac providers

# Output shows provider name, code, and supported formats

Git Integration for DNS IaC NEW

Full Git workflow support for managing DNS configurations stored in repositories. View, check, commit, push, and pull DNS IaC configs directly from DNSNet.

View DNS Configurations

Preview what DNS configurations could be imported from a repository:

# View current directory
dnsnet git view

# View local path
dnsnet git view ./infrastructure/dns

# View remote repository (clones to temp dir)
dnsnet git view https://github.com/org/dns-config.git

# View with detailed record information
dnsnet git view --detailed

Check Import Status

Check if a repository's DNS configuration has been imported to your database:

# Check current directory
dnsnet git check

# Check specific path
dnsnet git check ./infrastructure/dns

# Check remote repository
dnsnet git check https://github.com/org/dns-config.git

Clone Repositories

# Clone a DNS IaC repository
dnsnet git clone https://github.com/org/dns-config.git

# Clone to specific path
dnsnet git clone https://github.com/org/dns-config.git ./dns-config

# Clone and view DNS configuration
dnsnet git clone https://github.com/org/dns-config.git --view

# Clone specific branch
dnsnet git clone https://github.com/org/dns-config.git -b develop

Repository Status & History

# Show git status
dnsnet git status

# Show git log
dnsnet git log
dnsnet git log -n 20 --files

# Search commits by message
dnsnet git log --message "dns update"

# Show diff of changes
dnsnet git diff
dnsnet git diff --staged

Commit Changes

Commit DNS configuration changes. If no message is provided with -m, prompts for multi-line input. End the message by typing a single "." on an empty line:

# Commit with message
dnsnet git commit -m "Update DNS records for example.com"

# Interactive commit message
dnsnet git commit
# Enter your message...
# End with a single "." on an empty line

Push & Pull

# Pull latest changes
dnsnet git pull
dnsnet git pull --rebase

# Push commits
dnsnet git push
dnsnet git push --set-upstream
dnsnet git push --force  # Use with caution!

# Fetch without merging
dnsnet git fetch

Jenkins CI/CD Integration NEW

Full Jenkins integration for automated DNS change management with approval workflows, change tracking, and webhook support.

Configure Jenkins Connection

# Configure Jenkins connection (prompts for credentials)
dnsnet jenkins config --url https://jenkins.example.com --username admin

# Test connection
dnsnet jenkins test

Job Management

# List all jobs
dnsnet jenkins jobs list

# List jobs in a folder
dnsnet jenkins jobs list --folder dns-changes

# Get job details
dnsnet jenkins jobs info dns-change-pipeline

Build Management

# Trigger a build
dnsnet jenkins builds trigger dns-change-pipeline

# Trigger with parameters
dnsnet jenkins builds trigger dns-change-pipeline \
    -p ZONE=example.com \
    -p RECORD_NAME=www \
    -p ACTION=add \
    -p VALUE=192.168.1.1

# Trigger and wait for completion
dnsnet jenkins builds trigger dns-change-pipeline --wait --timeout 300

# Check build status
dnsnet jenkins builds status dns-change-pipeline 42

# View build log
dnsnet jenkins builds log dns-change-pipeline 42 --tail 100

# Stop a running build
dnsnet jenkins builds stop dns-change-pipeline 42

Approval Gates

Manage DNS change approvals for Jenkins pipeline input steps:

# List pending approvals
dnsnet jenkins approvals list
dnsnet jenkins approvals list --job dns-change-pipeline

# Approve a DNS change
dnsnet jenkins approvals approve abc123 --user admin --comment "Approved"

# Reject a DNS change
dnsnet jenkins approvals reject abc123 --user admin --reason "Invalid record value"

Change Tracking

Track DNS changes linked to Jenkins builds:

# List tracked changes
dnsnet jenkins tracking list

# Filter by zone
dnsnet jenkins tracking list --zone example.com

# Filter by job
dnsnet jenkins tracking list --job dns-change-pipeline

# Filter by status (pending, applied, failed, rolled_back)
dnsnet jenkins tracking list --status failed

# View tracking statistics
dnsnet jenkins tracking stats

Webhook Server

Start a webhook server to receive notifications from Jenkins:

# Start webhook server
dnsnet jenkins webhook start

# Custom port and secret
dnsnet jenkins webhook start --port 9090 --secret mysecret

Generate Pipeline Files

# Generate a Jenkinsfile
dnsnet jenkins pipeline generate --provider route53 -o Jenkinsfile

# Without approval step
dnsnet jenkins pipeline generate --no-approval

# Without webhook notifications
dnsnet jenkins pipeline generate --no-webhook

# Generate shared library
dnsnet jenkins pipeline shared-library ./dnsnet-shared-library

Shared Library Functions

The generated shared library provides these Groovy functions:

Function Description
dnsnetValidate() Validate DNS change parameters
dnsnetPlan() Generate change plan
dnsnetRequestApproval() Request manual approval
dnsnetApply() Apply DNS changes
dnsnetVerify() Verify DNS propagation
dnsnetNotify() Send webhook notification
dnsnetRollback() Rollback DNS changes

Example Jenkinsfile

@Library('dnsnet-shared-library') _

pipeline {
    agent any

    parameters {
        string(name: 'ZONE', defaultValue: 'example.com')
        string(name: 'RECORD_NAME', defaultValue: 'www')
        choice(name: 'RECORD_TYPE', choices: ['A', 'CNAME', 'TXT'])
        choice(name: 'ACTION', choices: ['add', 'update', 'delete'])
        string(name: 'VALUE', defaultValue: '')
        booleanParam(name: 'DRY_RUN', defaultValue: true)
    }

    stages {
        stage('Validate') {
            steps {
                dnsnetValidate(
                    zone: params.ZONE,
                    name: params.RECORD_NAME,
                    type: params.RECORD_TYPE,
                    action: params.ACTION,
                    value: params.VALUE
                )
            }
        }

        stage('Plan') {
            steps {
                script {
                    env.PLAN = dnsnetPlan(
                        zone: params.ZONE,
                        name: params.RECORD_NAME,
                        type: params.RECORD_TYPE,
                        action: params.ACTION,
                        value: params.VALUE
                    )
                    echo env.PLAN
                }
            }
        }

        stage('Approval') {
            when { expression { !params.DRY_RUN } }
            steps {
                dnsnetRequestApproval(
                    plan: env.PLAN,
                    timeout: 60,
                    submitter: 'dns-approvers'
                )
            }
        }

        stage('Apply') {
            when { expression { !params.DRY_RUN } }
            steps {
                dnsnetApply(
                    zone: params.ZONE,
                    name: params.RECORD_NAME,
                    type: params.RECORD_TYPE,
                    action: params.ACTION,
                    value: params.VALUE
                )
            }
        }

        stage('Verify') {
            when { expression { !params.DRY_RUN } }
            steps {
                dnsnetVerify(
                    zone: params.ZONE,
                    name: params.RECORD_NAME,
                    type: params.RECORD_TYPE,
                    expected: params.VALUE
                )
            }
        }
    }

    post {
        success { dnsnetNotify(event: 'build_completed', status: 'success') }
        failure { dnsnetNotify(event: 'build_failed', status: 'failure') }
    }
}

Compliance & Auditing

DNSNet is designed for enterprise environments with full compliance support:

SOX HIPAA PCI-DSS GDPR SOC2 GLBA NIST ISO 27001 Dodd-Frank TIA

Audit Logging

# List recent audit entries
dnsnet audit list

# Filter by user
dnsnet audit list --user admin

# Filter by action
dnsnet audit list --action record.create

# Filter by date range
dnsnet audit list --from 2024-01-01 --to 2024-01-31

# Export audit logs
dnsnet audit export --format json --output audit.json

Compliance Reports

# Generate SOX compliance report
dnsnet audit report --framework sox --period monthly

# HIPAA compliance check
dnsnet audit report --framework hipaa

# Full audit trail export for auditors
dnsnet audit export --format csv --output audit_trail.csv

Audit Log Fields

  • Timestamp with timezone
  • User and IP address
  • Action performed
  • Resource type and name
  • Before/after values
  • Status (success/failure)
  • Ticket reference
  • Integrity checksum (SHA-256)
  • Compliance framework tags

Data Protection

  • Field-level encryption (AES-256)
  • Key rotation support
  • Secure credential storage (keyring)
  • Database encryption (SQLCipher)
  • Encrypted configuration files

Ticketing Integration

Configure Ticketing Systems

# Configure Jira
dnsnet ticket config jira \
  --url https://company.atlassian.net \
  --project DNSCHANGE \
  --username user@company.com \
  --api-token YOUR_TOKEN

# Configure ServiceNow
dnsnet ticket config servicenow \
  --instance company \
  --username api_user

# Configure BMC Remedy
dnsnet ticket config remedy \
  --server remedy.company.com \
  --username api_user

Link Changes to Tickets

# Create record with ticket reference
dnsnet infoblox dns records create example.com www A 192.168.1.1 \
  --ticket DNSCHANGE-123

# Auto-create ticket for change
dnsnet infoblox dns records create example.com www A 192.168.1.1 \
  --create-ticket \
  --ticket-summary "Add www.example.com A record"

Manage Tickets

# Create ticket manually
dnsnet ticket create \
  --summary "DNS Change Request" \
  --description "Adding new A records for web servers"

# Update ticket status
dnsnet ticket transition DNSCHANGE-123 --status resolved

# Add comment
dnsnet ticket comment DNSCHANGE-123 "Change completed successfully"

Format Conversion

Convert Zone Formats

# BIND to NSD
dnsnet convert dns bind-to-nsd zone.db --output zone.nsd

# BIND to Infoblox (for import)
dnsnet convert dns bind-to-infoblox zone.db --output zone.csv

# tinydns to BIND
dnsnet convert dns tinydns-to-bind data --output zone.db

# Export any format to JSON/YAML
dnsnet convert dns bind-to-json zone.db --output zone.json

Convert DHCP Formats

# ISC DHCP to Infoblox
dnsnet convert dhcp isc-to-infoblox dhcpd.conf --output subnets.csv

# ISC DHCP to BlueCat
dnsnet convert dhcp isc-to-bluecat dhcpd.conf --output import.xml

Configuration Diff

# Compare two zone files
dnsnet diff dns zone1.yaml zone2.yaml

# Compare provider zones
dnsnet diff dns --source infoblox --target route53 example.com

# Show only changes
dnsnet diff dns zone1.yaml zone2.yaml --changes-only

Configuration

Configuration File Location

  • Linux/macOS: ~/.config/dnsnet/config.yaml
  • Windows: %APPDATA%\dnsnet\config.yaml

Example Configuration

default_provider: infoblox

providers:
  infoblox:
    host: grid.example.com
    version: "2.12"
    verify_ssl: true

  bluecat:
    host: bam.example.com
    api_version: v2

  route53:
    profile: production
    region: us-east-1

output:
  format: table
  color: true
  pager: auto

compliance:
  frameworks:
    - sox
    - hipaa
  audit_retention_days: 2555  # 7 years for SOX

ticketing:
  enabled: true
  provider: jira
  project: DNSCHANGE

audit:
  enabled: true
  file_path: ~/.dnsnet/audit/audit.log
  integrity_check: true

Environment Variables

# Alternative to config file
export DNSNET_INFOBLOX_USERNAME=admin
export DNSNET_INFOBLOX_PASSWORD=secret
export DNSNET_CLOUDFLARE_API_TOKEN=your_token
export IPINFO_TOKEN=your_ipinfo_token

Architecture

dnsnet/
+-- cli/           # Click CLI commands
+-- providers/     # Platform integrations
|   +-- infoblox/
|   +-- bluecat/
|   +-- efficientip/  # EfficientIP SOLIDserver
|   +-- qip/
|   +-- micetro/
|   +-- cloud/        # Route53, Cloudflare, Azure, GCP, OCI, Akamai, NS1
|   +-- loadbalancer/ # A10 Thunder, F5 BIG-IP GTM
|   +-- local/        # BIND, NSD, PowerDNS, etc.
|   +-- testing/      # dnsscience.io integration
+-- iac/           # Infrastructure as Code integration
|   +-- models.py      # IaC data models
|   +-- detector.py    # Auto-detect IaC type
|   +-- terraform.py   # Terraform/OpenTofu parser & exporter
|   +-- ansible.py     # Ansible parser & exporter
|   +-- pulumi.py      # Pulumi parser & exporter
|   +-- importer.py    # Import IaC to DB/providers
|   +-- exporter.py    # Export from DB/providers to IaC
|   +-- diff.py        # Drift detection
|   +-- validator.py   # Configuration validation
+-- parsers/       # Config file parsers (BIND, NSD, ISC DHCP, tinydns)
+-- models/        # Data models (DNS, DHCP, Network)
+-- converters/    # Format converters
+-- exporters/     # Export formatters (JSON, YAML, BIND, tinydns)
+-- diff/          # Configuration diff engine
+-- scheduler/     # Job scheduling
+-- ticketing/     # Jira, ServiceNow, Remedy
+-- auth/          # Authentication & RBAC
+-- config/        # Configuration management
+-- utils/         # Utilities
    +-- audit.py           # Audit logging
    +-- encryption.py      # Data encryption
    +-- secure_dns.py      # DoH/DoT
    +-- ipinfo.py          # ipinfo.io client
    +-- ip_calculator.py   # IP/subnet calculator
    +-- traceroute.py      # Traceroute engine
    +-- ping.py            # Ping engine

Get Started Today

DNSNet is open source and free to use. Install it now and simplify your DNS/DHCP management.

pip install dnsscience-dnsnet

View on GitHub