DDNS on a Raspberry Pi using the Cloudflare API (Dynamic DNS)

preview_player
Показать описание
83% discount! That's less than 3 dollars a month, PLUS, you get 2 extra months for free!

DDNS or Dynamic DNS is REQUIRED if you don’t have a static Public IP address for your home network. In this video, I’ll show you how to setup DDNS on a Rasberry Pi (or any Linux computer) using a Linux Bash script and Cloudflare. We’ll also use crontab to make sure it keeps your IP address up-to-date!

SUPPORT NETWORKCHUCK
---------------------------------------------------

READY TO LEARN??
---------------------------------------------------

FOLLOW ME EVERYWHERE
---------------------------------------------------

0:00 ⏩ Intro
0:26 ⏩ What is Dynamic DNS??
1:42 ⏩ What do you need?
2:21 ⏩ STEP 1: Setup your Linux (bash) script
9:06 ⏩ STEP 2: Automate your script (crontab)

AFFILIATES & REFERRALS
---------------------------------------------------
(GEAR I USE...STUFF I RECOMMEND)

#ddns #raspberrypi #pia
Рекомендации по теме
Комментарии
Автор

--- 83% discount! That's less than 3 dollars a month, PLUS, you get 2 extra months for free!


DDNS or Dynamic DNS is REQUIRED if you don’t have a static Public IP address for your home network. In this video, I’ll show you how to setup DDNS on a Rasberry Pi (or any Linux computer) using a Linux Bash script and Cloudflare. We’ll also use crontab to make sure it keeps your IP address up-to-date!




SUPPORT NETWORKCHUCK





READY TO LEARN??


FOLLOW ME EVERYWHERE


0:00 ⏩ Intro
0:26 ⏩ What is Dynamic DNS??
1:42 ⏩ What do you need?
2:21 ⏩ STEP 1: Setup your Linux (bash) script
9:06 ⏩ STEP 2: Automate your script (crontab)


AFFILIATES & REFERRALS

(GEAR I USE...STUFF I RECOMMEND)

#ddns #raspberrypi #pia

NetworkChuck
Автор

hey everyone I just landed my first job in IT as a datacenter tech!

mattrozenboom
Автор

Thanks Chuck! This is great. FYI for anyone doing this recently: 

K0P1 has added a couple of config items to the script:

auth_method="" - it was necessary for me to set mine to "global" instead of "token"
proxy=false is the default so if your cloud flare DNS record is proxied, you need to set that to "true"

Otherwise, everything is just as Chuck showed in his video. :)

theloniuser
Автор

Hey Network Chuck!

K0P1 Here 👋 I was wondering why the script i wrote sometime ago suddenly gain some traction. Big thanks for the feature and great tutorial!

jasonkkf_
Автор

Good job. Please note the script now requires setting variable auth_method="global" for this to work as described in the video.

juanguirao
Автор

This is very informative. Just a suggestion, the current cron job will keep updating the record every minute even if the ip address is not changing, modifing the shell script a little to put an if condition to check if current ip address is same as the IP a minute ago will help not to hit cloudflare API every minute .

shashanktanwar
Автор

You got to be the first person within IT I've ever heard admit that nano is your favorite editor 😂 I've felt so alone for so long!

lpkampen
Автор

You can have timeout in between. When script executes (depends how cron is setup) and also 5 min to apply changes. Also the other side can have issue with cache and this will not work if you are behind CGNAT which is popular this days since providers are out of ipv4 and they don't support ipv6. Thanks for the great video, just wanted to add some issues that someone can run into

lexdevelop
Автор

Is it just me or does anyone else just want more and more raspberry Pi videos

kaitlynk
Автор

This is great Chuck! For example, DynDNS and Cloudflare services are great if you do IoT and want access to your devices at home or at a remote site for test and development purposes. Like you've shown with this configuration, you can point your IoT system at home or at a remote site to a URL and display all kinds of device and sensor data with the use of a Dynamic DNS service.

markdheilong
Автор

This channel has me gunning for an IT job by the end of the year, thank you for the inspiration

mtotten
Автор

I wrote a version that runs as a Cloudflare Worker. The idea is you POST an api token & the id of the hostname you want to update to the worker - Cloudflare adds a header containing your public IP address which the worker can then use to update the DNS record specified. This makes the client side incredibly simple and can be entered as a single command line directly into your Crontab. AS it can use the free tier of CF workers it costs nothing to run.

TimHolmes
Автор

ATTENTION: Git has updated and for your video the variable auth_method has to be change to "global" if you want it to work with the Global API Key. Cheers Chuck. thnks

tecnopadre
Автор

Love your video chuck, can you make more videos on networking with python

asmodeus
Автор

about the get one part 0:39 in US a dell poweredge cost about 150$ here in Cambodia the same spec cost about 600$

ngthav
Автор

I just found your channel and i love your teaching methods, I can actually understand what you saying and your videos are so enjoyable to look at :).

kendellkumar
Автор

There's a HomeAssistant integration for Cloudflare that I use to do this. Works wonders!

Eschguy
Автор

Thank you for mentioning the problem with Freenom Domains at the beginning of the video. I was pully my hair out trying to figure what was wrong.
I was using the Docker version `oznu/cloudflare-ddns:latest` which hasn't been updated in 2 years, but everywhere I found, some just 3 months ago, they were using it. Never was a problem with Freemon mentioned so I thought the problem was somewhere else. It's a bummer it doesn't work, but knowing means I can stop trying to get it to

LostOnTheLine
Автор

Straight to the point. No BS. Thank you.

JoelFabiani
Автор

Great tutorial as usual @NetworkChuck. I think it might be worth to mention that there's one last step in order to access the Raspberry PI from the internet, port forwarding needs to be setup on the router the PI is connected to

carlitosar