Skip to content

Azure Function App to Mimic DynDNS Server to update Azure Zone records

License

Notifications You must be signed in to change notification settings

scooter133/AzureFuncApp-DynDNS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzureFuncApp-DynDNS

Azure Function App Function to Mimic a DynDNS Server to update Azure Zone records.

If you are using Azure as your DNS Provider, you have had to create a sub-domain and delegate sub-domain to a DNS Provider that will support the Dynamic updates to support your clients with Dynamic IP Assignments. This is a PowerShell Script that is a Azure Functio App Function that your Dynamic DNS Client can connect to and submit DNS Changes to your Azure DNS Zone.

I am assiming some Azure Knowledge, that you already have your DNS Zone setup in Azure and you know how to configure your Dynamic DNS Client to talk to a DynDNS Server. I will Provide some sample configurations that I have used.

Creating and setting up the Function App Resouce

Create your Function App Resource

From your Function App Blade, Click +Create

Function App Basics

In theCreate Function App Blade Select your subscription Select a Resource Group from the list, or click Create new to Create a new one Enter a Function app name for your function. This needs to be unique name. Runtime stack select PowerShell Core Version Select 7.2 (or higher) Select the Region for your Function App Operating System select Windows Hosting Options and Plans select Consumption (serverless) image

Function App Storage

Storage Account You can Select an Existing storage account from the list, or you can use the default (New) AzDynDNS storage account

Blob service diagnostic settings select Don't Configure diagnostic settings now image

Function App Networking

Enable public access if using from outside a private connection, select on image

Function App Monitoring

Enable Application Insights can be left at No If you would like to have debugging or application insights, you will need to select Yes image

Function App Deployment

Basic authentication select Disable Continuous deployment select Disable image

Function App Tags

Add any tags that you would like to associate with this Function App Resource image

Function App Review + create

Review your settings and click Review + Create image

Function App Configuration

Go to your newly created Function App resource, Click Configuration to open the Configuration blade

image

Function App Configuration | Application Settings

Select + New Application setting

Function App Configuration | Application Settings | Add/Edit applicatiomn setting

This is where we will define the user's password or APIKey that the DynDNS Client will use to Authenticate with the Function App Code For the Name enter: APIKey For the Value enter a string that you will use as your Password/APIKey image

Save your Application Settings image

Enable the Az PowerShell Module

Under the Functions section, select App files Under the files drop-down select requirements.psd1 Uncomment the line 'Az' = '11.*' Click Save image

Enable the Function App Managed Identity

We need to enable the Function App's Managed Identity so we can assign it a DNS Contributor Role. From the Function App's blade, select Identity Under System assigned, Status select On Click Save to save the setting image

Creating and setting up the Function App Function

Creating the Function App Function

From the Function App's blade, select Overview From the Functions Section, select Create Function From the Function App's blade, select Identity image

Create Function

For this function we can use the Development environment of Develop in portal Under the Select a template use the HTTP trigger Template Under Template Details New Function: name the Function within the Function App Authorization level for added security select Function click Create image

Function | Integfration

image

Function | Integfration | Edit Trigger

image

Function | Code + Test

image

Settig up the Security

to allow the Function App to have permissions to the DNS Records, we need to give it DNS Contribute Role for the Resource Group or the Zone.

Access Security - Resouce Group | IAM

image

Access Security - Zone | IAM

image

Add Role Assignment | Role

image

Add Role Assignment | Members

image

Add Role Assignment | Select Managed identities

image

Add Role Assignment | Review + assign

image

About

Azure Function App to Mimic DynDNS Server to update Azure Zone records

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published