Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetBox → BIND zone exporter

Replaces the RackTables (rur) reverse-zone export for SpojeNet public DNS.

Reads IPAM dns_name from NetBox and writes BIND reverse zone files plus

named-auto.*.conf fragments from on-disk zone directories.

## Install

```bash

pip install .

# or editable:

pip install -e '.[dev]'

```

## Configuration

```bash

export NETBOX_TOKEN=… # or NETBOX_API + NETBOX_TOKEN

```

Reverse prefixes live in examples/prefixes.yml

(the current SpojeNet dns/reverse/ set, minus manual IPv6 zones).

## Usage

Generate reverse zones from NetBox:

```bash

netbox2bind reverse --config examples/prefixes.yml -o /tmp/reverse

```

Diff against the existing SVN reverse directory (exit 1 if drift):

```bash

netbox2bind diff \

--config examples/prefixes.yml \

--against ~/Projects/SpojeNet/svn/trunk/dns/reverse

```

Generate named-auto fragments from zone directories (no NetBox needed):

```bash

netbox2bind named-conf --kind master \

--zones-dir ~/Projects/SpojeNet/svn/trunk/dns/master \

-o /tmp/named-auto.master.conf

netbox2bind named-conf --kind reverse \

--zones-dir ~/Projects/SpojeNet/svn/trunk/dns/reverse \

-o /tmp/named-auto.reverse.conf

```

## Important

- Does not commit to SVN — write files, then svn ci yourself (same as

reviewing rur output).

- NetBox IPAM must carry the public PTR targets in dns_name. Until the

RackTables→NetBox migration is complete, diff will show many

only_existing records.

- Forward zones under dns/master/ stay hand-edited; this tool only lists

them into named-auto.master.conf.

- IPv6 reverse zones are out of scope for 0.1.0.

## License

Apache-2.0

About

Generate BIND reverse zones and named-auto config from NetBox IPAM

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages