I used to have that problem, it means that your IP changed. To solve it, just check it by either going to http://www.whatismyip.com/ or like me, make this batch file:
sudo nano myip.sh
and insert this code,
# Name: myip
# Author: O-P
# Purpose: Check current public IP address
curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
Ctrl + X and save it.
Now just run it using ./myip.sh
You can also get a dynamic DNS, there is several ways to do this, I'll give you an example of a free one.
Register in http://freedns.afraid.org/signup/ and login.
Go to Subdomains and create a free one.
Next go to Dynamic DNS, you should have the subdomain you created there. Right click Direct URL, and copy the key that appears in the url. Like,
Next install inadyn, this is a DNS updater, what it will do is to make sure it maintains the DNS you choose, just type,
sudo apt-get install inadyn
and configure it,
sudo nano /etc/inadyn.conf
with the following,
Now, we need to ensure that the Inadyn runs automatically after every reboot, run this on the console,
export EDITOR=gedit && sudo crontab -e
And add the following line,
Next just reboot the system,
After it has done rebooting just check if it is working,
ps -A | grep inadyn
And you are good to go. You can connect to it using the domain you choose.