Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How to install DuckDNS.org (a how-to guide)

Status
Not open for further replies.

RoboKaren

Member
Joined
Apr 8, 2014
Messages
130
I got sick of no-ip's constant nagging to upgrade to their paid service. Yes, it's very cheap but I only have one dyndns that I need (my Freenas server) and it seemed excessive. So I scrounged around for a free alternative.

DuckDNS.org is one that's getting a bit of attention. It's free (as in beer) but not supported in most firmwares. Luckily they offer a super-simple configuration.

0. Sign up at DuckDNS.org
1. Add a new domain such as example.duckdns.org
2. Get your token (a very long sequence of random characters on the home page)
3. Login to your Freenas server GUI
4. Go to System->Cron Jobs->Add New Cron Job
5. Set up the new cron job.
a. Set it run as 'nobody'
b . You can have it at 1 minute past the hour, every 12 hours (or less), every day of the week.
c. The command to run is:
/usr/local/bin/curl "https://www.duckdns.org/update?domains=mysubdomain&token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx&ip="

where mysubdomain is your subdomain of mysubdomain.duckdns.org
and token is the long sequence of random characters on the duckdns home page.

And that's it.

Note: You may want to run:
/usr/local/bin/curl "https://www.duckdns.org/update?domains=mysubdomain&token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx&ip="

from your user account first to make sure that the command actually works. If it does, it should return "OK". If there is some sort of a problem, it'll return "KO".

Updated: Jan 27, 2016 to reflect new DuckDNS syntax.
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It got filtered for moderation. ;)

Approved and in the how-to guides section of the forum. Good work! @RoboKaren
 

SAiLO

Newbie
Joined
Feb 2, 2015
Messages
2
Thanks for that guide. Will test it once back home at some point.
 

Creation85

Newbie
Joined
Aug 21, 2015
Messages
2
Last edited:

mgerety

Neophyte
Joined
Aug 31, 2015
Messages
5
EDIT: Nm, putting quotes around the URL did the trick. I'll leave this here in case someone else has a similar issue.

Any idea why I'm having an issue with this? I attempted to set this up using NameCheap's DDNS..

When I submit the url:
https://dynamicdns.park-your-domain...domain&domain=mydomain.com&password=xxxxxxxxx via a browser on another PC, it works fine..

However, when I set up a cron job using /usr/local/bin/curl https://dynamicdns.park-your-domain...domain&domain=mydomain.com&password=xxxxxxxxx

I get the following:

[root@freenas ~]# /usr/local/bin/curl https://dynamicdns.park-your-domain.com/up
date?host=mysubdomain&domain=mydomain.com&password=xxxxxxx
[1] 75130
[2] 75131
[root@freenas ~]# <?xml version="1.0"?><interface-response><Command>SETDNSHOST</
Command><Language>eng</Language><ErrCount>1</ErrCount><errors><Err1>Domain name
not found</Err1></errors><ResponseCount>1</ResponseCount><responses><response><R
esponseNumber>316153</ResponseNumber><ResponseString>Validation error; not found
; domain name(s)</ResponseString></response></responses><Done>true</Done><debug>
<![CDATA[]]></debug></interface-response>
 

PlowHouse

Junior Member
Joined
Dec 10, 2012
Messages
23
How are you all testing that the file executed successfully? I've left this to run as a cron job and tried checking /var/log/cron and can't see anything definitive that the command completed or failed. I've also tried running the duckdns command as root with my sub-domain and token which looks to complete but I'd like to verify a log file of some sort that it went through "OK". Is there a default location in FreeBSD I should check to verify this is updating as it should? I currently have the cron job running every 15 minutes.
 

bmcclure937

Member
Joined
Jul 13, 2012
Messages
110
Is this still needed or can the Dynamic DNS service be used to accomplish this same thing with DuckDNS? I have not had a chance to tinker with it but figured others have given it a try.
 

RoboKaren

Member
Joined
Apr 8, 2014
Messages
130
You can use the built-in Dynamic DNS service with a variety of providers, but as of the most recent (2015.01) releases, DuckDNS is not listed as a configurable provider so you need to do it manually.

Or sign up for one of the ones that are configurable.
 

icsy7867

Member
Joined
Dec 31, 2015
Messages
159
These curl commands can also be done via a web browser. I don't use the built in DDNS or inadyn services. Curl works just fine for me.

I use a similar curl technique for a domain I purchased. For example... using namecheap I made a script that my cron job runs: (using made up variables of course)

(keep in mind, these commands are for namecheap.com domains! Not duckdns)
#!/bin/sh
curl "https://dynamicdns.park-your-domain...com&password=ce8f7d8e978a879b3b22322c232c32b2"
curl "https://dynamicdns.park-your-domain...com&password=ce8f7d8e978a879b3b22322c232c32b2"

Now what you can do to test is type in the above line (with your corrected variables of course!) into a web browser on a device that has a different external IP address. Like a 3g/4g connection or public wifi. Your service should update your dns name to that public IP address. After you confirm that simply run the commands on your freenas server or jail and it should update to Freenas's external IP address and confirm that this is working.

I currently have these running every couple of hours without any trouble for me. I also made a filtering rule in my inbox/email to automatically archive these emails so they do not clutter up my inbox, but they are searchable if I have any issues.
 
Status
Not open for further replies.
Top