Skip to main content

A Bind provisioning plugin that uses netbox_dns for its data source

Project description

Netbox Bind Provisioner

A Netbox Plugin that provides a minimal DNS Server for the automatic provisioning of a Bind9 Server from Netbox DNS data (netbox-plugin-dns).

Plugin configuration

The plugin was re-worked; Instead of exporting zone files, it provides an entire (though minimal) DNS Server that is fed directly from Netbox's DNS data. The Server also provides specialized "catalog" zones that bind uses to automatically discover new zones and remove deleted ones. The plugin supports view as well as basic dns security using TSIG.

To work correctly, each view needs a tsig key installed and the bind-transfer-endpoint needs to be running as its own service in the background via the manage.py command. Note that dnssec support will be implemented as soon as bind9 has a mechanism to allow configuration of such via the Catalog Zones mechanism.

venv/bin/python3 netbox/netbox/manage.py bind-transfer-endpoint --port 5354

Parameters

Parameter Description
--port Port to listen on for requests (defaults to 5354)
--address IP of interface to bind to (defaults to 0.0.0.0)
PLUGINS_CONFIG = {
    "netbox_bind_provisioner": {
        "tsig_keys": {
            "key1name": {
                "view":      "public",
                "keyname":   "view1key",
                "algorithm": "hmac-sha256",
                "secret":    "base64-encoded-secret"
            },
            "key2name": {
                "view":      "private",
                "keyname":   "view2key",
                "algorithm": "hmac-sha256",
                "secret":    "base64-encoded-secret"
            }
        },
    }
}

Bind configuration

options {
    ...
    ...
    allow-update      { none; };
    allow-query       { any; };
    allow-recursion   { none; };
    notify            yes;
    ...
    ...
};

# ACLs

acl public {
    !10.0.0.0/8;
    !172.16.0.0/12;
    !192.168.0.0/16;
    any;
};

acl private {
    10.0.0.0/8;
    172.16.0.0/12;
    192.168.0.0/16;
};

# Zone definitions

view "public" {
    key "key1name" {
        algorithm hmac-sha256;
        secret "base64-encoded-secret";
    };

    match-clients { public; };

    catalog-zones {
        zone "catz"
            default-masters { 127.0.0.1 port 5354 key "key1name"; }
            zone-directory "/var/lib/bind/zones"
            min-update-interval 1;
    };

    zone "catz" {
        type slave;
        file "/var/lib/bind/zones/catz_public";
        masters { 127.0.0.1 port 5354 key "key1name"; };
        notify no;
    };
};

view "private" {
    key "key2name" {
        algorithm hmac-sha256;
        secret "base64-encoded-secret";
    };

    match-clients { private; };

    catalog-zones {
        zone "catz"
            default-masters { 127.0.0.1 port 5354 key "key2name"; }
            zone-directory "/var/lib/bind/zones"
            min-update-interval 1;
    };

    zone "catz" {
        type slave;
        file "/var/lib/bind/zones/catz_private";
        masters { 127.0.0.1 port 5354 key "key2name"; };
        notify no;
    };
};

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_plugin_bind_provisioner-0.9.3.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file netbox_plugin_bind_provisioner-0.9.3.tar.gz.

File metadata

File hashes

Hashes for netbox_plugin_bind_provisioner-0.9.3.tar.gz
Algorithm Hash digest
SHA256 284197e0c9b08964dcf262ae0b159411ff6d8fc5ff4715fc49d6602c8943b065
MD5 39baed658e376348290d63482e0de4ea
BLAKE2b-256 e7ee785046d1ac74b7103ddb372edf07b54971bb53dee8f44606ee883437cbee

See more details on using hashes here.

File details

Details for the file netbox_plugin_bind_provisioner-0.9.3-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_plugin_bind_provisioner-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4a2657c00cce79ec29a08bb41ee2c5e706f5d83284809ee7082388f7af961c64
MD5 09230c39d818f0f6dd7826010e2551dd
BLAKE2b-256 88e5e7cc5e77864d74d56ae0be70e8429ea7c6f496d3e1aa8b422fa2772caa3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page