No description
- Rust 69.3%
- Nix 30.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| nixos-module.nix | ||
| nixos-test.nix | ||
| README.md | ||
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.