Return to Homepage

Dynamic DNS for Routers

Routers and dynamic DNS clients update a name over DynDNS2 (dyndns2), the protocol DynDNS and No-IP use, so the “Custom” or “DynDNS” option most routers have works with us. Each name gets its own login, made on the domain’s DNS Management tab under Dynamic DNS. A login can change only that name’s A and AAAA records, nothing else on the account. For scripts that use an API key, see Dynamic DNS.

Servers

Server Sets
ddns.namecrane.org The address the router connects from, IPv4 or IPv6
ipv4.ddns.namecrane.org The A record only (the server has only an IPv4 address)
ipv6.ddns.namecrane.org The AAAA record only (the server has only an IPv6 address)

Use HTTPS. To keep both records current, set up two updates, one through ipv4. and one through ipv6.; a router that sends the address itself can use ddns.namecrane.org for both.

Update

http
GET /nic/update?hostname=home.example.com&myip=203.0.113.42

Sign in with HTTP Basic authentication, using the name’s username and password. A router that takes an update URL can put them in the query instead, as username and password.

Parameter Required Description
hostname No The name to update. Without it, the login’s own name.
myip No The address to set, IPv4 or IPv6, or one of each as 203.0.113.42,2001:db8::1. Without it, the address the request comes from.
myipv6 No An IPv6 address to set as well.

Records are set with a 60-second TTL. Sending the same address again answers nochg.

Answers

Plain text, one line per hostname:

Answer Meaning
good 203.0.113.42 Updated.
nochg 203.0.113.42 It already had that address.
badauth Wrong username or password (HTTP 401).
notfqdn The hostname isn’t a full name like home.example.com.
nohost The hostname isn’t this login’s, or the domain isn’t active on the account.
numhost More than 10 hostnames in one request.
dnserr DNS refused the change, for example because the name has a CNAME.
911 Try again later: too many requests (HTTP 429 with Retry-After), or DNS is briefly unavailable.

https://ddns.namecrane.org/checkip shows the address you connect from, in the format ddclient’s use=web reads.

Setup

Replace USERNAME, PASSWORD and home.example.com with the name’s login.

ddclient

ini
protocol=dyndns2
use=web, web=https://ipv4.ddns.namecrane.org/checkip
server=ddns.namecrane.org
ssl=yes
login=USERNAME
password='PASSWORD'
home.example.com

UniFi

Settings, Internet, your WAN, Dynamic DNS: Service dyndns, Hostname home.example.com, your username and password, and Server:

ddns.namecrane.org/nic/update?hostname=%h&myip=%i

inadyn

custom namecrane {
    ssl         = true
    username    = USERNAME
    password    = PASSWORD
    ddns-server = ddns.namecrane.org
    ddns-path   = "/nic/update?hostname=%h&myip=%i"
    hostname    = home.example.com
}

OpenWrt

In Dynamic DNS (luci-app-ddns), choose the custom service, turn on HTTPS, set Lookup Hostname and Domain to home.example.com, fill in the username and password, and use this Custom update URL:

https://[USERNAME]:[PASSWORD]@ddns.namecrane.org/nic/update?hostname=[DOMAIN]&myip=[IP]

pfSense and OPNsense

pfSense: Services, Dynamic DNS, Add. Service Type Custom, your username and password, Result Match good|nochg, and Update URL:

https://ddns.namecrane.org/nic/update?hostname=home.example.com&myip=%IP%

OPNsense (Dynamic DNS plugin): Service Custom, Protocol DynDNS 2, Server ddns.namecrane.org, your username, password and hostname.

FRITZ!Box

Internet, Permit Access, DynDNS: Provider User-defined, Domain name home.example.com, your username and password, and Update URL:

https://ddns.namecrane.org/nic/update?hostname=<domain>&myip=<ipaddr>,<ip6addr>&username=<username>&password=<pass>

MikroTik

A script run by the scheduler every few minutes:

/tool fetch url="https://ipv4.ddns.namecrane.org/nic/update?hostname=home.example.com" user="USERNAME" password="PASSWORD" output=none

curl

bash
curl -u USERNAME:PASSWORD "https://ipv4.ddns.namecrane.org/nic/update?hostname=home.example.com"

Snagged on something?

Our sysadmins answer tickets around the clock.