dns/dyndns: provider for Azure DNS - #1547
Closed
martgras wants to merge 2 commits into
Closed
Conversation
Member
|
@martgras sorry for the delay, work is too busy at the moment :( merged another PR and now there's a bit of merge conflicts. would you mind taking care of those and I'll try to test this next week. Thank you, |
Contributor
Author
|
@fichtner merged the changes |
fichtner
pushed a commit
that referenced
this pull request
Jan 3, 2020
Member
|
Merged manually via ab0ccc3, thanks! ❤️ |
|
MV opnsense Azure DNS does not update the public IP address, the domain updates the private IP address, does anyone know how to update my domain with the public IP? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for Azure DNS in the Dynamic DNS service
Usage instruction
Prerequisites
You need the Azure Cli 2.0 tools to create a service principal for access to your DNS Zone.
Either install Azure Cli 2.0 locally or use the Azure Cloud Shell
See https://docs.microsoft.com/en-us/cli/azure/overview?view=azure-cli-latest
Log-in to Azure
(not required when using the Azure Cloud Shell)
[ { "cloudName": "AzureCloud", "id": "12345678-9abc-def0-1234-567890abcdef", "isDefault": true, "name": "myAzureSubscription", "state": "Enabled", "tenantId": "11111111-2222-3333-4444-555555555555", "user": { "name": "someone@example.com", "type": "user" } } ]List your DNS Zones
[ { "etag": "00000002-0000-0000-f641-73c64955d301", "id": "/subscriptions/12345678-9abc-def0-1234-567890abcdef/resourceGroups/exampledns_rg/providers/Microsoft.Network/dnszones/example.com", "location": "global", "maxNumberOfRecordSets": 5000, "name": "example.com", "nameServers": [ "ns1-02.azure-dns.com.", "ns2-02.azure-dns.net.", "ns3-02.azure-dns.org.", "ns4-02.azure-dns.info." ], "numberOfRecordSets": 11, "resourceGroup": "exampledns_rg", "tags": {}, "type": "Microsoft.Network/dnszones" } ]The return "id" field contains the resource ID for the DNS Zone
Create a service principal
The service principal is used to grant acme.sh access to the DNS Zone using the id value from the previous commands output
(See https://docs.microsoft.com/en-us/cli/azure/ad/sp?view=azure-cli-latest#az_ad_sp_create_for_rbac for more details )
{ "appId": "3b5033b5-7a66-43a5-b3b9-a36b9e7c25ed", "displayName": "AcmeDnsValidator", "name": "http://AcmeDnsValidator", "password": "1b0224ef-34d4-5af9-110f-77f527d561bd", "tenant": "11111111-2222-3333-4444-555555555555" }Use the returned appId value as the username and note also the password as the password will be shown only once
Example using the above values to create a dynamic DNS entry for the host dyndemo.example.com
Service type: AzureDNS (or AzureDNS(v6)
Interface to monitor: WAN
Hostname: dyndemo
Username: 3b5033b5-7a66-43a5-b3b9-a36b9e7c25ed
Password: 1b0224ef-34d4-5af9-110f-77f527d561bd
Resource Id: /subscriptions/12345678-9abc-def0-1234-567890abcdef/resourceGroups/exampledns_rg/providers/Microsoft.Network/dnszones/example.com
TTL: any value > 0 in seconds
Description: My Dynamic DNS on Azure