yabddnsd
Releases
Yet another bash dynamic DNS daemon
- Type: Command line application (daemon)
- Platforms: Linux, possibly other Unix-style operating systems
- Written in: Bash
Manual pages
Features
- Support for both IPv4 and IPv6, also simultaneously if desired
- Comes with extensive documentation
-
Support for these dynamic DNS service providers:
- FreeDNS
- Duck DNS
- deSEC
- Custom: Support for other service providers can be implemented by declaring bash functions in configuration files
-
Offers multiple methods of detecting the host's current public IP address:
- File: Extract the public IP address from a text file
- NetDev: Read the address from network device(s) (automatically filters out private/special/deprecated/temporary addresses)
- Upnp: Use UPnP to determine the public IP address (IPv4 only)
- Url: Extract the public IP address from a web site
- Custom: Support for other methods can be implemented by declaring bash functions in configuration files
- Does not hammer the service provider with update requests, instead only sends an update request if the DNS entry is out of sync
- Uses HTTPS for update requests, so that your secret authentication tokens are not being transmitted in plain text
- Does not rely on the service provider automatically detecting the IP address that should be set, instead sends requests that specify the IP address
- Comes with a systemd instance service based on the --config-file option, "yabddnsd@.service"
- Internal functionality can be tapped for other uses through the --call-function option
- Reasonably well-structured and documented source code
- Last but not least, it works – if it wouldn't, you would not be able to view this web site
Systemd example
Intention: Maintaining both the A (IPv4 address) and AAAA (IPv6 address) DNS records at the dynamic DNS service provider "Duck DNS" for the domain name "eomanis.duckdns.org" using a systemd instance service that runs yabddnsd for a single configuration file "/etc/yabddnsd/eomanis.duckdns.org.conf".
In bash, such an instance may be created like this (as root):
systemctl enable yabddnsd@"$(systemd-escape '/etc/yabddnsd/eomanis.duckdns.org.conf')".service
Configuration file "/etc/yabddnsd/eomanis.duckdns.org.conf"
domainName=eomanis.duckdns.org
updateProtocol=DuckDns
# IPv4 maintenance
authTokenIpv4=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
detectPublicAddrIpv4=( "Upnp" )
# IPv6 maintenance
authTokenIpv6=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
detectPublicAddrIpv6=( "NetDev@@br0" )
Journalctl excerpt
Aug 22 19:46:34 mysystem systemd[1]: Started yabddnsd --configFile "/etc/yabddnsd/eomanis.duckdns.org.conf".
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Sourcing configuration file "/etc/yabddnsd/eomanis.duckdns.org.conf"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO This is yabddnsd 0.6.5
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Domain name: "eomanis.duckdns.org"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Update protocol: "DuckDns"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO IPv4 authentication token: "********************************XXXX"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO IPv6 authentication token: "********************************XXXX"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Public IPv4 address detection method(s): "Upnp"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Public IPv6 address detection method(s): "NetDev@@br0"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Sleeping time between iterations: "6m"
Aug 22 19:46:34 mysystem yabddnsd[541]: INFO Entering main loop
Aug 23 04:39:15 mysystem yabddnsd[541]: INFO Domain "eomanis.duckdns.org": Updating IPv4 address to "91.4.111.1" using protocol "DuckDns"
Aug 23 04:39:17 mysystem yabddnsd[541]: INFO Domain "eomanis.duckdns.org": Updating IPv6 address to "2003:d8:6722:a000:47:a5ff:fe2e:30ba" using protocol "DuckDns"
Aug 24 04:39:18 mysystem yabddnsd[541]: INFO Domain "eomanis.duckdns.org": Updating IPv4 address to "91.4.111.89" using protocol "DuckDns"
Aug 24 04:39:20 mysystem yabddnsd[541]: INFO Domain "eomanis.duckdns.org": Updating IPv6 address to "2003:d8:672a:ce00:47:a5ff:fe2e:30ba" using protocol "DuckDns"
Aug 25 04:39:23 mysystem yabddnsd[541]: INFO Domain "eomanis.duckdns.org": Updating IPv4 address to "91.2.30.102" using protocol "DuckDns"
Aug 25 04:39:25 mysystem yabddnsd[541]: INFO Domain "eomanis.duckdns.org": Updating IPv6 address to "2003:d8:6728:9900:47:a5ff:fe2e:30ba" using protocol "DuckDns"
See also
License
GNU General Public License version 3
Packages
Browseable sources
These source files of the latest tag can be viewed in the browser:
Releases
yabddnsd-0.11.0
21 September 2023 (2023-09-21 18:11:24 UTC)
yabddnsd-0.11.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.11.0-1-ubuntu-20.04-focal_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.11.0-1-ubuntu-22.04-jammy_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.11.0-1-debian-11-bullseye_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
- Remove trailing whitespace
- Add support for update protocols that set both the IPv4 and IPv6 address with a single request
- Fix handling of CNAME entries when resolving a domain name's IP addresses
- Implement functions for log messages
- Fix documentation of the --help argument
yabddnsd-0.10.1
11 September 2023 (2023-09-11 22:05:34 UTC)
yabddnsd-0.10.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.10.1-1-ubuntu-20.04-focal_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.10.1-1-ubuntu-22.04-jammy_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.10.1-1-debian-11-bullseye_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
- Promote log messages about sourced configuration files from level DEBUG to INFO
yabddnsd-0.10.0
11 September 2023 (2023-09-11 21:41:55 UTC)
yabddnsd-0.10.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.10.0-1-ubuntu-20.04-focal_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.10.0-1-ubuntu-22.04-jammy_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.10.0-1-debian-11-bullseye_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
- Update manual page to mention deSEC support
- Do not exit with value 1 when --help is called
- Implement user-level configuation files (~/.config/yabddnsd)
yabddnsd-0.9.0
10 September 2023 (2023-09-10 18:09:58 UTC)
yabddnsd-0.9.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.9.0-1-ubuntu-20.04-focal_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.9.0-1-ubuntu-22.04-jammy_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.9.0-1-debian-11-bullseye_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
- Do not force use of IPv4/IPv6 when updating IPv4/IPv6 addresses
- Add support for deSEC (desec.io, subdomains of dedyn.io)
yabddnsd-0.8.0
16 April 2020 (2020-04-16 17:59:59 UTC)
yabddnsd-0.8.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.8.0-1-ubuntu-20.04-focal_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.8.0-1-ubuntu-22.04-jammy_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
yabddnsd_0.8.0-1-debian-11-bullseye_all.deb
SHA256 checksum
SHA384 checksum
PGP signature
- Call "dig" with +noall +answer +short, which vastly simplifies parsing of its output
- Fix a bug where valid text lines were filtered from the output of "dig" in some cases
- Add various *Default function overloadings that use the global variables instead of function arguments
- Add "head" to the list of optionally required programs
- Use arguments instead of global variables for getIpvXAddrOfThisHost
- Add --dns-server argument to specify a DNS server for all operations
- Add overloading functions "addTxtRecord" and "removeTxtRecord"
- Fix shellcheck warning in joinLines
- Add functions for DNS TXT record manipulation (Duck DNS only)
- Add functions for DNS TXT record retrieval: getTxtRecordsOfDomain
- Add support for a custom prefix and suffix to joinLines
- Reduce log level for the notifications about a configuration file being sourced from INFO to DEBUG
- Scan the arguments for "--verbose" before sourcing configuration files
yabddnsd-0.7.3
06 March 2020 (2020-03-06 14:58:21 UTC)
yabddnsd-0.7.3.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- When starting the procd init script, report the names of the started instances
- Startup summary: Do not mention IP address detection methods that will not be used
- Handle unusual exit code 1 in getMethodName that only occurs when yabddnsd is running on OpenWRT from its procd init script
- Make invocations of head compatible with busybox head
- Fix grep regular expression in getIpv4AddrsOfDomainFromDig
yabddnsd-0.7.2
04 March 2020 (2020-03-04 22:22:35 UTC)
yabddnsd-0.7.2.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Ignore IPv4 and IPv6 addresses flagged as "temporary" when reading the current address from network interfaces
yabddnsd-0.7.1
17 February 2020 (2020-02-17 11:36:29 UTC)
yabddnsd-0.7.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Add an OpenWRT procd init script that runs a yabddnsd instance for each /etc/yabddnsd/instances/*.conf file
- Carve out the systemd-related stuff (unit file and manual page section) into its own "systemd" sub-directory
- Indent the usage section in the help message
- Add a usage section and summary to the README
- In verbose mode, report missing programs that the application can run without but with reduced functionality
- Only exit with an error if absolutely required programs are not available
yabddnsd-0.7.0
14 February 2020 (2020-02-14 14:11:33 UTC)
yabddnsd-0.7.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Add some more TODOs for feature work
- Small change to the manual page
- Remove wrong call of "shift" in getGlobalConfigurationFiles, improve phrasing of some warnings
- README, yabddnsd@.service: Change --configFile to --config-file
- Change the command line arguments from --camelCase to --regular-style
- Only mention missing UPnP support in --verbose mode
- Implement reading of global configuration files from /usr/lib/yabddnsd, /etc/yabddnsd and /run/yabddnsd
yabddnsd-0.6.8
16 January 2020 (2020-01-16 18:27:04 UTC)
yabddnsd-0.6.8.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- IP address lookups with dig: Do not place protocol restrictions on dig, i.e. allow dig to look up IPv4 addresses over IPv6 and vice-versa
- Clean up and improve the formatting of the the manual page's code
yabddnsd-0.6.7
04 November 2019 (2019-11-04 22:46:30 UTC)
yabddnsd-0.6.7.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Fix some code style issues pointed out by shellcheck
yabddnsd-0.6.6
20 October 2019 (2019-10-20 23:50:03 UTC)
yabddnsd-0.6.6.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Add some more information about the built-in update protocols to the manual page
- Add "Restart=on-failure; RestartSec=10" to the [Service] section of the systemd service definition
- Make the updateIpv?AddrWith* functions work better without inherit_errexit
yabddnsd-0.6.5
22 August 2019 (2019-08-22 17:28:02 UTC)
yabddnsd-0.6.5.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Implement a less heavyweight solution for the "write error: Broken pipe" messages
- Have another shot at suppressing useless messages like "/usr/bin/yabddns: line 219: echo: write error: Broken pipe"
yabddnsd-0.6.4
19 August 2019 (2019-08-19 20:24:20 UTC)
yabddnsd-0.6.4.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Remove some obsolete TODOs
- Update protocol "FreeDns": Automatically use either "FreeDnsV1" or "FreeDnsV2" depending on the authentication token
- Ignore certain non-zero "wget" exit codes when updating IP addresses
- Update protocols "FreeDnsV1" and "FreeDnsV2": Validate the response returned from the update request
- Implement FreeDNS update protocol version 2 as "FreeDnsV2" ([v6].sync.afraid.org)
- Fix error message for an invalid value of --listFunctions
yabddnsd-0.6.3
09 August 2019 (2019-08-09 22:33:24 UTC)
yabddnsd-0.6.3.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Fixes/improvements for some comments
- Update the manual page to mention the use of "inherit_errexit"
- Catch non-zero exit codes of "grep" when it is used in the middle of pipe constructs (e.g. for filtering out text lines)
- Enable shell option "inherit_errexit" if bash>=4.4
- Fix for rare crash with message "/usr/bin/yabddnsd: line 215: echo: write error: Broken pipe"
- Simplify code that parses comma-separated argument values
yabddnsd-0.6.2
14 May 2019 (2019-05-14 16:34:17 UTC)
yabddnsd-0.6.2.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Updated the manual page to clarify the contract for the getIpvXAddrsOfDomainCustom functions
- Not being able to determine the host's current IP address is now a warning, not an error, as this is usually a transient condition (for example during a reconnect)
- Properly discern between "The domain name's IP addresses could not be determined" and "The domain name does not have any IP addresses"
- Re-implemented the getIpvXAddrsOfDomainFromDig functions to honor the new function contract
- Clarified the function contract for the getIpvXAddrsOfDomain(FromX) functions
- Removed DNS resolution using host
- Clarified the documentation of the getPublicIpvXAddrFromStream functions
- Remove unnecessary STDERR redirects from some wget calls
- Be more cautious when parsing input from foreign sources, for example place an upper limit on the line length when iterating over text lines
yabddnsd-0.6.1
30 April 2019 (2019-04-30 21:31:14 UTC)
yabddnsd-0.6.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Tweaked some error messages
- Remove the finished TODO about public IP address detection method "File@@path"
- Implement new public IP address detection method "File@@path" that extracts the public address from a text file, for both IPv4 and IPv6
- Alphabetically order the getIpvXAddrOfThisHostFromY functions
- Enclose methods in double quotes when they are written to log messages
- Use isFunction when validating the --detectPublicAddrIpvX methods
- Simplify the code that parses the --detectPublicAddrIpvX methods from the command line
- Make functions that parse STDIN by line properly process the final line even if it is not terminated by a line feed
- The getIpvXAddrOfThisHostFromUrl functions now use getPublicIpvXFromStream instead of doing their own thing
- Implement functions that extract a public IPv4 or IPv6 address from an input stream, getPublicIpvXAddrFromStream, (prep work for "File@@path" host IP address detection methods)
- Added update protocol "FreeDns" that for now delegates to "FreeDnsV1", but that in future might delegate to "FreeDnsV2" once that has been implemented
yabddnsd-0.6.0
12 April 2019 (2019-04-12 21:12:41 UTC)
yabddnsd-0.6.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Renamed the project from "freedns-maintain-ip" to "yabddnsd" (Yet another bash dynamic DNS daemon) since it now supports not only freedns.afraid.org, but other dynamic DNS service providers as well
- Added documentation about the --oneShot option to the manual page
- Added missing update protocol argument to the calls of updateIpv?AddrIfRequired
- New option --oneShot that causes the main loop to terminate after its first iteration
- Implemented update protocol "DuckDns" for the www.duckdns.org dynamic DNS service
- Re-ordered code blocks dealing with argument validation
- Prepared function stubs for update protocol "DuckDns"
- Modularized the IP address update protocols; new option --updateProtocol
- Changed occurrences of terms like "method@@parameter" to "method@@argument" for consistency with the help text
freedns-maintain-ip-0.5.2
28 March 2019 (2019-03-28 22:22:22 UTC)
freedns-maintain-ip-0.5.2.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Exit with an error if neither dig nor host are available
- Report missing required programs in bulk instead of only reporting the first one encountered
- Only enable the nounset shell option if bash version is >= 4.4 and print a warning otherwise
freedns-maintain-ip-0.5.1
07 December 2018 (2018-12-07 14:15:07 UTC)
freedns-maintain-ip-0.5.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- --help and --version must now be the single argument if they are to be effective
- Improved arguments parsing, fixed some weird but working if conditions for --help and --version
- Fixed an error in the man page giving wrong function names for the getIpv?AddrsOfDomainCustom functions
- --printFunctions now exits with code 0 instead of 1
- --version now prints the exact version string and exits with code 0 instead of 1
freedns-maintain-ip-0.5.0
01 December 2018 (2018-12-01 22:17:22 UTC)
freedns-maintain-ip-0.5.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Fixed a bug where using method @@arguments caused the program to terminate with an "invalid address detection method" error message at startup
- Changed license from "GPLv3 or later" to "GPLv3"
- Added public IP address lookup method "Url" for IPv6 (had been available for IPv4 only)
- Implemented specifying custom public IP lookup URLs for method "Url" using the @@argument syntax, such as "Url@@https://icanhazip.com/"
- Implemented consistent method[@@argument] syntax for the public IP address detection methods; because of this the options --networkDeviceIpv[46] have been dropped as the desired device(s) are now given as @@argument, such as "NetDev@@enp3s0"
- Renamed public IP address detection method "NetworkDevice" to "NetDev"
- Added support for the domain having multiple IPv4 or IPv6 addresses; as long as the host's address is among them no action is taken
- Fixed a typo in the documentation of joinLines
- Prepared functions for the method@@argument syntax
- Implemented proper handling of domains having multiple IP addresses
freedns-maintain-ip-0.4.2
09 July 2018 (2018-07-09 21:18:36 UTC)
freedns-maintain-ip-0.4.2.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Fixed some pretty stupid syntax errors
- Some cleanups and fixes both in the application and its documentation
freedns-maintain-ip-0.4.1
08 June 2018 (2018-06-08 12:11:03 UTC)
freedns-maintain-ip-0.4.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Cleaned up and improved man page
- --listFunctions now mentions the getIpv*AddrOfDomainCustom functions again
- New defaults for --detectPublicAddrIpv4 (Upnp is used too if available)
- Improved man page
- Fixed output of --listFunctions
freedns-maintain-ip-0.4.0
06 June 2018 (2018-06-06 21:06:06 UTC)
freedns-maintain-ip-0.4.0.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Some more small man page fixes
- Updated and improved the man page
- Implemented --detectPublicAddrIpvX (documentation still incomplete)
- Improved output for --callFunction
- Implemented isPublicIpv6Addr
- Some miscellaneous small fixes
- Started implementation of function isPublicIpv6Addr
- Implemented functions getIpv6AddrExpanded and getIpv6AddrAsHexString
- Finished implementation of isPublicIpv4Addr
- Started implementation of isPublicIpv4Addr
freedns-maintain-ip-0.3.1
17 May 2018 (2018-05-17 22:35:38 UTC)
freedns-maintain-ip-0.3.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- More TODOs, renamed function "getIpv6AddrOfThisHostFromIp" to "getIpv6AddrOfThisHostFromNetworkDevice" and removed its optional argument
- Reverted a change to use IPv6 when updating the IPv6, freedns.afraid.org does not seem to have an IPv6
- Fixed a bug in getIpv6AddrOfDomainFromDig that caused false positive candidate lines
- wget now explicitely uses IPv4 or IPv6, depending on which of them is being maintained
- Fixed a bug where dnsServerIpv4 and dnsServerIpv6 were ignored if they were specified in a configuration file
- Fixed the "is set" test for variable "callFunction"
- Code style cleanups relating to the optional-argument arrays
- getIpv6AddrOfThisHostFromIp now takes an optional argument "networkDeviceIpv6"
- Improved documentation (BUGS section)
- Function arguments reordered: domainName authToken otherStuff
- Implemented an additional optional argument "dnsServerIpv*" for the getIpv*AddrOfDomain* functions, now all functions can be called without relying on global variables
- Implemented --callFunction
- Correct argument usage for functions instead of using global variables
- More rigorous parsing of the output of dig and host
- Extracted IP update calls into their own functions, updateIpv4Addr and updateIpv6Addr
- Documentation for --version
- New argument "--version", does the same as "--help"
- Only warn and do not exit with error code 1 when a program is missing for which alternatives may be used, like host or dig
- Implemented --listFunctions
- "*Custom" functions will now only be used if they really are functions, not file-based programs or builtins
- Authentication tokens are now obfuscated when they are printed to STDERR
freedns-maintain-ip-0.2.2
09 May 2018 (2018-05-09 21:33:34 UTC)
freedns-maintain-ip-0.2.2.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Improved parsing of various outputs, in particular that of dig
- Parsing of dig output was broken when the ADDITIONAL SECTION contained additional records
freedns-maintain-ip-0.2.1
07 May 2018 (2018-05-07 20:38:10 UTC)
freedns-maintain-ip-0.2.1.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature
- Fixed a really stupid copy&paste-induced bug related to configuration file arguments parsing
- Improved manual page
- New: --sleepTime is exposed as argument and documented
- New: --configFile may be specified multiple times for multiple configuration files
- Added a TODO
- Improved manual page
- Removed the *Custom function stubs, these function are now only called if they really exist; improved manual page
freedns-maintain-ip-0.1.2
07 May 2018 (2018-05-07 00:10:55 UTC)
freedns-maintain-ip-0.1.2.tar.gz
SHA256 checksum
SHA384 checksum
PGP signature