jfcampbelljr / Route53IPUpdater

Python program that updates your public IP address in route53. Basically a Dynamic DNS using AWS Route 53.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Route53IPUpdater

Gets public IP address and updates DNS Entry in Route 53

You will need to install AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) and the boto3 python library (pip3 install boto3) for this program to work.

Once AWS CLI is installed create a profile for the updater: aws configure --profile

Create a config.json file in the same directory as this script with the following content: { "domain_name": "-YOUR-DOMAIN-NAME", "record_name": "-A-RECORD-TO-UPDATE", "hosted_zone_id": "-ROUTE53-ZONE-ID", "aws_profile": "-AWSCLI-PROFILE", "logfilename":"PATH-TO-LOCATION-OF-LOG-FILE" "current_ip":"0.0.0.0" }

If you are going to run this using crontab, move the config.json to your home folder.

Adding the following to your crontab file (crontab -e) will cause this program to run every 15 minutes and send an update to route 53 if your public IP changes */15 * * * * python3 /home//PublicIPUpdate.py

About

Python program that updates your public IP address in route53. Basically a Dynamic DNS using AWS Route 53.


Languages

Language:Python 100.0%