Skip to content

ThomasBuchinger/shell-ddns-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell DDNS Client

This is a DDNS client with minimal requirements.

  • posix-compatible shell (tested with bash on Fedora)
  • glibc or dig for DNS queries
  • curl for API calls (raise an issue if you need wget support)

Usage

  • Download the ddns-client.sh script and make it executeable
  • Set required parameters as ENV variable (see here)
  • Run script

Providers

DDNS Updates

  • Cloudflare: Update IPs ind Cloudflares DNS API

Query Public IP

  • Cloudflare (default): Using Cloudflares 1.1.1.1 DNS Server

Query DNS

  • getent (default): Part of glibc
  • dig

Reference

ℹ️ Note: All parameters must be set as ENV variables. There are no CLI-Arguments

General Parameters:

Name Description
DDNS_MODE lazy-update: check first, update only when required
update-now: Perform DDNS Update
check: Check if DDNS update is required
help (default): print help
noop: Do nothing. Allows script includes
DDNS_CONF Source/Read a file at startup and set ENV variables.
NOTE: The config-file is executed as a shel script!
DDNS_LOG_LEVEL 0...Only Fatal Errors
1...Info: Log important steps
2...Debug1: Log human-readable debug info
3...Debug2: Everything, including dumps
DDNS_IP_PROVIDER Set Public-IP-Query-Service
DDNS_PROVIDER DDNS_SERVICE
DDNS_HOSTNAMES List of hostnames (no domain) to update
DDNS_DOMAIN Your domain
DDNS_QUERY Query spcific DNS entry (must be FQDN) to check if DDNS-update is required.

Cloudflare (DDNS_PROVIDER=cloudflare):

Name Description
DDNS_CF_AUTHTYPE Use token or key authentication"
DDNS_CF_TOKEN Token. Permissions nedded: All Zones Read, DNS Edit"
DDNS_CF_APIUSER Cloudflare Username for apikey authentication"
DDNS_CF_APIKEY Cloudflare API Key for apikey authentication"

Testing

We are using BASH Automated Testing System.

# Make executable
make

# Run Tests
make test

About

zero dependency shell DDNS client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published