What I did was point my Subdomain to my NAS via namecheap DNS. ddclient updates the info (A record) every 2mins. Do it via either a cron or make ddclient as startup program.
Also as @vivek.krishnan indicated there is hit or miss, especially when the power goes and comes back and the new IP isnt...