Skip to content

Update GCP Cloud DNS using the host's publicly visible IP address

License

Notifications You must be signed in to change notification settings

jasonrig/gcloud-dyndns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloud Platform DNS updater

This package updates a DNS zone hosted on Google Cloud DNS to the IP addresses of the local machine as visible from the internet using https://ifconfig.co/.

This script can be run in a cron job to periodically update DNS records of a GCP project on connections without a static IP assigned. Supports IPv4 and IPv6.

Installation

pip install -U git+https://github.com/jasonrig/gcloud-dyndns.git

Usage

$ update-gcloud-dns -h
usage: update-gcloud-dns [-h] [--ttl TTL] [--project_id PROJECT_ID]
                         [--force_update]
                         zone_name dns_name

positional arguments:
  zone_name             the name of the GCP zone to manage
  dns_name              the DNS name to update

optional arguments:
  -h, --help            show this help message and exit
  --ttl TTL             TTL of the update record
  --project_id PROJECT_ID
                        name of the GCP project
  --force_update        force the DNS update even if the record hasn't changed

Example:

update-gcloud-dns --project_id some-gcp-project-195432 mydnszone test.mydnszone.com

About

Update GCP Cloud DNS using the host's publicly visible IP address

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages