Package: netbox-powerdns-sync
NetBox PowerDNS sync pluginANetboxplugin to manage
DNS records in PowerDNS based on netbox IP Address and Device objects.FeaturesAutomatically generates A, AAAA & PTR records based on IP Address & Device
objects and DNS zone settingsCan manage multiple DNS Zones across multiple PowerDNS serversFlexible rules to match netbox IP Addresses into DNS zonesMultiple options how to generate DNS name from IP address or DeviceOption to schedule sync of DNS zones from netbox to PowerDNSCan add DNS records for new zones immediatelySetup synchronization schedule for each zone individuallyGenerating DNS namesEach zone can define tags on IPAddress, Interface/VMInterface, FGRPGroup
or Device/VirtualMachine that match that zone. You can also match on
device role. A zone can also be only used for IPs that are assigned to management
only interfaces.When determining the zone to use for an IP Address, match rules are evaluated
as follows:check if IPAddress.dns_name matches any zonecheck if IPAddress is assigned to Device or VirtualMachine and if its name
matches any zonecheck if IPAddress is assigned to FHRPGroup and if its name matches any zoneIf no match is found then it will try to match based on assigned tags in this
order: IPAddress.tags, Interface.tags, VMInterface.tags, Device.tags,
VirtualMachine.tags, Device.device_role, VM.role.If there is still not matching zone found, default zone is used (if set).When a zone is set for an IP address, the DNS name is generated by using
set methods set on the zone. The IP naming method is tried first, then the
device and lastly the FHRP group method.CompatibilityThis plugin requires netbox version 3.5.x to work. Here is s compatibility table:NetBox VersionPlugin Version3.5.0-70.0.1 - 0.0.63.5.80.0.73.6.x0.8.0InstallingReviewofficial Netbox plugin documentationfor installation instructions.You install the plugin from pypi with pip. Make sure you activate Netbox's virtual
environment first:$source/opt/netbox/venv/bin/activate(venv)$pipinstallnetbox-powerdns-syncFor adding to a NetBox Docker setup seethe general instructions for using netbox-docker with plugins.You can install a development version directly from GitHub:pipinstallgit+https://github.com/ArnesSI/netbox-powerdns-sync.git@masteror by adding to yourlocal_requirements.txtorplugin_requirements.txt(netbox-docker):git+https://github.com/ArnesSI/netbox-powerdns-sync.git@masterAfter installation, enable the plugin in/opt/netbox/netbox/netbox/configuration.py,
or if you use netbox-docker, your/configuration/plugins.pyfile :PLUGINS=['netbox_powerdns_sync']PLUGINS_CONFIG={"netbox_powerdns_sync":{},}Available configuration settings you can use inPLUGINS_CONFIGare described
below undersettings.The last step is to apply database migrations and update netbox search index:(venv)$cd/opt/netbox/netbox/(venv)$python3manage.pymigrate(venv)$python3manage.pyreindex--lazyIf you're running under netbox-docker, you can skip this as migrations and index updates are applied if needed automatically when you bring up the containers.SettingsIf you want to override the defaults for the plugin, you can do so in your via/opt/netbox/netbox/netbox/configuration.py,
or if you use netbox-docker, your/configuration/plugins.pyfile :PLUGINS=['netbox_powerdns_sync']PLUGINS_CONFIG={"netbox_powerdns_sync":{# Example settings below, see "Available settings"# in README.md for all possible settings"ttl_custom_field":"","powerdns_managed_record_comment":None,|"post_save_enabled":False,},}Available settingsSettingDefault valueDescriptionttl_custom_fieldNoneName of netbox Custom field applied to IP Address objects. SeeCustom TTL fieldbelow.powerdns_managed_record_comment"netbox-powerdns-sync"Is set, the plugin will only touch records in PowerDNS API that have matching comment and ignore others. Set toNoneto make plugin manage all supported records.post_save_enabledFalseWhen creating or updating an IP Address, Device or FHRP Group, immediately create its DNS records usingpost_savesignals.Custom TTL fieldNormaly TTL for records is set by Default TTL on each Zone. There is an option to
set TTL for each DNS record individually. You need to define a netboxCustom fieldof type integer and apply it to IP Address objects. Then set plugin optionttl_custom_fieldto the name of that field.Now you can set TTL on each IP Address and any corresponding DNS records will get
that TTL value.ScreenshotsList of DNS zones:DNS Zone details:Scheduling Zone sync:Sync results for Zone: