As soon as you need that your PC will be reachable with the public IP address, you can setup a free dns service in order to reach your machine with a unique hostname upon the changes of the IP address from the ADSL connection.
This guide is a reviewed one of my very old guide written for [Ubuntu][1]
There is still a free system for DNS dynamic resolution provided by https://freedns.afraid.org
This installation has been tested on RPI2 with final release of OSMC (I’m very confident that will work on RPI too)
Register your account
Go to https://freedns.afraid.org and register a free account
Freedns offers a lot of domain names (…and I mean a lot), assuming that you choose: mooo.com
You’ll have “yourname”.mooo.com
Install the packages
sudo apt-get install curl wget cron
Configure dynamic DNS
Login to Freedns and choose the link FreeDNS - Free subdomain AND domain hosting!
At the bottom of the page click the link besides your domain account named “quick cron example”, this will open a txt page, at the bottom there is an example for the cron script:
4,9,14,19,24,29,34,39,44,49,54,59 * * * * sleep 13 ; wget --no-check-certificate -O - https://freedns.afraid.org/dynamic/update.php?MkNRaEoxaxzxzczxzxzcwsTtTas1= >> /tmp/freedns_yourname_mooo_com.log 2>&1 &
Take note/copy this line; on OSMC box type:
export EDITOR=nano && sudo crontab -e
and paste/save the above line previously copied.
Reboot OSMC
sudo reboot
Test dynamic DNS
from another machine issue the ping command around the time you’ve choose in cron
ping yourname.mooo.com
If the OSMC respond you’re done.
Further notes
Since the original post the inadyn client is not needed anymore, both because at the moment contains a bug for freedns and because cron is less complicate. I’ve personally changed cron to update every 15 minutes instead of 5 minutes as the script proposed by freedns and I changed the append line “>>” to overwrite “>” for log in tmp; so here my cron entry:
0,15,30,45 **** sleep 6 ; wget -O - http://freedns.afraid.org/dynamic/update.php?MkNRaEoxaGoXCvCXffsNTkxODQxvA== > /tmp/freedns_myname_mooo_com.log
2>&1 &
The cron file (named: root) is located under this path:
/var/spool/cron/crontabs/root
I’m not involved in Fredns team, but I like their service.
[1]: HOWTO Configure Freedns (afraid.org) service with Inadyn (Lucid)