Sign inSign up

rogelioo/ddns-aws-client

By rogelioo

•Updated almost 6 years ago

Image
0

6.8K

rogelioo/ddns-aws-client repository overview

⁠ddns-aws

This is a DDNS (Dynamic DNS) tool to update your domain with your router current IP. The project has two components:

  • The server, which gets the IP from headers, check if it has changed (based on last_ip query parameter) and set the Route53 domain record pointing to the IP.
  • The client, which periodically calls the server with the last_ip query parameter and set it with the response.

⁠How to use it?

⁠Server deployment

The server is a AWS lambda function created with serverless framework. To deploy it some env variables should be set and then the deploy command should be run:

cd lambda
export HOSTED_ZONE_ID=<YOUR HOSTED ZONE ID>
export RECORD_NAME=<YOUR RECORD NAME: foo.example.com>
serverless deploy --stage pro --env production

WARNING: AWS user has to be logged-in on the system and the user need the required permissions to deploy with serverless framework.

The result of the deploy command will return a URL and an API key that should be saved to configure the client.

⁠Client configuration

The client is a bash script. Additional files are provided to configure systemctl service and timer. The client could be configured in something like a Raspberry PI that is always running.

Follow the next steps to configure the client:

  • Replace <API_KEY> and <URL> from client/ddns-aws-client.service.
  • Move client/ddns-aws-client.sh to /usr/bin/.
  • Move client/ddns-aws-client.service and client/ddns-aws-client.timer to /etc/systemd/system/.
  • sudo systemctl disable ddns-aws-client
  • sudo systemctl enable ddns-aws-client.timer

It can be checked that the timer is running with command: sudo systemctl status ddns-aws-client.

⁠Docker

Run client executing the following command:

docker run rogelioo/ddns-aws-client:latest -v /tmp/ddns_cache/:/tmp/ddns_cache/ --api-key <API_KEY> --url <URL>

Tag summary

Content type

Image

Digest

Size

4.7 MB

Last updated

almost 6 years ago

docker pull rogelioo/ddns-aws-client