Dynamic DNS

From ArchWiki
Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary end

DDNS, Dynamic DNS or DynDNS is a service which offers operators of homeservers the possibility to have an URL which does not change when the provider changes the servers public IP-Address.

Router or Server?

Most (home) routers offer connecting to different DDNS Services. But the offered lists are limited to serveal services which are most likely not free. If the Router supports a free service, or you are willing to pay or donate for a service, you should do this, it is faster and more reliable. In that case, there is no need to use a softwareside solution.

Warning: You should definetly set up NAT on your router or a firewall on your PC and do everything to secure your network and computers.

Setting up DDNS


FreeDNS.afraid.org is a free Service which is easy and uncomplicated to set up.


After Singing-Up there, install afraid-dyndns-uvAUR, available in the Arch User Repository, it updates the IP.

Note: Besides perl, it depends on perl-libwww and perl-xml-simple available in the Official Repositories.


After building and installing the package, configuration of /usr/bin/afraid-dyndns-uv (which is a perl script) is nessecary.

Locate the Lines

$afraid = "http://freedns.afraid.org/api/?action=getdyndns&sha=%s&style=xml";
$CACHEDIR = "/var/cache/afraid-dyndns/IP"; # set cache directory
$HASH = "<your_hash>"; # account hash for authentication

Get the Hashcode:

  • Visit http://freedns.afraid.org/api/ and log in.
  • Copy the shasum from the URL which points to the XML or ASCII API
  • Replace "<your_hash>" in /usr/bin/afraid-dyndns-uv with the shasum from the url

Automatic Update

The last step is to add this line to your crontab:

*,5 * * * * afraid-dyndns-uv

It will update the IP every 5 Minutes.