Duck DNS - Install
Duck DNS - Install
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#
raspbmc ec2
Routers
openwrt tomatoUSB mikrotik fritzbox dd-wrt allied telesis
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
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
next we will be using the cron process to make the script get run every 5 minutes
crontab -e
./duck.sh
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