Alaith/lighthouse53

dynamic DNS through Route53

★ 0Forks 0PythonGitHub ↗Compare

README

Sambroandcannons

lighthouse53

Lighthouse53 is a simple dynamic DNS utility script. It upserts domain records in Amazon Web Services' Route53 with your network's public IP address.

Requrements

Usage

usage: lighthouse53.py [-h] [--loglevel {CRITICAL,ERROR,WARN,INFO,DEBUG}]
                       [--ttl TTL]
                       name hostedZoneId

UPSERT a Route53 resource with your current external IPv4 address

positional arguments:
  name                  The domain record name to upsert
  hostedZoneId          The hostedZoneId in which this route53 domain is
                        hosted

optional arguments:
  -h, --help            show this help message and exit
  --loglevel {CRITICAL,ERROR,WARN,INFO,DEBUG}
                        The logging level you wish to see in the log file.
                        Default: 'WARN'
  --ttl TTL             The time to live (ttl) that you wish to have assigned
                        for the record. Default: 7200

You will need to have your AWS credentials in a location that boto3 can find them by following their configuration guide.

Logging is done in /var/log/lighthouse53

Example:

From the shell:

./lighthouse53.py --ttl 1200 your.domain.com Z372ZZZOS353PM

I run the script with cron every 20 minutes to update a domain with my household IP:

*/20 * * * * /opt/lighthouse53/lighthouse53 --loglevel INFO --ttl 1200 redacted.xyz XXXXXXXXXXXXXX

License

This software is licensed under the GNU GPLv2

Contributors

Alaith

Issues