In the last post we learned what cronjobs are and how we can create timed automatisms. We wrote our own cronjob and learned how to add Python scripts to cronjobs.
This post will focus on what you can do if your hoster does not support DDNS. I have never used free DDNS provider yet but for this blog post, I will log in to a DDNS provider, enter the data in my FritzBox and test it. If you already succeeded in the previous posts of this tutorial series, you can skip this post.
Sign in to noip.com
Setting up the Fritzbox and testing
From now on, any connection to your created subdomain ends up on your router. In my case that would be the address http://raspi-series.ddns.net. If you put that in the browser, nothing will come because you have not set up a web server yet. We will come to that later.
The professional alternative to FritzBox
As you have seen above, the FritzBox can only manage a single DynDNS. If, like me, you have multiple Dynamic DNS addresses that point to your home, you would need to write a script and retrieve it automatically. You can read here, how to do that.
In the linked tutorial, you only have to make a change in the script. In the tutorial comes the line:
top_level_url = "https://dyndns.kasserver.com/?myip=" + current_ip
You change that in
top_level_url = "http://dynupdate.no-ip.com/nic/update?hostname=" + domain["domain"] + "&myip=" + current_ip
To the tutorial
Now you now how to create any number of subdomains and redirect them to your home network. You now have the ability to access your home network from the whole world.
In the next post I will explain what port forwarding is and how to use it correctly. It will be about how you can redirect the connections to your home network, directly to your Raspberry Pi, and I will make an SSH connection to my Raspberry Pi over the Internet, finishing the post by testing it.