-
Notifications
You must be signed in to change notification settings - Fork 48
Dynamic DNS
Systems that live behind a network with a dynamic public IP address can be accessed via a known domain name managed by a so-called dynamic DNS service.
The init script S97dyndns
runs at each boot and executes dyndns-update
. Cron will also execute dyndns-update
every 15 minutes.
dyndns-update
will do nothing unless the /data/etc/dyndns-update.sh
is present. /data/etc/dyndns-update.sh
is ultimately responsible of actually updating the DNS record.
The output of the dynamic DNS update procedure can be found in /var/log/messages
, marked with dyndns
tag.
Simply create the /data/etc/dyndns-update.sh
file and place the dynamic DNS updating command inside. This command differs from one dynamic DNS provider to another but is usually an HTTP request performed with cURL (see examples below).
The recommended cURL command line args are -Ss
, telling it to not output the response, but to show the error if any. Adding -f
will make the script exit with erroneous status in case of non-2xx HTTP responses.
Make sure to surround the URL in quotes so that special characters such as &
are properly passed to the curl
process.
After logging in to www.duckdns.org, copy the displayed token and use it together with your domain name (without the .duckdns.org
) to form the cURL command and add it to /data/etc/dyndns-update.sh
:
curl -Ssf "https://www.duckdns.org/update?domains=<yourdomain>&token=<yourtoken>"
The URL for freedns.afraid.org can be found under Dynamic DNS > Direct URL. Just copy the link and add it to /data/etc/dyndns-update.sh
:
curl -Ssf "http://freedns.afraid.org/dynamic/update.php?<yourtoken>"
For www.noip.com, you'll need your username, password and full domain name to form the following command and add it to /data/etc/dyndns-update.sh
:
curl -Ssf "http://<yourusername>:<yourpassword>@dynupdate.no-ip.com/nic/update?hostname=<yourdomain>"
- bluetooth.conf
- captive-portal.conf
- cpufreq.conf
- date.conf
- dnsmasq.conf
- docker-compose.yml
- dtoverlays
- dyndns-update.sh
- environment
- firewall.sh
- fstab.user
- hostapd.conf
- ifalias.conf
- localtime
- modprobe.conf
- modules
- mongodb.conf
- netwatch.conf
- ntp.conf
- os.conf
- proftpd.conf
- redis.conf
- smb.conf
- ssh/config
- ssh/sshd_config
- ssl/domain
- ssl/email
- static_ip.conf
- sysctl.conf
- toemmc.conf
- version
- watchdog.conf
- wpa_supplicant.conf