cURL

The program cURL is a tool for UNIX which can be used to update the IP address dynamically. The program can be used as follows (line breaks that should be removed are marked with \\)

curl -s --user 'user:password' \\
"https://dns.loopia.se/XDynDNSServer/XDynDNS.php? \\
hostname=mindoman.se&myip=youripaddress"

Note that the above command is written on one line. We have prepared a simple script that also gets the IP address for you.

#!/bin/sh
curl -s --user 'user:password' \\
"https://dns.loopia.se/XDynDNSServer/XDynDNS.php? \\
hostname=mindoman.se&myip="`curl -s  dns.loopia.se/checkip/checkip.php | \\
sed 's/^.*: \([^<]*\).*$/\1/'`; echo

Note that the above command is written on one line. Place the content in a file named loopiadns.sh and set the permissions of the file with chmod + x loopiadns.sh. An example of this is available to download here.

Was this article helpful?

Related Articles