Dynamic DNS - Azure (22.01-RELEASE (arm))
-
I am updating this post as I've updated my device and software but am still having issues.
I am trying to enabled a single dynamic DNS record in my Azure AD DNS service which I want to update from my pfsense firewall - Netgate 3100, 22.01-RELEASE (arm).
I have configured everything per the instructions in the config page:
Service type: Azure DNS
Interface to monitor: WAN
hostname: myhost (per this post only hostname not FQDN)
Verbose Logging: Enabled
Username: {REDACTED note 1}
Password: {REDACTED note 1}
Zone ID: /subscriptions/{SUBSCRIPTION ID}/resourceGroups/coreresources/providers/Microsoft.Network/dnszones/{MYTLD}Note 1: I created an app registration in Azure following instructions for the ACME certificate client which is successfully creating DNS records in AzureDNS to validate the domain for certificate issue purposes. The AppID and ClientSecret are identical to that setup. The app has "DNS Zone Contributor" rights.
The Zone ID is copied directly from the Azure Console properties page from the Resource ID field.
When I try to run the update I get the following in my pfsense logs:
May 11 17:15:33 php-fpm 385 /services_dyndns.php: phpDynDNS (homeassistant.irwazu.co.uk): (Unknown Response) May 11 17:15:33 php-fpm 385 /services_dyndns.php: phpDynDNS (homeassistant.irwazu.co.uk): PAYLOAD: 400 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Dynamic DNS azure (homeassistant.irwazu.co.uk): _checkStatus() starting. May 11 17:15:33 php-fpm 385 </html> May 11 17:15:33 php-fpm 385 </body>\x0d May 11 17:15:33 php-fpm 385 </div>\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</p>\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message message, Object[] parameters)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.SingleBodyParameterMessageFormatter.DeserializeRequest(Message message, Object[] parameters)\x0d May 11 17:15:33 php-fpm 385 at System.ServiceModel.Dispatcher.SingleBodyParameterDataContractMessageFormatter.ReadObject(Message message)\x0d May 11 17:15:33 php-fpm 385 at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)\x0d May 11 17:15:33 php-fpm 385 <p> at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)\x0d May 11 17:15:33 php-fpm 385 <p>The server encountered an error processing the request. The exception message is 'There was an error deserializing the object of type Microsoft.WindowsAzure.Dns.Frontend.Common.DataStructures.API.Dns.CsmResourceRecordsPackageBody. The value '' cannot be parsed as the type 'Int64'.'. See server logs for more details. The exception stack trace is: </p>\x0d May 11 17:15:33 php-fpm 385 <p class="heading1">Request Error</p>\x0d May 11 17:15:33 php-fpm 385 <div id="content">\x0d May 11 17:15:33 php-fpm 385 <body>\x0d May 11 17:15:33 php-fpm 385 </head>\x0d May 11 17:15:33 php-fpm 385 <style>...trim...</style>\x0d May 11 17:15:33 php-fpm 385 <title>Request Error</title>\x0d May 11 17:15:33 php-fpm 385 <head>\x0d May 11 17:15:33 php-fpm 385 <html xmlns="http://www.w3.org/1999/xhtml">\x0d May 11 17:15:33 php-fpm 385 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\x0d May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Data: <?xml version="1.0" encoding="utf-8"?>\x0d May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: date: Wed, 11 May 2022 16:15:32 GMT May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: x-ms-routing-request-id: UKSOUTH:20220511T161533Z:bc54b428-a986-4b17-bd99-e4e761ad0219 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: x-ms-correlation-request-id: bc54b428-a986-4b17-bd99-e4e761ad0219 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: x-ms-request-id: bc54b428-a986-4b17-bd99-e4e761ad0219 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: x-powered-by: ASP.NET May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: server: Microsoft-IIS/10.0 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: x-ms-ratelimit-remaining-subscription-resource-requests: 11999 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: strict-transport-security: max-age=31536000; includeSubDomains May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: x-content-type-options: nosniff May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: content-type: text/html May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: content-length: 3221 May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: cache-control: private May 11 17:15:33 php-fpm 385 /services_dyndns.php: Response Header: HTTP/2 400 May 11 17:15:28 php-fpm 385 /services_dyndns.php: Dynamic DNS azure ({MYDOMAIN}): _update() starting. May 11 17:15:28 php-fpm 385 /services_dyndns.php: DynDns ({MYDOMAIN}): Dynamic Dns: More than 25 days. Updating. 1652285727 - 1642585106 > 2156400 May 11 17:15:28 php-fpm 385 /services_dyndns.php: Dynamic Dns ({MYDOMAIN}): Current WAN IP: 91.125.1.1 Cached IP: 0.0.0.0 May 11 17:15:28 php-fpm 385 /services_dyndns.php: Dynamic DNS azure ({MYDOMAIN}): 91.125.1.1 extracted from local system. May 11 17:15:27 php-fpm 385 /services_dyndns.php: Dynamic DNS ({MYDOMAIN}): running get_failover_interface for wan. found pppoe0 May 11 17:15:27 php-fpm 385 /services_dyndns.php: Dynamic DNS azure ({MYDOMAIN}): 91.125.1.1 extracted from local system. May 11 17:15:27 php-fpm 385 /services_dyndns.php: May 11 17:15:27 php-fpm 385 /services_dyndns.php: Dynamic DNS: updatedns() starting
Note 2: IP address altered in logs
Can anyone point me in the direction of what I have set up wrong?Thanks
David
-
Is anyone else able to verify this bug? I would love to get this confirmed so I can log it as a confirmed defect into Redmine for resolution, but am cautious about doing so before someone else confirms.
Thank you
-
@DavidIr I just tried configuring Azure DNS in Dynamic DNS and I am seeing the same. I am on version 23.05-RELEASE.
The record exists already in the zone, I am trying to get pfsense to keep it up-to-date.
Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS azure (test.<mydomain.com>): _update() ending. Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS azure (test.<mydomain.com>): _checkStatus() ending. Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: phpDynDNS (test.<mydomain.com>): (Unknown Response) Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: phpDynDNS (test.<mydomain.com>): PAYLOAD: 400 Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS azure (test.<mydomain.com>): _checkStatus() starting. Jun 3 16:32:37 php-fpm 13896 </html> Jun 3 16:32:37 php-fpm 13896 </body>\x0d Jun 3 16:32:37 php-fpm 13896 </div>\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</p>\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message message, Object[] parameters)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.SingleBodyParameterMessageFormatter.DeserializeRequest(Message message, Object[] parameters)\x0d Jun 3 16:32:37 php-fpm 13896 at System.ServiceModel.Dispatcher.SingleBodyParameterDataContractMessageFormatter.ReadObject(Message message)\x0d Jun 3 16:32:37 php-fpm 13896 at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)\x0d Jun 3 16:32:37 php-fpm 13896 <p> at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)\x0d Jun 3 16:32:37 php-fpm 13896 <p>The server encountered an error processing the request. The exception message is 'There was an error deserializing the object of type Microsoft.WindowsAzure.Dns.Frontend.Common.DataStructures.API.Dns.CsmResourceRecordsPackageBody. The value '' cannot be parsed as the type 'Int64'.'. See server logs for more details. The exception stack trace is: </p>\x0d Jun 3 16:32:37 php-fpm 13896 <p class="heading1">Request Error</p>\x0d Jun 3 16:32:37 php-fpm 13896 <div id="content">\x0d Jun 3 16:32:37 php-fpm 13896 <body>\x0d Jun 3 16:32:37 php-fpm 13896 </head>\x0d Jun 3 16:32:37 php-fpm 13896 <style>BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}</style>\x0d Jun 3 16:32:37 php-fpm 13896 <title>Request Error</title>\x0d Jun 3 16:32:37 php-fpm 13896 <head>\x0d Jun 3 16:32:37 php-fpm 13896 <html xmlns="http://www.w3.org/1999/xhtml">\x0d Jun 3 16:32:37 php-fpm 13896 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\x0d Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Data: <?xml version="1.0" encoding="utf-8"?>\x0d Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: date: Sat, 03 Jun 2023 14:32:37 GMT Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: x-ms-routing-request-id: GERMANYWESTCENTRAL:20230603T143237Z:62223bf7-3bc2-40d0-ba3a-8f0576793a0c Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: x-ms-correlation-request-id: 62223bf7-3bc2-40d0-ba3a-8f0576793a0c Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: x-ms-request-id: 62223bf7-3bc2-40d0-ba3a-8f0576793a0c Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: x-powered-by: ASP.NET Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: server: Microsoft-IIS/10.0 Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: x-ms-ratelimit-remaining-subscription-resource-requests: 11999 Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: strict-transport-security: max-age=31536000; includeSubDomains Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: x-content-type-options: nosniff Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: content-type: text/html Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: content-length: 3221 Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: cache-control: private Jun 3 16:32:37 php-fpm 13896 /services_dyndns_edit.php: Response Header: HTTP/2 400 Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS azure (test.<mydomain.com>): _update() starting. Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS (test.<mydomain.com>): running get_failover_interface for wan. found pppoe0 Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS azure (test.<mydomain.com>): <myip> extracted from local system. Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS azure (test.<mydomain.com>): _checkIP() starting. Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Dynamic DNS: updatedns() starting Jun 3 16:32:35 check_reload_status 436 Syncing firewall Jun 3 16:32:35 php-fpm 13896 /services_dyndns_edit.php: Configuration Change: admin@192.168.20.199 (Local Database): Dynamic DNS client configured.
(private info redacted from logs)