Add configurable post-update journal synchronization via rndc sync -clean. Separate RFC 2136 update settings from local RNDC control settings. Run synchronization only after a successful nsupdate request and only when DYNDNS_RNDC_SYNC_CLEAN is enabled. Treat RNDC synchronization failures as warnings because the DNS update has already been accepted and named retains the authoritative state in its journal.
174 lines
6.3 KiB
Plaintext
174 lines
6.3 KiB
Plaintext
# dynDNS configuration example
|
|
# Copy this file to 'vars' and adjust as needed.
|
|
# Warning: do not edit vars.example directly!
|
|
|
|
# ------------------------------------------------------------------
|
|
# GENERAL
|
|
# ------------------------------------------------------------------
|
|
|
|
# Base directory of dynDNS configuration (defaults to script directory)
|
|
#set_var DYNDNS "${0%/*}"
|
|
|
|
# Batch mode:
|
|
# Leave empty for interactive/normal console output.
|
|
# Set to any non-empty string to suppress notices on stdout.
|
|
#set_var DYNDNS_BATCH ""
|
|
|
|
# ------------------------------------------------------------------
|
|
# RUNTIME DIRECTORIES
|
|
# ------------------------------------------------------------------
|
|
|
|
# Temporary working directory used for per-run temp files and directories
|
|
#set_var DYNDNS_TEMP_DIR "$DYNDNS/tmp"
|
|
|
|
# ------------------------------------------------------------------
|
|
# LOGGING
|
|
# ------------------------------------------------------------------
|
|
|
|
# Directory for dynDNS log files
|
|
#set_var DYNDNS_LOG_DIR "$DYNDNS/log"
|
|
|
|
# Main log file
|
|
#set_var DYNDNS_LOG_FILE "$DYNDNS_LOG_DIR/dyndns_${DYNDNS_BIND_ZONE:-default}.log"
|
|
|
|
# File used to track the last zone update timestamp/state
|
|
#set_var DYNDNS_LOG_UPDATE_FILE "$DYNDNS_LOG_DIR/lastZoneUpdate_${DYNDNS_BIND_ZONE:-default}.log"
|
|
|
|
# Log level controls verbosity of logging output:
|
|
# 0 = off : Disable all logging output
|
|
# 1 = debug : Detailed diagnostics for troubleshooting and development
|
|
# 2 = info : Informational messages about normal operations
|
|
# 3 = warning : Warnings about unusual but non-fatal conditions
|
|
# 4 = error : Errors affecting functionality
|
|
# 5 = critical : Severe failures requiring immediate attention
|
|
#set_var DYNDNS_LOG_LEVEL 3
|
|
|
|
# ------------------------------------------------------------------
|
|
# DATABASE ACCESS
|
|
# ------------------------------------------------------------------
|
|
|
|
# Database client program.
|
|
# Example values:
|
|
# /usr/bin/mariadb
|
|
# mariadb
|
|
# /usr/bin/mysql
|
|
#set_var DYNDNS_DB_PROGRAM "/usr/bin/mariadb"
|
|
|
|
# Database host
|
|
#set_var DYNDNS_SQL_HOST "localhost"
|
|
|
|
# Optional client option group suffix.
|
|
# If set, dyndns uses:
|
|
# --defaults-group-suffix=$DYNDNS_SQL_GROUP
|
|
# and usually reads credentials from my.cnf / client config.
|
|
#set_var DYNDNS_SQL_GROUP "dyndns"
|
|
|
|
# Database name
|
|
#set_var DYNDNS_SQL_DATABASE "dyndns_database"
|
|
|
|
# Database login credentials.
|
|
# These are mainly used when DYNDNS_SQL_GROUP is unset/empty.
|
|
#set_var DYNDNS_SQL_USER "dyndns_user"
|
|
#set_var DYNDNS_SQL_PASS "<REPLACE_WITH_STRONG_PASSWORD>"
|
|
|
|
# Additional database client options, if needed.
|
|
# Example:
|
|
# "--protocol=tcp"
|
|
# "--socket=/run/mysqld/mysqld.sock"
|
|
#set_var DYNDNS_SQL_OPTIONS ""
|
|
|
|
# ------------------------------------------------------------------
|
|
# DNS / BIND
|
|
# ------------------------------------------------------------------
|
|
|
|
# Authoritative DNS server used for RFC 2136 dynamic update operations.
|
|
#
|
|
# This address is used by nsupdate on DNS port 53. It must point to the
|
|
# authoritative BIND listener and matching view serving DYNDNS_BIND_ZONE.
|
|
#
|
|
# Do not use a local recursive-only listener or a non-authoritative view.
|
|
#set_var DYNDNS_BIND_SERVER "127.0.0.1"
|
|
|
|
# Service name used when reloading/reconfiguring the name server
|
|
#set_var DYNDNS_BIND_SERVICE "named.service"
|
|
|
|
# DNS zone handled by dynDNS
|
|
#set_var DYNDNS_BIND_ZONE "example24.com"
|
|
|
|
# TSIG key file or key identifier used for nsupdate access.
|
|
#
|
|
# This key should be restricted in BIND with update-policy and must not be
|
|
# confused with the RNDC control key configured below.
|
|
#set_var DYNDNS_BIND_ZONE_KEY "keyfile"
|
|
|
|
# Directory containing the primary zone files
|
|
#set_var DYNDNS_BIND_ZONE_DIR "/var/named/zones"
|
|
|
|
# Main unsigned zone file
|
|
#set_var DYNDNS_BIND_ZONE_FILE "$DYNDNS_BIND_ZONE_DIR/$DYNDNS_BIND_ZONE.zone"
|
|
|
|
# Signed zone file, if DNSSEC signing is used externally
|
|
#set_var DYNDNS_BIND_ZONE_FILE_SIGNED "$DYNDNS_BIND_ZONE_DIR/$DYNDNS_BIND_ZONE.zone.signed"
|
|
|
|
# Default TTL for generated/managed records
|
|
#set_var DYNDNS_BIND_ZONE_TTL 300
|
|
|
|
# ------------------------------------------------------------------
|
|
# RNDC POST-UPDATE ZONE SYNCHRONIZATION
|
|
# ------------------------------------------------------------------
|
|
|
|
# Local BIND control endpoint used for optional post-update synchronization.
|
|
#
|
|
# rndc connects to named's control interface, normally TCP port 953.
|
|
# This is independent from DYNDNS_BIND_SERVER, which is used by nsupdate
|
|
# against DNS port 53.
|
|
#set_var DYNDNS_RNDC_SERVER "127.0.0.1"
|
|
|
|
# RNDC control key authorized by the named controls {} configuration.
|
|
#
|
|
# This key is intentionally separate from DYNDNS_BIND_ZONE_KEY. The latter is
|
|
# used by nsupdate for RFC 2136 DNS updates, while this key authorizes BIND
|
|
# administrative operations such as "rndc sync -clean".
|
|
#set_var DYNDNS_RNDC_KEY "/etc/named/rndc.key"
|
|
|
|
# Synchronize dynamic zone journals after a successful nsupdate request.
|
|
#
|
|
# 0 = disabled; named handles zone dumps using its normal maintenance schedule.
|
|
# 1 = execute "rndc sync -clean <zone>" after a successful DNS update.
|
|
#
|
|
# A failed synchronization must be logged as a warning only. The dynamic update
|
|
# remains successful because named retains the authoritative state in its
|
|
# journal until the next successful zone dump.
|
|
#set_var DYNDNS_RNDC_SYNC_CLEAN 0
|
|
|
|
# ------------------------------------------------------------------
|
|
# MEMBER DEFAULTS
|
|
# ------------------------------------------------------------------
|
|
|
|
# These values are typically supplied at runtime by command line options
|
|
# or frontend/backend integration, but they may also be preset here.
|
|
|
|
# Fully qualified hostname of the dynDNS member
|
|
#set_var DYNDNS_MEMBER_HOSTNAME "host.example24.com"
|
|
|
|
# Contact e-mail address of the dynDNS member
|
|
#set_var DYNDNS_MEMBER_EMAIL "admin@example24.com"
|
|
|
|
# Password or shared secret used during member creation/authentication
|
|
#set_var DYNDNS_MEMBER_PASS "<REPLACE_WITH_STRONG_PASSWORD>"
|
|
|
|
# ------------------------------------------------------------------
|
|
# OPTIONAL COMMAND HOOKS
|
|
# ------------------------------------------------------------------
|
|
|
|
# Reserved section for optional local extensions.
|
|
# Only enable such commands if your dyndns.sh implementation actually evaluates them.
|
|
|
|
# Commands to run before a zone update
|
|
# Example:
|
|
# set_var DYNDNS_CMD_PRE "/usr/local/libexec/dyndns-pre-update.sh"
|
|
|
|
# Commands to run after a successful zone update
|
|
# Example:
|
|
# set_var DYNDNS_CMD_POST "/usr/local/libexec/dyndns-post-update.sh"
|