Dynamic DNS for NAS-based web server - reality check?
Dynamic DNS for NAS-based web server - reality check?
Author
Discussion

Escapegoat

Original Poster:

5,135 posts

166 months

Thursday 9th April 2020
quotequote all
I've recently installed a NAS at home. All good so far, with local file/folder sharing, photo archiving, music serving, etc.

We have Virgin Media broadband, and I want to install the web-server software and create a small and low-traffic website on the NAS.

As I understand it, Virgin Media doesn't assign static IP addresses, so the process I think I need is:
1 - register a domain at a provider offering a Dynamic DNS option (e.g. namecheap)
2 - set up the niginx/Apache Web server on the NAS
3 - do the necessary port-forwarding on the VM hub/router
4 - set up the Dynamic DNS service
5 - create a record at this service to point to my dynamic IP address
6 - then build the website
7 - optionally, add an email server to the NAS and send/receive emails on the same domain
8 - secure all of the above
9 - then we can share photos/etc adding password-protection via htaccess if necessary

Are there any 'gotchas' I need to be aware of? If I understand the stuff I've learned so far, not all domain providers have a DDNS service. I couldn't see it at Siteground, for example. I think I prefer to avoid sub-domains, but I'm open to advice if there's a good reason for it.

(I've had the '403 Forbidden' message when posting, so have deleted the web addresses I included and hope it's OK this time.)

robbieduncan

1,993 posts

267 months

Thursday 9th April 2020
quotequote all
Ensure your NAS/router is setup to update the dynamic DNS service when your external IP changes. I have my router do this.

robbieduncan

1,993 posts

267 months

Thursday 9th April 2020
quotequote all
BenjiS said:
Someone will attack it. What’s your plan for protection?

Frankly I don’t understand why anyone would want to host their own website or mail server these days. Cloud services are much better protected and a lot less hassle. In for light use, generally free.
I have a similar setup to allow me to have access to some internally hosted stuff from outside. I don't use it to host a website that anyone else can access (you need a username/password to get see the root of the site) and I let Google handle the email.

Also it's fun to setup!

akirk

5,778 posts

145 months

Thursday 9th April 2020
quotequote all
I think that Virgin will give fixed IP addresses - however only to business customers, so you have to pay more to get one... possibly not worth it...
of course you can also bear in mind that the IP only changes when you reboot the router, generally it will fix onto one ip for weeks+ at a time...

Penelope Stopit

11,209 posts

140 months

Thursday 9th April 2020
quotequote all
BenjiS said:
Someone will attack it. What’s your plan for protection?

Frankly I don’t understand why anyone would want to host their own website or mail server these days. Cloud services are much better protected and a lot less hassle. In for light use, generally free.
Always interested in free

Please post more information

Penelope Stopit

11,209 posts

140 months

Thursday 9th April 2020
quotequote all
Duck DNS
free dynamic DNS hosted on AWS

http://www.duckdns.org/

Works nicely

webstercivet

457 posts

105 months

Thursday 9th April 2020
quotequote all
akirk said:
of course you can also bear in mind that the IP only changes when you reboot the router
Not true, the IP address can change whenever the lease runs out, i.e. when it suits your ISP.

Dynamic DNS is easy - set up DuckDNS for free, then use your "real" domain provider's DNS settings to point it to your DuckDNS subdomain.

But hosting anything at home on a NAS is a bad idea. NASes such as Synology do not have a good track record on security - investigate Synolocker, for starters. And Virgin Media upload speeds are slow. Much better off hosting stuff in the cloud.

Harpoon

2,550 posts

245 months

Thursday 9th April 2020
quotequote all
webstercivet said:
Not true, the IP address can change whenever the lease runs out, i.e. when it suits your ISP.

Dynamic DNS is easy - set up DuckDNS for free, then use your "real" domain provider's DNS settings to point it to your DuckDNS subdomain.

But hosting anything at home on a NAS is a bad idea. NASes such as Synology do not have a good track record on security - investigate Synolocker, for starters. And Virgin Media upload speeds are slow. Much better off hosting stuff in the cloud.
Likewise Zxyel NAS units eg

Zyxel said:
A remote code execution vulnerability was identified in the weblogin.cgi program used in Zyxel NAS and firewall products. Missing authentication for the program could allow attackers to perform remote code execution via OS command injection.
https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml

If you've got anything of value on the NAS, I wouldn't be hosting something public facing on it.

mikef

6,158 posts

282 months

