Comments (7)
Hi Daniel,
thanks for the feedback! I'm glad you find the plugin useful.
As for integration with the rest of NetBox ... currently there is no automatism in place that would transfer data from NetBox to DNS zones. The reason is that linking existing data to DNS is by no means trivial and obvious - there are many possible scenarios that need to be addressed. So at the moment (there are some ideas being floated, but nothing tangible yet) there is no integrated mechanism to link IPAM data to NetBox DNS.
There is, however, a powerful scripting mechanism built into NetBox DNS that can be used to manually transfer existing IPAM data to NetBox DNS. Using a custom script it's possible to traverse e.g. existing NetBox 'IP Address' objects, take the 'DNS Name' and 'IP Address' field from them, and add them as A/AAAA records to NetBox DNS. Optionally, you could also create the forward and reverse zones while doing this - YMMV.
What's much more difficult is to create a mechanism to automatically synchronise IPAM and DNS data ... while things like duplicate addresses in different VRFs can be solved using views, there is the question of what should happen when IPAM data get updated or deleted, or when a device or virtual machine is removed (NetBox itself keeps the IPAM data, so probably the DNS records should be retained as well - but what should happen when an IP Address object or a Prefix object is deleted?
tl;dr
Tighter integration with IPAM is a planned feature, but not there yet (and will definitely take some time to be released), but custom scripts can be used to synchronise IPAM and DNS data and vice versa. When I find the time I can add some example scripts to the distribution so you have a base for your own solution - would that help you?
from netbox-dns.
Hello and thank you for your answer. It's a pity that synchronization isn't possible at the moment. Since I've only been dealing with Netbox for a short time, I'm not familiar with the scripts yet. Therefore, a few examples (like in the general readme for everyone) would be very helpful.
from netbox-dns.
I'll provide something as soon as I find the time. Stay tuned :-)
There's also more documentation in docs
and some example code (also an example script for exporting NetBox DNS data to BIND) in examples
, maybe there's some interesting stuff for you too.
from netbox-dns.
Hi Daniel, I have something for you to play with.
DNS Name Record Updater
Creates or update DNS address records in zones with a specified View (default is None
) for all IPAM 'IP Address' objects with a specified VRF (default is None
).
Records will only be created for existing zones, new zones are never created. If there is no direct parent zone in NetBox DNS, no multi-label host names will be created either. If there are multiple address records within the specified view pointing to an address, no record will be created or updated. However the script will happily create duplicate names with different addresses to facilitate round robin DNS schemes.
There is a switch that allows overwriting existing records, the default setting is not to overwrite any conflicting values.
IPAM Hostname Updater
Creates or updates the 'DNS Name' field for all IPAM 'IP Address' objects with a specified VRF (default is None
) from DNS address records in NetBox DNS.
If there are multiple address records pointing to an address the 'DNS Name' field will not be updated.
There is a switch that allows overwriting existing DNS names, the default setting is not to overwrite any conflicting values.
Installation
To install, follow the usual steps:
- Configure
SCRIPTS_ROOT
inconfiguration.py
- Copy the module
examples/custom-scripts/DNS_IPAM_Updater.py
containing the scripts to the directory specified inSCRIPTS_ROOT
Warning
These scripts are provided as they are. They have not been thoroughly tested and may corrupt your NetBox database, including IP Address and NetBox DNS objects. Use at your own risk as a basis for your own experiments. You better have a backup.
As always, feedback is welcome!
Have a nice evening,
Pete.
from netbox-dns.
Thank you very much for your work. I will work through your examples. I hope your work can help others too.
Should i close this issue or will you transform it into a feature-request?
from netbox-dns.
Should i close this issue or will you transform it into a feature-request?
As currently I'm in discussions about how an integration with IPAM could and should look like (the longer you think about it the less obvious the whole issue turns out to be), it'd difficult to formulate a sensible feature request ... so if you don't mind it would be OK to close it. On the other hand, as soon as PR #285 is merged it will be closed anyway.
from netbox-dns.
I should have tested a bit more as it turned out ... updating the IPAM 'DNS Name' stuff was not really working well. This is fixed now.
from netbox-dns.
Related Issues (20)
- Tips and tricks regarding automating DNS update HOT 1
- Trying to edit a zone in the admin interface raises a TypeError exception
- Migration issue when directly upgrading netbox and plugin HOT 7
- Having a record with a TTL value of 'None' can cause downstream problems HOT 4
- Record name and zone name validation for Bind zone file generation HOT 17
- Non-standard .in-addr.arpa zones cause the migration to fail HOT 3
- Wrong minimum NetBox version in README.md
- Deleting or renaming a name server does not remove or update the NS records pointing to it HOT 1
- MX record type limited to integer HOT 3
- Couldn't install HOT 3
- The test workflow fails in GitHub
- Not compatible with NetBox 3.4.7 HOT 1
- GitHub complains about outdated node12 actions being used
- NetBox 3.5 is incompatible with NetBox DNS 0.17.0
- Filter by id HOT 3
- Netbox webhook does not work on zone update event HOT 7
- 🔥🔥🔥 NetBox DNS has moved to a new home 🔥🔥🔥 HOT 6
- nameserver array is empty in netbox {{ data }} context data on zone create event. HOT 11
- Nested DNS Zone 'active' field is None when querying a DNS Record HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netbox-dns.