Skip to content

Scripting to update my home DNS records in AWS Route53 (due to dynamic WAN IP changes).

License

Notifications You must be signed in to change notification settings

rnebular/update-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

update-dns

Scripting to update my home DNS records in AWS Route53 due to dynamic WAN IP changes. Poor man's dynamic dns updater.

  • Needs AWS authentication setup before running. I use an AWS IAM User with API credentials.
  • Need to have the AWSPowerShell.NetCore module installed. If any other AWS tools module is to be used, modify the script to import that version. (Install-Module AWSPowerShell.Netcore)

usage

  1. Copy the script (script/check-my-ip.ps1) to your local user profile folder C:\Users\<username>\.
  2. Edit the script, changing "<username>" to an actual local user account.
  3. From a PowerShell prompt, simply run the script. C:\Users\<username>\check-my-ip.ps1

to setup as a scheduled task (cron)

Update and run:

$action = (New-ScheduledTaskAction -Execute 'C:\Users\<username>\check-my-ip.ps1')
$trigger = New-ScheduledTaskTrigger -Daily -At '4:00 AM'
$principal = New-ScheduledTaskPrincipal -UserId '<username>'
$settings = New-ScheduledTaskSettingsSet -RunOnlyIfNetworkAvailable -WakeToRun
$task = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger -Settings $settings

Register-ScheduledTask 'CheckMyIP-Daily-4AM' -InputObject $task

About

Scripting to update my home DNS records in AWS Route53 (due to dynamic WAN IP changes).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published