I have running node.js app in my docker container in Container Station in my QNAP NAS. It's working on my local network on the port I have specified.
Typically I would set reverse proxy pointing fe. my-domain.com/my-app :80 => :<local-port>
On NAS I have static IP provided, I have even a domain for public access (my-server.myqnapcloud.com) and I'd like to set up somehow my server to be visible outside. It doesn't have to be QNAP domain, I can set my own domain pointing to QNAP local address, but still I'm not able to forward local port to another in server scope.
What is the best way to setup such enviroment? It seems to be much easier without NAS at all...
If i'm not wrong, your QNAP server is over the router. If so, you have to change some settings...
Steps to do:
Open a Container Station and find the instance of your container.
Go to "Settings" then "Advanced settings" and find LAN bookmark (sieć)
There must be a grid: "Port Routing" with 2 columns: "Host" and "Container".
"Container" - a port on which container is listening incoming internal connections
"Host" - a port on which QNAP server is listening incoming external connections. You have to remeber this value!
Close Container Station and open myQNAPcloud application
If you don't see the service which is responsible for port forwarding, you have to add appropriate service.
After that you have to execute changes in a router.
Note:
I've struggled with the configuration of PostgreSQL database installed on container. Finally, i was able to achieve that. Here is detailed description: How to enable remote connections to your PostgreSQL server (in Container Station) on QNAP NAT server over the router
Hope this help.
Related
I am trying to access my local [WAMP] webserver from any remote devide. I am so far able to access it from a device inside the LAN, but fail to do so from outside it. As far as i know, port forwarding is how we achieve this. But currently unable to do that correctly.
Present error when trying to connect :
Some of the articles which i have followed so far are:
general-port-forwarding-guide
how-can-i-access-my-server-from-outside-of-my-lan
how-to-expose-a-local-development-server-to-the-internet
The main steps which i follow are as follows:
Make sure server is accessible inside LAN.
Open router's port forwarding settings and port forward the set static ip address (in step 1). Set port 80 and 8080 for communicating.
Access the server via my public ip (can check public ip and if forwarded port is accessible from here)
This is a temporary solution for testing purposes only with 8 hour server connection duration time limit (and a limited no. of server connections):
access_local_server_remotely_for-Development-And-Testing-Only and here is a video guide about how to use it.
I have a small local network, with the following devices: a router , a Dell laptop running Ubuntu 16.04 LTS as my server, and another HP laptop to test access.
My IP addresses look like this:
router: 192.168.0.1
server: 192.168.0.101
laptop: 192.168.0.100
I have successfully setup LAMP and have one small page (/var/www/html/index.html) with one picture. I can't access this from my HP laptop by entering 192.168.0.101 into Firefox or Chrome.
In order to access your server you have to make it publicly so I will describe the steps required to do it:
Login to your router, search for Port Forwarding section and forward the port 80(HTTP Port) to 192.168.0.101(Your Web Server). You can find a guide for Port Forwarding after selecting your router model here : https://portforward.com/router.htm
Access your webserver by your external Ip. http://yourexternalip
(Optional) If you have dynamic Ip, you can set a Dynamic DNS to create a domain name that will always point to your webserver even your Ip will change after a router reboot or something like that. You can read this guide for setting up a DDNS: https://www.howtogeek.com/66438/how-to-easily-access-your-home-network-from-anywhere-with-ddns/
I have successfully created a scale set using (https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-customimage) with one instance from the my custom image:
The custom image has microsoft server data center DS1 V2 and node.js installed in and a copy of my application.
From the new portal I can see the IP of the VM.
I have also successfully started it from the powershell.
However the RDP on that IP with port 3389 or 50000, 50001 are not working.
I tried to add some inboud rules but the situation is same (may inboud rules not correct).
Please can you let me know the steps required after the scale set is created in order to make a RDP ?
You won't be able to connect to the IP of the VM from outside the VNET as each VM has an internal IP address. You need to connect to the public IP of the load balancer (you probably meant that implicitly but being precise just in case).
You will also need to create inbound NAT rules to map a port range on the load balancer public IP address to port 3389 on the backend, and double check that RDP was enabled on the source image before uploading it.
Take a look at this template for an example of inbound NAT rules.. https://github.com/Azure/azure-quickstart-templates/blob/master/201-vmss-windows-nat/azuredeploy.json
Please, advice on how to set the public IP address/domain name for a web page to be forwarded to a specific server machine on a subnet (say, 192.168.1.77). Can this be done via Mikrotik GUI interface?
An outside IP or assigned domain do not do this automatically, Mikrotik doesn't pick up the server behind a subnet if one does not set the path to it. I've seen a couple of tutorials assigning a server IP address in Mikrotik terminal with "masquerade" command but wonder if this can be done via Mikrotik Webfig GUI.
You need 2 things:
dst-nat to WEBserver
Default route on WEBserver set to Mikroitk
/ip firewall nat add chain=dstnat dst-address=PUBL.IC.I.P dst-port=80 or 443 action=dst-nat to-addresses=192.168.1.77
You must disbale /ip service www and www-ssl for using port 80 or 443
If Mikrotik isn't default route to internet for WEBserver say to me and I will explain how to do
For testing if it's working, you must test by other connectiont outside your LAN ( maybe smartphone without wifi)
I have a web server running out of my home. I have assigned it an address such as 192.168.1.123 on port 80.
I understand that this is running on my local network. If I go to another computer on my network and type in the server's ip address, I can see the server.
Is there a way to access this server from outside my LAN?
Yes, you need to set your router to forward connections to port 80 to your internal IP address (192.168.1.123). Look for Port Forwarding on your router admin screen which I would imagine you access by going to http://192.168.1.1
Keep in mind that your ISP may block port 80 completely in which case you can run your web server on a different port (for example por 8180) and have your router forward connections to port 8180 to your internal IP.
To access your server from outside, you just need to point your browser to your external IP address which you can find out by going to http://www.ipchicken.com
Assuming you have a connection to the internet:
https://github.com/progrium/localtunnel
is a quick way to access your local server from the internet. There might be similar implementations in other languages/platforms. This is just the one I know about.
Remember that security issues need to be carefully considered when opening your local network to the world.
If you use a PHP Webserver you can set it this way:
php -S <YourIPAdresse>:<SomePortNumber> <StartPHPpage>
Example: „php -S 192.168.1.123:9000 index.php"