Thursday 9th April 2020
quotequote all
Agree this is something to do on a dedicated NAS box (I bought a Synology off eBay for the purpose). If there’s a database behind your website consider running that on a separate system. Also consider a cheap SSL certificate for your site, like a PositiveSSL cert from NameCheap. Free certs need to be reviewed every couple of months

babelfish

1,020 posts

238 months

Friday 10th April 2020
quotequote all
Personally I wouldn't bother hosting at home now, and I did it a lot in the past for fun.

With so many companies offering solutions "in the cloud" that's where I do it now.

You can do something like register a domain at Cloudflare, use their free SSL certs, point the DNS to an Amazon AWS S3 website that you've built and it'll cost you the grand sum of whatever the domain name registration cost.

AWS S3 is free unless you get a large amounts of hits. Lots of bolt ons to do whatever you want to so.

A lot of companies are going/have gone this way for a reason.

Other Domain name, DNS & cloud server suppliers are available.

megaphone

11,695 posts

282 months

Friday 10th April 2020
quotequote all
My Virgin IP has not changed in a year, even after a router reboot it has come back the same.

768

20,785 posts

127 months

Friday 10th April 2020
quotequote all
BenjiS said:
Frankly I don’t understand why anyone would want to host their own website or mail server these days.
Learning, control, privacy, flexibility, etc.

Sounds fine to me OP, though I haven't used dyndns for a very long time - does that not make TLS difficult? Just limit what's accessible to the minimum, ensure you're hot on security patching and backups.

Penelope Stopit

11,209 posts

140 months

Friday 10th April 2020
quotequote all
BenjiS said:
Penelope Stopit said:
BenjiS said:
Someone will attack it. What’s your plan for protection?

Frankly I don’t understand why anyone would want to host their own website or mail server these days. Cloud services are much better protected and a lot less hassle. In for light use, generally free.
Always interested in free

Please post more information
Hosting/compute of various forms https://aws.amazon.com/free/?all-free-tier.sort-by...
Thank you for this

Was hoping something other than Amazon would be posted

Several months ago when attempting to set something free up with Amazon was informed that Greece wasn't a supported location

768

20,785 posts

127 months

Friday 10th April 2020
quotequote all
mikef said:
Also consider a cheap SSL certificate for your site, like a PositiveSSL cert from NameCheap. Free certs need to be reviewed every couple of months
Renewing the certs can be automated.

768

20,785 posts

127 months

Friday 10th April 2020
quotequote all
Penelope Stopit said:
Thank you for this

Was hoping something other than Amazon would be posted

Several months ago when attempting to set something free up with Amazon was informed that Greece wasn't a supported location
I'm sure they'd give you an account, wouldn't they - you don't need the hosting to be in Greece presumably?

Escapegoat

Original Poster:

5,135 posts

166 months

Friday 10th April 2020
quotequote all
Thanks, all. A lot to digest here and I've obviously got more research to do.

I don't take security lightly, and I was aware of the ransomware exploit on Synology from a page on The Register. The NAS does have (or rather will have) our own personal and professional files on it, but I bought SSDs for it with the idea of using encryption (SSDs to offset the performance hit). I will also setup automated back-up to the cloud, and the Macs' files will be encrypted by Time Machine.

Trustmeimadoctor

14,370 posts

186 months

Friday 10th April 2020
quotequote all
encrypted drives are no protection unless they are removed from the machine.

webstercivet

457 posts

105 months

Friday 10th April 2020
quotequote all
Encrypting data on disk doesn't provide any protection against the risks we're discussing. Disk encryption really just protects your data in the scenario that someone's physically stolen the NAS/disks.

Don't want to discourage you, but there's a lot to be said for learning this stuff in an environment that isn't your home network with personal data.

Penelope Stopit

11,209 posts

140 months

Friday 10th April 2020
quotequote all
768 said:
Penelope Stopit said:
Thank you for this

Was hoping something other than Amazon would be posted

Several months ago when attempting to set something free up with Amazon was informed that Greece wasn't a supported location
I'm sure they'd give you an account, wouldn't they - you don't need the hosting to be in Greece presumably?
Thank you

No doesn't have to be in Greece

Will take another look and attempt to open an account

Do you know which free tier/tiers will run a website?

768

20,785 posts

127 months

Friday 10th April 2020
quotequote all
There's one free tier on Amazon, it includes a variety of things the most comparable of which to a home computer is the smallest EC2 instance.

Amazon S3 might be suitable if you're just hosting files, or a whole stack of other services for specific things depending on what you're trying to do.