Local windows service not accessible to the remote computer - node.js

I am deploying a React app on a virtual machine, windows server 2012, hosted on the IIS server. The website is successfully running on the local server. When I try to access the website through a remote computer, the static components are rendered successfully, but the API doesn't work. The API is written in node.js and installed as a windows service on the windows server with the port number 5000.
I put localhost:5000 as the axios base url in react. But when I try to access from the remote computer, the computer is reading from its own localhost instead of the server's localhost.
Even if I change the axios base url from localhost to the server's ip address, it still cannot read the API properly.
My questions are as follows:
How to make the remote computer reads from the server's localhost without putting the server's ip address?
How to make the local server's windows service accessible to other computers?
What is the best practice to store the API base url in React in production? (store in.env, config, etc...)?

I just solve the issue and I post the answer here for anyone who has the same issue.
Windows
Create a firewall rule (Windows only)
You need to allow other computers to connect through your firewall.
Open the Windows Firewall
Go to “Inbound Rules”
Click “New Rule”
Select “Port” to make a port rule
Under “Specific local ports”, enter 80 and 8000 (for me it's port 5000)
Select “Allow the connection”
Click “next” then choose a name for your rule.
Source of this answer: [https://otree.readthedocs.io/en/latest/server/adhoc.html#windows][1]

Related

Not able to access blazor website from other computers

I am trying to host a Blazor website on a local Windows machine via IIS, and it can be accessed from the same machine using IP address in the URL like https://10.0.0.123:8080/myblazor, and I also make sure port 8080 is opened on the firewall, but I am not able to access my Blazor website using the same URL from other computers. Does anyone know why? Thanks in advance!
I added another regular website (simple HTML website) and I can access from other computers. So doesn't look like it's the firewall issue or IIS issue.

Domain creation on windows machine via IIS

I wanted to create and map a domain(ex: site1.domain1.com) locally to the server running on localhost with some port, I've been trying to do via IIS, but raising port conflict issue, unable to create and start site domain while web server is up since the port is already occupied and vice versa.
Could you please provide how to resolve this or any other simple way to create and map the domain with the server running on localhost.

How to use slack auth running in docker from within a private IP addressed enterprise network

We are deploying our application in docker within our enterprise. The host machine has an RFC1918 space in the 10/8 network and the docker containers are on 172.21/16 space.
I'm trying to use slack authentication to authenticate our node/react application which works locally in development mode, but I believe the second layer of private address space may be throwing a wrench into the communications. The redirect url for the node/react app is using the IP of the host machine, which is what you are hitting when you attempt to login to the server via the web interface. I've tried many combinations but basically you navigate to 10.1.1.4:3000 which is configured in the Slack API as our redirect URL and is also configured in the .env file for our node app. Once you click continue on the slack auth page the page doesn't load but just hangs.
I've changed the redirect URL to localhost, the gateway IP of the docker network, and the IP address of the host machine the docker container is running on, which I think is the way to go, but nothing lets me hit my app.
If you're using Linux docker hosts, you could try using the host network mode.

How to access website hosted on IIS, from remote computer?

I hosted a website on IIS, running on port 81. I can access it on the server machine from http://localhost:81/test.aspx.
I also can establish a remote desktop connection to the server, using its ip adress server-ip.
Now I want to access the web site using my PC (or any other PC). However, I type type http://server-ip:81/test.aspx on my web browser and the page is not loaded.
I've already opened port 81, by adding a new inbound rule to the server's windows firewall. The exception for World Wide Web Services (HTTP) is also ticked on. I even shut down the firewall entirely, but I still can't access the web site remotely.
Can somebody tell what the problem may be? Thanks in advance.

VM on azure TFS installed how to access it remotely

Ok i have successfully created a VM Server 2008 on Azure and installed the TFS 2012 express.
I try to access it via visual studio, web interface but i can't.
Port 8080 at the VM's firewall is open for public, however the port appears closed through a port scan.
Any suggestions ?
Note: I know about https://tfspreview.com/ however i would like to setup my own on my own VM :)
Opening the right ports on the firewall is a good start. But you need to let Windows Azure which ports should be opened externally and forwarded to your VM (also supports load balancing).
In order to make port 8080 externally accessible you'll need to go to your VM in the portal, go to the endpoints tab and add an endpoint here (make sure it maps to private port 8080):

Resources