This is a simple client for the Dynamic Cloud DNS project.
Designed to run under Linux systemd, it consists of a small Python script, which uses the ipify API to retrieve the current IP and if the IP address has changed, calls the cloud function configured as per the instructions for Dynamic Cloud DNS.
Needs Python 3, requests and backoff
pip3 install -r requirements.txt
- Copy
dynamic_cloud_dns_client.py
to/usr/local/bin
- Copy
[email protected]
to/etc/systemd/system
- Copy
dynamic_cloud_dns_client_your.host
to/etc
(replace your.host with your actual hostname) - Edit
dynamic_cloud_dns_client_your.host
and fill in the environment variables - Enable and start your service:
systemctl enable [email protected]
Run sudo ./install.sh your.host
to do the first 3 steps. Run just sudo ./install.sh
to do the first two steps.
Probably a good idea to do this in a virtualenv:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -t test-requirements.txt
pytest
Copyright (c) 2020, Paul Adams. All rights reserved.
DCDNS Client is licensed under the MIT License.
See LICENSE for more details.