No description
  • Rust 69.3%
  • Nix 30.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-02 21:36:36 +02:00
.github/workflows .github/workflows/build.yml: update actions/* 2025-04-14 02:51:15 +02:00
src migrate from nsupdate to pdns http api 2026-10-02 21:36:36 +02:00
.gitignore ifaces: proof of concept 2021-05-14 22:30:25 +02:00
Cargo.lock migrate from nsupdate to pdns http api 2026-10-02 21:36:36 +02:00
Cargo.toml migrate from nsupdate to pdns http api 2026-10-02 21:36:36 +02:00
flake.lock flake.lock: Update 2025-11-26 22:07:39 +01:00
flake.nix Do not fail the build if clippy gets updated 2025-11-26 22:07:39 +01:00
LICENSE LICENSE 2021-08-17 22:27:39 +02:00
nixos-module.nix migrate from nsupdate to pdns http api 2026-10-02 21:36:36 +02:00
nixos-test.nix migrate from nsupdate to pdns http api 2026-10-02 21:36:36 +02:00
README.md migrate from nsupdate to pdns http api 2026-10-02 21:36:36 +02:00

ifdyndnsd

Watches Linux netlink for interface addresses and their changes to perform DynDNS updates via the PowerDNS HTTP API.

Forked from https://github.com/astro/ifdyndnsd.

Usage

Pass your configuration file as argument:

cargo run config.toml

Configuration

Works with a self-hosted PowerDNS and with PowerDNS-compatible APIs such as servfail.network. For a self-hosted PowerDNS the webserver and API must be enabled (api=yes, api-key=..., webserver=yes) and the zone must already exist.

# Define a PowerDNS API endpoint which can be referenced by "mykey".
[keys.mykey]
# Base URL of the PowerDNS HTTP API (without `/api/v1`), e.g.
# "http://192.0.2.53:8081" for a self-hosted PowerDNS
url = "https://beta.servfail.network"
# PowerDNS server id. The default is "localhost", which is right for
# a self-hosted PowerDNS. On servfail.network this is the primary
# nameserver of your zone (see its SOA), including the trailing dot.
server-id = "europa.ns.servfail.at."  # your SOA primary, with trailing dot
# API key, exactly one of the parameters
# - `api-key`
# - `api-key-file`
# must be specified.
api-key = "topsecret"  # servfail.network: token from the settings page
# # Read the API key from a file (surrounding whitespace is stripped)
# api-key-file = "/run/secrets/pdns-api-key"

# Update an A record (IPv4)
[[a]]
# Select `[keys.mykey]` for server/key settings
key = "mykey"
# DNS name to update
name = "dyndns.example.net"
# Zone in PowerDNS containing the name
zone = "example.net"
# # Optionally define a time to live (ttl) for the record to set. The default ttl is 0
# ttl = 7200
# Network interface to watch for an IP address
interface = "ppp0"
# # Optionally select the proper IP address by subnet. This is the
# # default for IPv4:
# scope = "0.0.0.0/0"

# Update a AAAA record (IPv6)
[[aaaa]]
# Select `[keys.mykey]` for server/key settings
key = "mykey"
# DNS name to update
name = "dyndns.example.net"
zone = "example.net"
# # Optionally define a time to live (ttl) for the record to set. The default ttl is 0
# ttl = 7200
# Network interface to watch for an IP address
interface = "ppp0"
# # Optionally select the proper IP address by subnet. This is the
# # default for IPv6, which filters for global addresses but not
# # link-local, ULA, ...:
scope = "2000::/3"

# Update another AAAA record
# (when you have setup prefix delegation so that you distribute the
# dynamic ISP-assigned subnet to your LAN)
[[aaaa]]
key = "mykey"
# For IPv6 ifdyndnsd doesn't need to run on the LAN gateway.
name = "server.home.example.net"
zone = "example.net"
# Watch the local LAN interface for addresses
interface = "eth0"
# Default `scope = "2000::/3"` should be right in most DynDNS
# scenarios.