Dynamic DNS client for Interweb Angola domains: keeps A and AAAA records updated on OpenWrt routers, Raspberry Pi, Linux, Windows and Docker https://docs.interweb.ao
  • Shell 53%
  • PowerShell 44.5%
  • Dockerfile 2.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-28 11:00:37 +02:00
.github Add CI workflow and Dependabot 2026-11-28 09:16:54 +02:00
openwrt Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
systemd Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
CHANGELOG.md Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
ddns.conf.example Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
ddns.ps1 Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
ddns.sh Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
Dockerfile Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
LICENSE Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
README.md Use badges from the brand git 2026-11-28 11:00:37 +02:00
README.pt.md Use badges from the brand git 2026-11-28 11:00:37 +02:00
repo.json Use badges from the brand git 2026-11-28 11:00:37 +02:00

Dynamic DNS for Interweb Angola

Release License: MIT

Reach your home, office or camera by name, even when the internet provider changes your IP. This client checks the public IP of your network and, when it changes, updates an A (IPv4) and/or AAAA (IPv6) record of your domain through the Interweb Angola API.

Português

What File
OpenWrt routers, Raspberry Pi, Linux, macOS ddns.sh (POSIX sh and curl)
Windows ddns.ps1 (PowerShell 5.1 or 7)
systemd systemd/ddns.service and systemd/ddns.timer
OpenWrt, update as soon as the WAN comes up openwrt/hotplug
Docker Dockerfile

Before you start

  1. The domain must be active on your account, with DNS on.
  2. Create an API key with the dns:read and dns:write permissions in the API Center of Meu Interweb. Do not give it an IP list: your IP is the thing that changes. Test first with a sandbox_ key: the client runs normally and nothing changes in the zone.
  3. Pick a name, such as home, for home.example.co.ao.

The address of the API is already in the client. You only give the key.

Linux and Raspberry Pi (systemd)

sudo install -m 755 ddns.sh /usr/local/bin/interweb-ao-ddns
sudo install -m 600 ddns.conf.example /etc/interweb-ao-ddns.conf
sudo nano /etc/interweb-ao-ddns.conf        # key, domain and name
sudo interweb-ao-ddns                        # first run, by hand
sudo install -m 644 systemd/ddns.service /etc/systemd/system/interweb-ao-ddns.service
sudo install -m 644 systemd/ddns.timer /etc/systemd/system/interweb-ao-ddns.timer
sudo systemctl daemon-reload
sudo systemctl enable --now interweb-ao-ddns.timer

It checks every 5 minutes. See what it did with journalctl -u interweb-ao-ddns. Without systemd, use cron: */5 * * * * /usr/local/bin/interweb-ao-ddns -q.

OpenWrt

opkg update && opkg install curl ca-bundle
cp ddns.sh /usr/bin/interweb-ao-ddns && chmod 755 /usr/bin/interweb-ao-ddns
cp ddns.conf.example /etc/interweb-ao-ddns.conf && chmod 600 /etc/interweb-ao-ddns.conf
vi /etc/interweb-ao-ddns.conf
echo '*/5 * * * * /usr/bin/interweb-ao-ddns -q' >> /etc/crontabs/root && /etc/init.d/cron restart
cp openwrt/hotplug /etc/hotplug.d/iface/95-interweb-ao-ddns

If the WAN interface of the router has the public IP, set DDNS_IFACE=wan and the client reads it from there, without asking anyone. Set DDNS_SYSLOG=yes to see changes in logread. If the address is private (10.x, 192.168.x, 100.64.x), the router is behind another one: keep the default address service.

The API has no dyndns2 update address, so the Dynamic DNS menu built into routers cannot be used with it. Run this client on the router instead.

Windows

[Environment]::SetEnvironmentVariable('INTERWEB_API_KEY', 'prod_...', 'User')
.\ddns.ps1 -Domain example.co.ao -Name home -Type A

Every 5 minutes with Task Scheduler:

$action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-NoProfile -ExecutionPolicy Bypass -File C:\ddns\ddns.ps1 -Domain example.co.ao -Name home -Quiet'
$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 5)
Register-ScheduledTask -TaskName 'Interweb Angola DDNS' -Action $action -Trigger $trigger

Docker

docker build -t interweb-ao-ddns .
docker run -d --restart unless-stopped --name ddns \
  -e INTERWEB_API_KEY=prod_... -e DDNS_DOMAIN=example.co.ao -e DDNS_NAME=home \
  interweb-ao-ddns

For AAAA records, add --network host so the container has IPv6.

Settings

Setting Default What
INTERWEB_API_KEY The API key. Or DDNS_API_KEY_FILE with the path of a file holding it.
DDNS_DOMAIN Your domain.
DDNS_NAME @ Names to update, separated by spaces. @ is the domain itself.
DDNS_TYPE A A, AAAA or both.
DDNS_TTL 300 Seconds, from 60.
DDNS_IP4_URL, DDNS_IP6_URL ipify, icanhazip Address services, tried in order.
DDNS_IFACE, DDNS_IFACE6 Read the IP from this interface instead.
DDNS_IP4, DDNS_IP6 A fixed address.
DDNS_FORCE_HOURS 24 Check the zone again after this many hours even without a change.
DDNS_DELETE_EXTRA no yes deletes other records with the same name and type.
DDNS_INTERVAL 300 Seconds between checks with --loop.

Options of ddns.sh: --force, --dry-run, --loop, -q, -c FILE. The PowerShell script takes the same settings as parameters (-Domain, -Name, -Type, -Ttl, -Force, -DryRun, -DeleteExtra, -Quiet) or the same environment variables.

How it works

The API has no operation that tells you your own IP, so the client asks an address service (by default api.ipify.org, then icanhazip.com), reads it from an interface, or uses the value you give. It remembers the last IP it sent and only calls the API when the IP changes, or once every DDNS_FORCE_HOURS. Then it reads the zone, changes the record if the value is different, or creates it if there is none. The key is never printed, and it reaches curl through standard input, so it does not show in the process list.

A copy of the zone is kept before each change: you can go back in Meu Interweb or with the API. More in the DNS documentation.

License

MIT. See LICENSE.


Maintained by RLX Holdings.