Giter Club home page Giter Club logo

ifdyndnsd's Introduction

ifdyndnsd

Watches Linux netlink for interface addresses and their changes to perform DynDNS like nsupdate.

Usage

Pass your configuration file as argument:

cargo run config.toml

Configuration

# Define a key which can be referenced by "mykey". These keys are
# usually generated with BIND's `ddns-confgen`.
[keys.mykey]
# IP address of the DNS server
# (sorry, can't resolve this yet)
server = "192.0.2.53"
# Key name which needs to match the name configured for the key in the
# DNS server
name = "mykey.example.com"
# Algorithm to use for TSIG
alg = "hmac-sha256"
# Secrets
# Exactly one of the parameters
# - `secret`
# - `secret-base64`,
# - `secret-file`
# - `secret-file-base64`
# must be specified.
# # Plain-text secret
# secret = "topsecret\n"
# # Secret encoded in base64 just like BIND uses. This allows using
# binary strings.
secret-base64 = "dG9wc2VjcmV0Cg=="
# # Secrets from files
# Both secret types from above can also be read from a file
# secret-file = "/run/user/secret.file"
# for a plain text secret or 
# secret-file-base64 = "/run/user/secret.file"
# for a base64 encoded secret
# Update an A record (IPv4)
[[a]]
# Select `[key.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 IPv4:
# scope = "0.0.0.0/0"

# Update a AAAA record (IPv6)
[[aaaa]]
# Select `[key.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"
# Watch the local LAN interface for addresses
interface = "eth0"
# Default `scope = "2000::/3"` should be right in most DynDNS
# scenarios.

# Once the IPv6 address is known, ifdyndnsd can also update DNS
# records for other hosts in your LAN if you know the last 64 bits of
# their radvd-assigned addresses (the host part in a /64 network). Be
# careful not to use /temporary/ addresses (Privacy Extensions) here:
neighbors."router.example.net" = "::2de:adff:fe00:beef"
neighbors."laptop.example.net" = "::2de:caff:fefb:ad00"
neighbors."phone.example.net" = "::212:23ff:fe56:789a"

ifdyndnsd's People

Contributors

astro avatar frederictobiasc avatar github-actions[bot] avatar supersandro2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

frederictobiasc

ifdyndnsd's Issues

pkgs.system does not exist

pkgs.system used here https://github.com/astro/ifdyndnsd/blob/main/nixos-module.nix#L11 does not exist on my machine

nix-repl> nixosConfigurations.host.pkgs.system
error:
       … while evaluating the attribute 'host.pkgs.system'

         at /nix/store/h4bjlz0hscn550x5zjl5cwghjw31h1xc-source/nixos/lib/eval-config.nix:114:39:

          113|     inherit extraArgs;
          114|     inherit (nixosSystem._module.args) pkgs;
             |                                       ^
          115|     extendModules = args: withExtraArgs (nixosSystem.extendModules args);

       error: attribute 'system' missing

       at «string»:1:1:

            1| nixosConfigurations.host.pkgs.system
             | ^
       Did you mean one of mystem, systemc, systemd, syntex or systemfd?

Incorrectly uses upper-level domain as zone

Currently, ifdyndnsd always uses the upper-level domain as zone.
Example:
When defining an update task for the name foo.bar.example.com, bar.example.com is used as zone while example.com would be the correct zone.
Hence, the name server rejects the update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.