Make my NAS send me a notification when it receives a new public IP

0

In order to keep my most valuable files safe(r) I have a remote NAS setup. Every night I use rsync to send my changed files from my local server to the NAS and this is working somewhat okay. My biggest issue is that every once in a while I open the messages log on the server only to find out that the syncs' been not working for a while. Why? Because the ISP that provides the Internet-connection for the NAS only uses dynamic IP's and the IP has been changed.

This results in "down time" and an unfortunate room for error which I'm not very happy with.

  • In the best of worlds this would be solved by having a static IP for the NAS. This is not possible.
  • In the second to best of worlds, this would be solved by having the NAS tell my server whenever the IP changes and then make the server change the IP in the rsync. (Is this possible?)
  • The third best would be to make something notify me whenever the IP changes. A cron job running on the server, pinging the NAS and sending me an e-mail whenever an error occurs, or even better, having the NAS take care of that.

Does you have a good idea for how to solve this? School is soon out and then I'll put some time into fixing this, but I thought I'd listen to the wise of the Internet as well.

Quick facts: The NAS is a Synology DS213j and the server is running FreeNAS.

Regards.

GLaDER

Posted 2015-05-24T08:26:11.763

Reputation: 451

2Does the NAS have any DynDNS (or other) capability so, instead of an IP that changes all the time, you have a domain name that your script uses? – Kinnectus – 2015-05-24T08:49:10.007

Oh sir you were so right indeed! This never crossed my mind and sure is the simplest of solutions.

Have some cake! – GLaDER – 2015-05-24T09:37:23.340

Answers

1

As pointed out by Big Chris above this can be solved using Synology's DDNS-feature. These are the steps I went through:

  1. If you have not already registred your NAS visit https://myds.synology.com and do so.
  2. On the NAS, navigate to the Control Panel > External Access and enter Synology as your service provider.
  3. Fill in the required information.
  4. If you have already configured your port forwarding un check that box and you're done!

  5. Now change your previously used IP in all your configs to choosen_hostname.synology.me

Thanks again to Big Chris for pointing this out!

GLaDER

Posted 2015-05-24T08:26:11.763

Reputation: 451

2(Still then: make your script send email alerts upon success and failure. You don't want other errors to be buried in the log files either...) – Arjan – 2015-05-24T10:04:07.517

That sure is true @Arjan, du you have a good way of doing this? – GLaDER – 2015-05-24T10:06:48.663