External access to your web site on Synology

Your Synology box probably has an Internal IP address which can only be accessed from machines on your internal network.  If you want access from external devices, anywhere on the Internet, then you need to 'map' the external IP address of your Router to the Internal address of your Synology.  You also need to map a 'nice' hostname (e.g. eadie.ddns.net) to that external IP address, so that users don't have to remember an IP address.

Mapping an External IP to and Internal IP address.

This is normally referred to as 'port forwarding' and needs to be set up on your router.  You need to set up port 80 (for http) and if required 443 (for https).  Also, if you want to be able to install new Themes and Plugins, and update them, once you have Wordpress installed, you will need port 21 for FTP.  I can't go into all the details for every router, but on my BT Home Hub 5 it was fairly obvious from the Admin - Advanced menus.  (Check your router manual!).

Mapping a hostname to your external IP address.

This is known as setting up a DNS record, pointing your nice hostname (e.g. eadie.ddns.net, or your own personal domain) to an IP address.
The first problem is that most domestic broadband connections do not keep the same external IP address for ever, as your ISP can change it (at their convenience) from time to time.  If this applies to you, then you have two options:
  • Buy a fixed IP address (from your ISP), or
  • If you're like me and are trying to do thing 'for free' (which is why I'm trying to set up my website on my Synology, so that I don't pay for hosting) then you need to set up a 'Dynamic DNS system' which will constantly keep track of your external IP address, and change the DNS setting as the IP address changes.

Dynamic DNS (DDNS)

There are several Free Dynamic DNS providers, and I have tried a few, such as NoIP, DtDNS, FreeDNS, etc.  They offer slightly different services (for free), but you will also have to set up on an internal machine, an automatic system which will constantly tell them what your external IP address is.  You can do this on:
  • Your PC or MAC,
    • This will of course only work while your computer is on, so if your IP address changes overnight, that won't be flagged up until the next morning, or if you go away for several days and switch your computer off . . . .
  • Your Synology box,
    • Seems ideal, except that the Synology software (for some strange reason) only allows ONE URL/hostname for each DDNS provider you use.  So if you want four websites/hostnames, you will need to register with four DDNS providers.
    • (I have no idea why this limitation is built into my Synology box, and I may have done something wrong, but . . .)
  • Your router.
    • This seems the ideal, as most people's router is on 24/7, but on my BT Home Hub, I can only use ONE DDNS provider, so if I hit the limit of their maximum hostnames for their free service, I can't add more from another provider.
    • This limitation and the Synology limitation conspire to make things more awkward than they ought to be (but we're here to try to overcome these problems!).  At the moment, for testing purposes, I have three (from the same provider) set up on my router, and two (from two different providers) on my Synology.  If you want to go much beyond that, I suggest you start paying for your DDNS!
Again, setting up on the Synology (Control Panel - External Access - DDNS) or your Router is fairly straightforward.  You will need to enter your login details for the DDNS provider, and the hostname(s) you've chosen.  Both should show you whether they are successfully working.

No comments:

Post a Comment