That being said, I have a dynamic IP address for my house, and when my IP address changes, it used to break my S2S connection with Azure. This post is about how I fixed the problem.
The fist step is to create the service account that is going to be logging in to Azure to check and update the IP Address. I will be creating an unlicensed user on the .onmicrosoft domain to for this purpose.
As the Microsoft Online Data Service (MSOL) module did not come pre-installed, I ran the following to get started:
Next we are going to login and create the unlicensed service account. You will want to update the UPN and other variables accordingly:
Now that we have our service account created (an account that does not have access into our domain, O365, or Azure), it will need to be added to Access Control (IAM) for the Local Network Gateway in Azure.
With permissions set for Local Network Gateway, it is time to look at the current IP address of the gateway endpoint and compare it to the current local IP address endpoint. If the two IP addresses do not match, it is time to update your Local Network Gateway (in Azure).
Next we create some logging and logging clean-up:
And to finish off, we will connect all of our RRAS VpnS2SInterface connections.
Now let's put the whole thing together. First we create the service account and add their permissions:
Next we create the Update S2S file, and save the file to: 'C:\Scripts\Update S2S and RRAS.ps1'
Now that we are checking and updating our Local Network Gateway Connection IP address, we need to create a timer job that will check and update on a regular basis. Below is a script that will check every hour on the hour. Make sure that the Update S2S file path is set correctly.
great information.
ReplyDeletethanks for posting.
keep sharing.
Thanks for sharing the information..... keep sharing more articles
ReplyDeleteWe provide best Selenium training in Bangalore, automation testing with live projects. Cucumber, Java Selenium and Cucumber Training in Marathahalli
Cucumber Training in Bangalore
Java Selenium Automation Training in Bangalore
Selenium Training in Marathahalli
Manual testing training in bangalore
Software Testing Training in Bangalore
Selenium Software Training in Bangalore
Very interesting article to read it. I would like to thank you for the efforts you had made for writing this wonderful article. This article inspired me to read more. Keep sharing on updated posts…
ReplyDeleteLearn Digital Marketing Course in Bangalore with Live Project Work & Case Studies taught by Ranjan Jena (10Yrs Trainer). 100% Guarantee to Clear Job Interview.
SEO Course
PPC Google Adwords Course
Social Media Course
Google Analytics Course
Adobe Analytics Course
Graphic Designing Course