In-a-Dyn is a dynamic DNS client with multiple SSL/TLS library support
In-a-Dyn is a dynamic DNS client with multiple SSL/TLS library support
[![License Badge][]][License] [![GitHub Status][]][GitHub] [![Coverity Status][]][Coverity Scan]
As of October 2025, this project has been archived and is no longer maintained.
After many years of development and community contributions, maintenance on this repository has ended. The source code remains available for reference and for anyone who wishes to continue development in their own fork.
— Joachim Wiberg (troglobit)
The last release remains available from GitHub at
Tip: the HTML UNIX manual is at https://man.troglobit.com, e.g., inadyn.conf(5)
Inadyn, or In-a-Dyn, is a small and simple Dynamic DNS, [DDNS][], client with HTTPS support. Commonly available in many GNU/Linux distributions, used in off the shelf routers and Internet gateways to automate the task of keeping your Internet name in sync with your public¹ IP address. It can also be used in installations with redundant (backup) connections to the Internet.
Most people are unaware they share a pool of Internet addresses with other users of the same Internet Service Provider (ISP). Protocols like DHCP, PPPoE, or PPPoA are used to give you an address and a way to connect to the Internet, but usually not a way for others to connect to you. If you want to run an Internet server on such a connection you risk losing your IP address every time you reconnect, or as in the case of DHCP even when the lease is renegotiated.
By using a DDNS client like inadyn you can register an Internet name
with a DDNS provider, like FreeDNS. The
DDNS client updates your DNS record periodically and/or on demand when
your IP address changes. Inadyn can maintain multiple host records with
the same IP address, use a combination of a script, the address from an
Internet-facing interface, or default to using the IP address change
detector of the DDNS provider.
__
¹ Public IP address is the default, private addresses can also be used.
Some of these services are free of charge for non-commercial use, some take a small fee, but also provide more domains to choose from.
The following tier-one providers have dedicated "plugins", even though many share the original DynDNS plugin. Below is a list of known DDNS providers, ordered by the plugin that support them:
For the complete list, see inadyn -L, for machine friendly JSON
output, use inadyn -L -j.
DDNS providers not supported natively can be enabled using the custom, or generic, DDNS plugin. See below for configuration examples.
In-A-Dyn defaults to HTTPS, but not all providers may support this, so
try disabling SSL for the update (ssl = false) or the checkip phase
(checkip-ssl = false) in the provider section, in case you run into
problems.
HTTPS is enabled by default since it protects your credentials from being snooped and reduces the risk of someone hijacking your account.
In-A-Dyn supports updating several DDNS servers, several accounts even on
different DDNS providers. The following /etc/inadyn.conf example show
how this can be done. To verify your configuration, without starting the
daemon, use:
inadyn --check-configThis looks for the default .conf file, to check any file, use:
inadyn --check-config -f /path/to/file.conf# In-A-Dyn v2.0 configuration file format
period = 300
user-agent = Mozilla/5.0
# The FreeDNS username must be in lower case
# The password (max 16 chars) is case sensitive
provider freedns {
username = lower-case-username
password = case-sensitive-pwd
hostname = some.example.com
}
# We override checkip server with the In-a-dyn built-in 'default',
# http://ifconfig.me/ip, for details on this, see below.
provider freemyip {
password = YOUR_TOKEN
hostname = YOUR_DOMAIN.freemyip.com
checkip-server = default
}
provider dyn {
ssl = false
username = charlie
password = snoopy
hostname = { peanuts, woodstock }
user-agent = Mozilla/4.0
}
provider duckdns.org {
username = YOUR_TOKEN
password = noPasswordForDuckdns
hostname = YOUR_DOMAIN.duckdns.org
}
# With multiple usernames at the same provider, index with :#
provider no-ip.com:1 {
username = ian
password = secret
hostname = flemming.no-ip.com
user-agent = inadyn/2.2
}
# With multiple usernames at the same provider, index with :#
provider no-ip.com:2 {
username = james
password = bond
hostname = spectre.no-ip.com
checkip-ssl = false
checkip-server = ifconfig.me
checkip-path = /ip
}
# With multiple usernames at the same provider, index with :#
provider no-ip.com:3 {
username = spaceman
password = bowie
hostname = spaceman.no-ip.com
checkip-command = "/sbin/ifconfig eth0 | grep 'inet6 addr'"
}
# Google Domains - notice use of '@' to update root entry
provider domains.google.com:1 {
hostname = @.mydomain.com
username = your_username
password = your_password
}
# Wildcard subdomains - notice the quotes (required!)
provider domains.google.com:2 {
hostname = "*.mydomain.com"
username = your_username
password = your_password
}
# Note: hostname == update-key from Advanced tab in the Web UI
provider tunnelbroker.net {
username = futurekid
password = dreoadsad/+dsad21321 # update-key-in-advanced-tab
hostname = 1234534245321 # tunnel-id
}
# dynv6.com update using a custom checkip-command, which works
# if you have access to an Internet-connected interface. Make
# sure to verify the command works on your system first
allow-ipv6 = true # required option for IPv6 atm.
provider dynv6.com {
username = your_token
password = not_used
hostname = { host1.dynv6.net, host2.dynv6.net }
checkip-command = "/sbin/ip -6 addr | grep inet6 | awk -F '[ \t]+|/' '{print $3}' | grep -v ^::1 | grep -v ^fe80"
}
provider cloudxns.net {
username = your_api_key
password = your_secret_key
hostname = yourhost.example.com
}
provider dnspod.cn {
username = your_api_id
password = your_api_token
hostname = yourhost.example.com
}
# Create a unique custom API token with the following permissions:
# -> Zone.Zone - Read, Zone.DNS - Edit.
provider cloudflare.com {
username = zone.name
password = api_token_important_read_comment
hostname = hostname.zone.name
ttl = 1 # optional, value of 1 is 'automatic'.
proxied = false # optional.
}
provider goip.de {
username = user.name
password = user.password
hostname = hostname.zone.name
}Notice how the config has three different users of the No-IP provider --
this is achieved by appending a :ID to the provider name.
We also define a custom cache directory, default is to use /var/cache.
In our case /mnt is a system specific persistent store for caching
your IP address as reported to each provider. Inadyn use this to ensure
you are not locked out of your account for excessive updates, which may
happen if your device Internet gateway running inadyn gets stuck in a
reboot loop, or similar.
However, for the caching mechanism to be 100% foolproof the system clock
must be set correctly -- if you have issues with the system clock not
being set properly at boot, e.g. pending receipt of an NTP message, use
the command line option --startup-delay=SEC. To tell inadyn it is
OK to proceed before the SEC timeout, use SIGUSR2.
The last system defined is the IPv6 service
provided by Hurricane Electric. Here hostname is set to the tunnel ID
and password must be the Update key found in the Advanced
configuration tab.
Note: the
checkip-commandfor dynv6, above, is just one way to do it. Here's another variant, from their own script:ip -6 addr list scope global $device | grep -v " fd" | sed -n 's/.*inet6 \([0-9a-f:]\+\).*/\1/p' | head -n 1
Sometimes the default checkip-server for a DDNS provider can be slow
to respond, even time out. In-a-Dyn support overriding the provider's
default with a custom one, or a custom command. The easiest way to
change it is to set checkip-server = default in you provider config,
triggering In-a-Dyn to use the default http://ifconfig.me/ip, which
also is the default for any custom DDNS configuration. See the man
pages, or the below section, for more information.
Some providers require using a specific browser to send updates, this
can be worked around using the user-agent = STRING setting, as shown
above. It is available both on a global and on a per-provider level.
NOTE: In a multi-user server setup, make sure to chmod your .conf
to 600 (read-write only by you/root) to protect against other users
reading your DDNS server credentials.
In addition to the default DDNS providers supported by Inadyn, custom
DDNS providers can be defined in the config file. Use custom {} in
instead of the provider {} section used in examples above.
In-A-Dyn use HTTP basic authentication (base64 encoded) to communicate username and password to the server. If you do not have a username and/or password, you can leave these fields out. Basic authentication, will still be used in communication with the server, but with empty username and password.
A custom DDNS provider can be setup like this:
custom example {
username = myuser
password = mypass
checkip-server = checkip.example.com
checkip-path = /
ddns-server = update.example.com
ddns-path = "/update?hostname="
hostname = myhostname.example.net
}The following variables can be substituted into the configuration:
%u - username
%p - password, if HTTP basic auth is not used
%h - hostname
%i - IP addressFor it can look as follows. Notice how the hostname syntax differs from above:
custom namecheap {
username = YOURDOMAIN.TLD
password = mypass
ddns-server = dynamicdns.park-your-domain.com
ddns-path = "/update?domain=%u&password=%p&host=%h&ip=%i"
hostname = { "@", "www", "test" }
ddns-response = "0"
}Here three hostnames are updated, one HTTP GET update request for every listed hostname. Some providers, like FreeDNS, support setting up CNAME records (aliases) to reduce the amount of records you need to update. FreeDNS even default to linking multiple records to the same update, which may be very confusing if you want each DNS record to be updated from a unique IP address -- make sure to *check yo
No open issues yet, or sync has not completed.