Skip to main content

NetBox DNS is a NetBox plugin for managing DNS data.

Project description

NetBox DNS

The NetBox DNS plugin enables NetBox to manage operational DNS data such as name servers, zones, records and views, as well as registration data for domains. It can automate tasks like creating PTR records, generating zone serial numbers, NS and SOA records, as well as validate names and values values for resource records to ensure zone data is consistent, up-to-date and compliant with to the relevant RFCs.

PyPi Stars Badge Forks Badge Issues Badge Pull Requests Badge GitHub contributors License Badge Downloads Downloads/Week Downloads/Month

[!WARNING] As a result of some issues with NetBox Branching still under investigation, NetBox DNS is currently not compatible with the new NetBox Branching plugin. This affects multiple aspects of the branching functionality, and currently (netboxlabs-branching-plugin version 0.4.0) there is no workaround. Do not try to use NetBox Branching together with NetBox DNS until these issues are resolved. This warning will be updated as soon as the situation is resolved.

Objectives

NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.

The plugin stores information about DNS name servers, DNS views and zones, and DNS records, making it a data source for automatic provisioning of DNS instances. Registration information about DNS registrars and contacts for DNS domains can also be stored and associated with zones.

The main focus of the plugin is to ensure the quality of the data stored in it. To achieve this, there are many validation and automation mechanisms in place:

  • Validation of record names and values
  • Automatic maintenance of PTR records for IPv6 and IPv4 address records
  • Automatic generation of SOA records, optionally including the serial number of the zone data
  • Validation of changes to the SOA SERIAL number, whether they are done automatically or manually
  • Validation of record types such as CNAME and singletons, to ensure DNS zone validity
  • Support for RFC 2317 delegation of PTR zones for IPv4 subnets longer than 24 bits
  • Templating for zones and records enables faster creations of zones with given boilerplate object relations, such as name servers, tags, tenants or registration information, or records like standard SPF or MX records that are the same for a subset of zones
  • IPAM DNSsync can be used to automatically create address and pointer records for IP addresses by assigning prefixes to DNS views. When an IP address has a DNS name assigned and there are zones with matching names in the DNS views linked to the IP address' prefix, a matching DNS record will be created in these zones

Other main features include:

  • Support for BIND views, providing lightweight namespaces for zones
  • Support for IDN, including the validation of punycode names
  • Full support for the NetBox REST and GraphQL APIs
  • Support for all major NetBox features such as global search, tenancy, change logs, tagging, journaling etc.

Non-objectives

In the same way as NetBox is not a network management application, NetBox DNS does not provide any functionality to manage specific name servers or DNS service providers or to generate input such as configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services that actually use the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.

For integration with a large number of DNS server implementations integration tools like octodns-netbox-dns are available.

Requirements

  • NetBox 4.0.0 or higher
  • Python 3.10 or higher

Installation & Configuration

Installation

$ source /opt/netbox/venv/bin/activate
(venv) $ pip install netbox-plugin-dns

NetBox Configuration

Add the plugin to the NetBox config. ~/netbox/configuration.py

PLUGINS = [
    "netbox_dns",
]

To permanently keep the plugin installed when updating NetBox via update.sh:

echo netbox-plugin-dns >> ~/netbox/local_requirements.txt

To add the required netbox_dns tables to your database run the following command from your NetBox directory:

./manage.py migrate

Full documentation on using plugins with NetBox: Using Plugins - NetBox Documentation

Contribute

Contributions are always welcome! Please see the Contribution Guidelines

Documentation

For further information, please refer to the full documentation: Using NetBox DNS

License

MIT

Project details


Release history Release notifications | RSS feed

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_dns-1.1.2.tar.gz (69.6 kB view details)

Uploaded Source

Built Distribution

netbox_plugin_dns-1.1.2-py3-none-any.whl (124.6 kB view details)

Uploaded Python 3

File details

Details for the file netbox_plugin_dns-1.1.2.tar.gz.

File metadata

  • Download URL: netbox_plugin_dns-1.1.2.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for netbox_plugin_dns-1.1.2.tar.gz
Algorithm Hash digest
SHA256 3cd7fa8ce46cfd3c40c23d557a788a6712311a5c16bfba6a5291b51f8da88ae4
MD5 152e65b6143551a733b91578f1c2f0f5
BLAKE2b-256 c26de48ed7d0613508f4343a1d00d243573060eefd59901bd941bf6d918d7a81

See more details on using hashes here.

File details

Details for the file netbox_plugin_dns-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_plugin_dns-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f049198fd2165a46a0b2e23c5d337217b9dcaf58491b5adc806316cc856a074
MD5 6f10aacee5a58fea7a53a3813e4d1cd0
BLAKE2b-256 55521f2a5ee9cc69f20d133d1ac6379111299fd5f27c10886d7555660425035a

See more details on using hashes here.

Supported by

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