How to append domain to Website hosted on NAS326
Hi,
im kind of new to this thopic (as you might already think)…so I got a simple question:
How do I append a domain to my webpublished Website on NAS326?
Now I am hosting my Website through Webpublishing. Since I also own a domain, I would like to use it for my Website.
With visible domain forwarding, the Website works fine. But I mean thats not the point of owning a domain.
With invisible forwarding the Website is not shown correctly.
Is there a way to host a Website from NAS326 with a domain instead of http://xx.xxx.xxx.xxx:5000/MyWeb/Website?
Do I need to install additional apps via App-Center/software via ssh to properly host my Website under my domain? Any tips?
Thanks in advance :)
Jakob
Best Answers
-
as I cant map ports.
Your router could do that. Many routers can do port translation in their portforwarding menu. In that case you can forward PublicIP:80 to NasIP:5000
0 -
I'm sorry, as long as the webserver redirects to an ip address, it will always show up in your url. The redirection to a port can be captured by forwarding both publicip:80 and publicip:5000 to nasip:5000.
If you want more you'll have to edit the apache configuration file. The files involved for the packages are located in /etc/pkg_service_conf, and are volatile. Some files are generated on boot, or edited.
If you edit them, you'll have to restart apache:
/etc/init.d/pkghttpd.sh restart
If you have figured out how to change the redirections to your needs, I think I can help you with a script to inject that at boot.
About 'publicIP:port/folderName', I guess this is about webdav. This is running in a separate server, with config in /etc/service_conf/http_dav.conf and startscript /etc/init.d/davhttpd.sh. As it's a separate server, it has to have it's own port, unless you put a reverse proxy in between.
If it's only for own usage, it might be easier to use the build in SOCKS server in the ssh daemon. If you forward some high port on your public IP to port 22 of the NAS, and enable the ssh server, you can login from outside:
ssh -p <high_port> -D8080 admin@public_ip
then you have a SOCKS server on your remote device. In your browser in network settings enable the SOCKS server on localhost:8080, and the browser will browse via your NAS. And so you can reach to all webpages on the NAS itself.
This is also much safer, as you only expose your ssh server. You could do that on port 22, but that attracks bots, which will try to login. If you use strong passwords that will fail, but why take the risk?
0
All Replies
-
This setup seems insecure.😅 Do you have a router or firewall protecting your NAS? It's not danger to expose your NAS to the internet directly. If you have a router or firewall in place, consider using NAT or port forwarding to access your NAS securely…..
0 -
Yup the websites is published through the router xx.xxx.xxx.xxx through port 5000 (http) or 5001 (https) through port-forwarding
0 -
What exactly do you want? It's (relatively) easy to use http://yourdomain.tld/MyWeb/Website. Just let the domain point to your public IP, and let the router do port translation.
If you don't have a fixed IP, you could set a CNAME to point to a dyndns address, and let the update automatically.
0 -
Thanks for your answer.
As I understand, what you suggest is forwarding the domain. But the problem is, that if I forward mydomain.tld to myPublicIp:Port the website is shown incorrectly (on invisible forwarding) or the public ip is still shown in the url bar (visible forwarding). Do you know what I mean?
0 -
if I forward mydomain.tld to myPublicIp:Port
You can't. A domain is translated to one or more IP adresses (or to another domain using a CNAME), but you can't specify a port. So the browser will access the IP on port 80 for http, and the router on that IP has to do the port translation.
Do you know what I mean?
Not really. Are you saying the the server, when accessed on a domain, does a redirect to an IP address?
0 -
thanks!
What I meant was forwarding through CNAME, which leads to incorrect visibility (iFrame) or not having the domain visible in the url-bar but instead the actual location of index.html etc (=http://publicIP:port/Myweb/Website).
Now as you already mentioned, one cant map a domain to ip:port.
That seems to be the problem (I guess).
If I just redirect the domain to the IP, it will just open the zyxel-nas326 login page but not my Webpublish.
I guess thats because I publish my Website via Webpublish (=port 5000/5001) and the domain wont lead to my website as I cant map ports.
Hope its clearer now
0 -
as I cant map ports.
Your router could do that. Many routers can do port translation in their portforwarding menu. In that case you can forward PublicIP:80 to NasIP:5000
0 -
Thanks a lot for that comment. Didnt mean to mark it as solution tho (yet)😅
This works, yes. But the problem still exists then. The shared adress of Web-published NAS-folders is publicIP:port/folderName and I don't think one can change this.
Therefore I cant forward to the folder. Just to the port.
Do you know if there is a way to forward further?0 -
I'm sorry, as long as the webserver redirects to an ip address, it will always show up in your url. The redirection to a port can be captured by forwarding both publicip:80 and publicip:5000 to nasip:5000.
If you want more you'll have to edit the apache configuration file. The files involved for the packages are located in /etc/pkg_service_conf, and are volatile. Some files are generated on boot, or edited.
If you edit them, you'll have to restart apache:
/etc/init.d/pkghttpd.sh restart
If you have figured out how to change the redirections to your needs, I think I can help you with a script to inject that at boot.
About 'publicIP:port/folderName', I guess this is about webdav. This is running in a separate server, with config in /etc/service_conf/http_dav.conf and startscript /etc/init.d/davhttpd.sh. As it's a separate server, it has to have it's own port, unless you put a reverse proxy in between.
If it's only for own usage, it might be easier to use the build in SOCKS server in the ssh daemon. If you forward some high port on your public IP to port 22 of the NAS, and enable the ssh server, you can login from outside:
ssh -p <high_port> -D8080 admin@public_ip
then you have a SOCKS server on your remote device. In your browser in network settings enable the SOCKS server on localhost:8080, and the browser will browse via your NAS. And so you can reach to all webpages on the NAS itself.
This is also much safer, as you only expose your ssh server. You could do that on port 22, but that attracks bots, which will try to login. If you use strong passwords that will fail, but why take the risk?
0 -
To host your website on NAS326 using your own domain, you'll need to set up DNS settings to point your domain to your NAS's IP address. Then, configure port forwarding on your router to allow traffic on port 5000 (or whatever your NAS uses) to reach the NAS.
You might also need to set up a reverse proxy or use a dynamic DNS service if your IP changes frequently. For additional tips on setting this up and exploring other tech solutions, you can check out resources on our website, XtraSaaS. No additional apps should be required unless you're looking for advanced features like SSL.
0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 144 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 238 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.3K Consumer Product
- 247 Service & License
- 384 News and Release
- 83 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight