Skip to main content
CloudEnterprise

Technical Information

Microsoft DNS to NetBox Object Mapping

Object Type Mapping

Microsoft DNS ObjectNetBox ObjectNotes
A record (IPv4)IPAddressAddress as /32 CIDR; dns_name set to FQDN; status = active
AAAA record (IPv6)IPAddressAddress as /128 CIDR; dns_name set to FQDN; status = active

Only forward-lookup zones are processed. Reverse lookup zones and autocreated zones are excluded.

IP Address Field Mapping

NetBox FieldSourceNotes
addressAddress field from DNS recordFormatted as CIDR - /32 for A records, /128 for AAAA records
dns_nameHostName + ZoneNameConstructed as HostName.ZoneName; uses ZoneName alone when HostName is @ or empty
statusStaticAlways active
descriptionStaticMicrosoft DNS - {host}, A record or Microsoft DNS - {host}, AAAA record

Multiple DNS Names

When more than one DNS record points to the same IP address, the integration:

  1. Collects all FQDNs for that IP across all zones
  2. Sorts them alphabetically
  3. Sets the alphabetically first FQDN as dns_name
  4. Stores all remaining FQDNs in the msft_dns_additional_names custom field as a JSON array

Example: IP 10.0.1.10 with A records for portal.corp.example.com, web1.corp.example.com, and www.corp.example.com:

  • dns_name: portal.corp.example.com (alphabetically first)
  • msft_dns_additional_names: ["web1.corp.example.com", "www.corp.example.com"]

Custom Fields

The following custom field is created during bootstrap mode and applied to IP Address objects:

Custom Field NameLabelTypeObject TypeDescription
msft_dns_additional_namesMicrosoft DNS Additional NamesJSONipam.ipaddressAdditional DNS names pointing to this IP address

Custom fields are read-only in the NetBox UI (ui_editable: no).


Tags

All IP Address entities ingested by the Microsoft DNS integration are tagged with:

TagDescription
microsoftApplied to all entities from this integration
dnsIdentifies objects sourced from a DNS server
discoveredStandard tag applied to all controller integration objects
msft-dns-{host}Unique per-agent tag identifying the source DNS server; e.g., msft-dns-dns-server.corp.example.com

Zone Filtering Behavior

ScenarioResult
Neither INCLUDE_ZONES nor EXCLUDE_ZONES setAll forward-lookup zones are synced
INCLUDE_ZONES setOnly zones matching at least one include pattern are synced
EXCLUDE_ZONES setZones matching any exclude pattern are removed from the result set
Both setInclude filter applied first, then exclude filter
INCLUDE_ZONES: [] (empty list)Zero zones synced
EXCLUDE_ZONES: [] (empty list)No zones excluded (equivalent to omitting the key)
All zones filtered out after discoveryWarning logged

Patterns use fnmatch glob syntax. Matching is case-insensitive (RFC 1035). Filtering happens before per-zone record queries, so excluded zones incur no API round-trip.


Configuration Reference

ParameterTypeDefaultDescription
MSFT_DNS_HOSTstringrequiredWindows DNS Server hostname or IP address
MSFT_DNS_USERNAMEstringrequiredWinRM service account (typically DOMAIN\username)
MSFT_DNS_PASSWORDstringrequiredWinRM service account password
MSFT_DNS_USE_SSLbooltrueUse HTTPS WinRM on port 5986; set false for HTTP on port 5985
MSFT_DNS_PORTint5986 / 5985Override the default WinRM port
MSFT_DNS_VERIFY_SSLboolfalseVerify the WinRM TLS certificate; off by default as Windows servers commonly use self-signed certificates
MSFT_DNS_INCLUDE_ZONESlist[string]null (all zones)Glob patterns or exact zone names; only matching zones are synced
MSFT_DNS_EXCLUDE_ZONESlist[string]null (none excluded)Glob patterns or exact zone names; applied after include filter
BOOTSTRAPboolfalseWhen true, emits only custom field definitions with no DNS server connection required

Connection Details

The integration uses the pypsrp library to connect over WinRM/PSRP with NTLM authentication. The following PowerShell cmdlets are executed on the target server:

CmdletPurpose
Get-DnsServerZoneRetrieves all DNS zones; filtered to forward-lookup, non-autocreated zones
Get-DnsServerResourceRecord -RRType ARetrieves A records for each zone
Get-DnsServerResourceRecord -RRType AAAARetrieves AAAA records for each zone