<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Added dynamic DNS support for DNSimple]]></title><description><![CDATA[<p dir="auto">I've submitted a pull request on github, but in case anyone is interested here's how to add dynamic dns support for dnsimple.com records:</p>
<p dir="auto">After editing the code, enter your DNSimple domain name for <em>Hostname</em>, Account API token for <em>password</em>, Record ID for <em>ZoneID</em>, and TTL.</p>
<p dir="auto"><strong>/etc/inc/services.inc</strong><br />
Add dnsimple to the list of provider values and descriptions:</p>
<pre><code>define('DYNDNS_PROVIDER_VALUES', 'citynetwork cloudflare custom custom-v6 dhs dnsexit dnsimple dnsomatic dyndns dyndns-custom dyndns-static dyns easydns eurodns freedns gratisdns he-net he-net-v6 he-net-tunnelbroker loopia namecheap noip noip-free ods opendns ovh-dynhost route53 selfhost zoneedit');
define('DYNDNS_PROVIDER_DESCRIPTIONS', 'City Network,CloudFlare,Custom,Custom (v6),DHS,DNSexit,DNSimple,DNS-O-Matic,DynDNS (dynamic),DynDNS (custom),DynDNS (static),DyNS,easyDNS,Euro Dns,freeDNS,GratisDNS,HE.net,HE.net (v6),HE.net Tunnelbroker,Loopia,Namecheap,No-IP,No-IP (free),ODS.org,OpenDNS,OVH DynHOST,Route 53,SelfHost,ZoneEdit');

</code></pre>
<p dir="auto"><strong>/usr/local/www/services_dyndns_edit.php</strong><br />
In <strong>function _onTypeChange(type)</strong> add <strong>case "dnsimple":</strong> just below <strong>case "route53"</strong> to unhide the needed HTML elements:</p>
<pre><code>...
case "route53":
case "dnsimple":
	document.getElementById("_resulttr").style.display = 'none';
	document.getElementById("_urltr").style.display = 'none';
...

</code></pre>
<p dir="auto"><strong>/etc/inc/dyndns.class</strong><br />
In <strong>if ($forceUpdate == false &amp;&amp; $this-&gt;_detectChange() == false)</strong> add <strong>case "dnsimple":</strong> to the same list of all the other providers:</p>
<pre><code>...
case 'citynetwork':
case 'dnsimple':
	$this-&gt;_update();
	if($this-&gt;_dnsDummyUpdateDone == true) {
...
</code></pre>
<p dir="auto">In <strong>function _update() … switch ($this-&gt;_dnsService)</strong> add:</p>
<pre><code>...
case 'dnsimple':
	/* Uses DNSimple's REST API
	   Requires username and Account API token passed in header
	   Piggybacks on Route 53's ZoneID field for DNSimple record ID
	   Data sent as JSON */
	$needsIP = TRUE;
	$server = 'https://api.dnsimple.com/v1/domains/';
	$token = $this-&gt;_dnsUser . ':' . $this-&gt;_dnsPass;
	$jsondata = '{"record":{"content":"' . $this-&gt;_dnsIP . '","ttl":"' . $this-&gt;_dnsTTL . '"}}';
	curl_setopt($ch, CURLOPT_HEADER, 1);
	curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
	curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json','Content-Type: application/json','X-DNSimple-Token: ' . $token));
	curl_setopt($ch, CURLOPT_URL, $server . $this-&gt;_dnsHost . '/records/' . $this-&gt;_dnsZoneID);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $jsondata);
	break;
...
</code></pre>
<p dir="auto">In <strong>function _checkStatus($ch, $data) … switch ($this-&gt;_dnsService)</strong> add:</p>
<pre><code>...
case 'dnsimple':
	/* Responds with HTTP 200 on success.
	   Responds with HTTP 4xx on error.
	   Returns JSON data as body */
	$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
	$header = substr($data, 0, $header_size);
	$body = substr($data, $header_size);
	if (preg_match("/Status: 200\s/i", $header)) {
		$status = "phpDynDNS ({$this-&gt;_dnsHost}): (Success) IP Address Updated Successfully!";
		$successful_update = true;
	} else if (preg_match("/Status: 4\d\d\s/i", $header)) {
		$arrbody = json_decode($body, true);
		$message = $arrbody['message'] . ".";
		if (isset($arrbody['errors']['content'])) {
			foreach($arrbody['errors']['content'] as $key =&gt; $content) {
				$message .= " " . $content . ".";
			}
		}
		$status = "phpDynDNS ({$this-&gt;_dnsHost}): (Error) " . $message;
	} else {
		$status = "phpDynDNS ({$this-&gt;_dnsHost}): (Unknown Response)";
		log_error("phpDynDNS ({$this-&gt;_dnsHost}): PAYLOAD: {$body}");
		$this-&gt;_debug($body);
	}
	break;
...
</code></pre>
]]></description><link>https://forum.netgate.com/topic/79562/added-dynamic-dns-support-for-dnsimple</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 08:28:23 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/79562.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Feb 2015 20:50:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Added dynamic DNS support for DNSimple on Mon, 09 Feb 2015 23:33:04 GMT]]></title><description><![CDATA[<p dir="auto">Ha! Sorry, my first time using github. Here's the link:</p>
<p dir="auto">https://github.com/pfsense/pfsense/pull/1479</p>
]]></description><link>https://forum.netgate.com/post/517675</link><guid isPermaLink="true">https://forum.netgate.com/post/517675</guid><dc:creator><![CDATA[surrural]]></dc:creator><pubDate>Mon, 09 Feb 2015 23:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to Added dynamic DNS support for DNSimple on Mon, 09 Feb 2015 20:51:44 GMT]]></title><description><![CDATA[<p dir="auto">Can't you just link the pull request so that everyone interested can apply it via the System Patches package, instead of manual error-prone messing with loads of files?</p>
]]></description><link>https://forum.netgate.com/post/517620</link><guid isPermaLink="true">https://forum.netgate.com/post/517620</guid><dc:creator><![CDATA[doktornotor]]></dc:creator><pubDate>Mon, 09 Feb 2015 20:51:44 GMT</pubDate></item></channel></rss>