Create README.md

This commit is contained in:
Benjamin Collet 2024-12-04 13:54:25 +01:00 committed by GitHub
parent cbc7c18c41
commit 06577a1082
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

35
README.md Normal file
View file

@ -0,0 +1,35 @@
# Netbox DNS exporter
This script will generate forward and reverse DNS zones files based on Netbox data, according to the supplied configuration file.
The following records will be generated:
- An entry per device using its primary IP. If both IPv4 and IPv6 primary addresses are configured it will generate both A and AAAA records (as well as the corresponding PTR records).
- An entry per IP/IPv6 configured on a device interface (except those flagged as primary addresses), replacing all non letter/number characters with hyphens (`-`). For instance: interface `xe-0/1/0.42` on `my-router.example.com` will becomre `xe-0-1-0-42.my-router.example.com`.
All records can be overriden using Netbox's _DNS Name_ field.
All devices' names must be fully qualified for forward DNS zones to be generated.
This script will also try to retrieve from Netbox a config context named after the zone's name for additional records to be included in the generated zone file. If it exists, the config context must adhere to the following format:
```json
{
"records": [
{
"data": "\"v=spf1 -all\"",
"rr": "@",
"type": "TXT"
},
{
"data": "\"v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s\"",
"rr": "_dmarc",
"type": "TXT"
},
{
"data": "0 .",
"rr": "@",
"type": "MX"
}
]
}
```