NodeJS hosting on linux VM, and http requests from Windows to Linux - node.js

If I'm hosting a local NodeJS server on an Ubuntu Linux Machine, is it possible to make http requests from a browser on Windows. For instance if the server is hosted on localhost:7700 on the Linux VM, how can I make http requests from Windows on?
The server is hosted with NodeJS on a Linux VM.

You have to set port forwarding. If you are using Virtual Box look here link. Instead of localhost:7700 try using 0.0.0.0:7700. Also remember to open 7700 port on your machine. The last thing is to set your network as bridged adapter to allow connection between your host OS and VM.

Related

How to host my nodejs API on my local ubuntu machine

I want to host my nodejs api that is being served to a front end (react-native). I know how to do it on aws ec2 (using nginx) but I don't know how to do it on my local ubuntu machine. (I am using a wifi router, Jio Fiber to be specific). Someone told me that port forwarding is the thing which I currently need.

Cannot connect to a server on Cent OS Machine

I have installed CentOS as a virtual machine (using Virtual Box), on my Windows OS. I am running a lighttpd server on my CentOS machine. I am trying to access the server, from my browser, which is running on Windows, using the IP address and port number. But, I am getting the following error: Firefox can't establish a connection to the server at 10.209.145.152:8080.
Also, when I am running the server on Ubuntu(as a virtual machine using VMware Player), I am able to connect from the Window's browser successfully. Can anyone please suggest me, what I might have been missing on CentOS Machine. Thanks.
I would suggest that it is something that has to do with the VM setup. Compare the configuration of your Ubuntu VM and the CentOSVM. In order to connect from Windows to the VM, I think that you need to setup a bridge network connection rather than NAT. But I am not sure, so I would suggest you try all the different options.
Hope that helps!

can't ping avahi alias from windows over LAN but can from other linux VMs

Context: i've set up a vm server for GIS testing and dokuwiki on the domain root. I'd like to serve the gis web apps on a subdomain so that dokuwiki url renaming will never conflict (and it just feels cleaner). I thought i had it solved with avahi-aliases, but then discovered...
Problem: I can't reach the subdomain from any windows pcs on the LAN. Linux VMs connect just fine. Am i trying the impossible or just doing it wrong? (i'm a DNS noob) Why would Linux find the subdomain but Windows not, even on the same LAN??
Setup:
i can't change anything on the corporate routers/servers.
VMs are on different PCs on the same corporate LAN.
VM1 (virtualbox, hosted on windows PC1): Mint 13
VM2 (virtualbox headless server, hosted on windows PC2): ubuntu server 12.04, LAMP, samba, avahi, avahi-aliases.
primary domain: vm2.local
subdomain: gis.vm2.local (configured in apache and avahi-alias)
What works:
I can reach vm2.local AND gis.vm2.local from vm1 (via ping and browser).
I can reach vm2.local from any windows pc on LAN (via ping browser).
What doesn't work: I cannot reach gis.vm2.local from any windows pcs on the LAN.
Any ideas or advice is appreciated!
Sounds like either a firewall issue or Apache/IIS (whatever is hosting your web app) isn't listening to all traffic (If you are actually sharing networks). Try a traceroute/tracert from the machines to the destination and see what paths they take. It's a little hard to troubleshoot without actually seeing how your network looks.
You can also test if your hostname resolves by trying a ping on the PC's having issues.
If it says "Ping request could not find host . Please check the name and try again" - It's a DNS issue and you can address it quickly by providing the IP of the machine with its hostname in %WINDIR%\system32\drivers\etc\hosts

host webapp in my machine trough virtual machine

im using windows 7 ultimate in a vmware non-commercial version, i have an mvc4 asp.net app running within IIS. i manage to get my app working on localhost (vmware win 7) perfectly.
now im asking 2 questions :
1 - is it possible to browse my app from a machine connected to my local network ?
2 - is it possible to host my app trough this configuration and to make it available in internet. like http://xxx.xxx.xxx.xxx (my public ip adress)
thank you all.
Yes to both questions, if your browser machine can hit the port the server machine is serving the app on. On WAN, you would need to make sure your router didn't block requests to the server's port, and the same for any modem/firewall that connects you to the internet at large. Also, if your public ip is not static, it may change.

How to open port 9091 on a linux running under vmware?

i have on my machine windows 7.
I installed vmware player and created a virtual machine running centos.
I installed Transmission on the centos.
Now i want to access it via web, like http://111.111.111.111:9091
9091 is the port of Transmission.
This port is showing closed.
So, how can i open that port so Transmission can conect?
where do i need to open it? On windows? On linux? On router?
How i do that?
Thank you.
Your router may be configured to route packets from the public network to the local machine in the private network. It needs 9091 port to be opened and routed to the private IP.
Moreover, you need to ensure that your router can ping your centos guest before.
If it can't ping, take care of the network settings of VmWare host, AKA (bridge|nat|private|...) network mode.

Resources