0% found this document useful (0 votes)
165 views3 pages

Duck DNS - Install

Duck DNS - Install

Uploaded by

faszomjoska23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
165 views3 pages

Duck DNS - Install

Duck DNS - Install

Uploaded by

faszomjoska23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

9/13/24, 4:32 PM Duck DNS - install

Duck DNS spec about why install faqs

Duck DNS

Operating Systems
linux cron linux bsd cron linux netcat cron linux GUI DotNet Core Script
mono windows-gui windows-script windows-powershell windows-c#

osx osx-homebrew osx IP Monitor osx-ios RealDNS android pi

raspbmc ec2
Routers
openwrt tomatoUSB mikrotik fritzbox dd-wrt allied telesis

technicolor tg582n zte h108n pfSense freenas EdgeRouter


smoothwall synology hardware
Standards
GnuDIP.http DynDns inadyn DNSOmatic

linux cron
if your linux install is running a crontab, then you can use a cron job to keep updated
we can see this with

ps -ef | grep cr[o]n

if this returns nothing - then go and read up how to install cron for your distribution of linux.
also confirm that you have curl installed, test this by attempting to run curl
https://www.duckdns.org/install.jsp 1/3
9/13/24, 4:32 PM Duck DNS - install

curl

if this returns a command not found like error - then find out how to install curl for your distribution.
otherwise lets get started and make a directory to put your files in, move into it and make our main script

mkdir duckdns
cd duckdns
vi duck.sh

now copy this text and put it into the file (in vi you hit the i key to insert, ESC then u to undo) you must
change your token and domain to be the one you want to update
you can pass a comma separated (no spaces) list of domains
you can if you need to hard code an IP (best not to - leave it blank and we detect your remote ip)
hit ESC then use use arrow keys to move the cursor x deletes, i puts you back into insert mode

echo url="https://www.duckdns.org/update?domains=exampledomain&token=a7c4d0ad-114e-40
ef-ba1d-d217904a50f2&ip=" | curl -k -o ~/duckdns/duck.log -K -

now save the file (in vi hit ESC then :wq! then ENTER)
this script will make a https request and log the output in the file duck.log
now make the duck.sh file executeable

chmod 700 duck.sh

next we will be using the cron process to make the script get run every 5 minutes

crontab -e

copy this text and paste it at the bottom of the crontab

*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1

now save the file (CTRL+o then CTRL+x)


lets test the script

./duck.sh

this should simply return to a prompt


we can also see if the last attempt was successful (OK or bad KO)

cat duck.log

if it is KO check your Token and Domain are correct in the duck.sh script

what now?
Well you probably want to setup port forwarding on your router to make use of your new DDNS name
we recommend portforward.com to learn all about this.

https://www.duckdns.org/install.jsp 2/3
9/13/24, 4:32 PM Duck DNS - install

฿ Bitcoin 16gHnv3NTjpF5ZavMi9QYBFxUkNchdicUS

Terms of Use
Privacy Statement

https://www.duckdns.org/install.jsp 3/3

You might also like