2

Im attempting to maintain an account at dyndns.org via php/curl. Im using (per RTFM):

 https://$account:$pw@members.dyndns.org/nic/update?hostname=$host&myip=$ip

but I get a 'nohost' response if $host is new. If $host is an existing entry it works.

Has anyone used this method of communicating with dyndns? Is the api only used to update existing entries?

ethrbunny
  • 10,379
  • 9
  • 69
  • 131

4 Answers4

3

Since this question was asked three years ago, I can confirm that this still works (in terms of: it just updates an existing hostname) with

curl "https://test:test@members.dyndns.org/nic/update?hostname=test.dyndns.org&myip=1.2.3.4"
dirkk0
  • 2,460
  • 28
  • 34
0

You can only send IP address updates to existing DynDNS hostnames with the DynDNS API, you cannot create new hostnames.

If you need a full API for creating/deleting/changing hostnames, Dynect SMB may interest you: http://www.dyndns.com/services/dynectsmb/

  • I got an email from dyndns that made it sound more like we had too many entries in our zone. Still trying to figure out how to fix this. – ethrbunny Jan 27 '11 at 13:03
0

As Oracle have started charging for DynDNS it means the mac client no longer works on 10.15 and higher. I wrote a simple shell script to do this

#!/bin/shell
IP=$(curl "checkip.amazonaws.com")
echo $IP
curl "https://username:updaterpassword@members.dyndns.org/v3/update?hostname=biscuit.home.dyndns.org&myip=${IP}" 

Replace the username and updater password in the above.

Works on Mac OS X and Linux

TusharJ
  • 46
  • 4
0

Here is how it works dyndns with php and curl

$server_url = "test.dyndns.biz";
$current_ip ="1.2.3.4";
$url = "https://members.dyndns.org/nic/update?system=dyndns&hostname=".$server_url."&myip=".$current_ip;
                                                              
$username="xxxxxxx";
$password="xxxxxxx";
$base64 = base64_encode("$username:$password");
$authorization = "Authorization: Basic $base64";
$userAgent = "User-Agent: Update Client/v1.0"; 
$headers = array($authorization, $userAgent);     
                                                  
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPGET, TRUE);
$response = curl_exec($ch);
echo $response;
alkarana
  • 1
  • 2