I have a VirtualBox setup with Arch Linux. I use it to run various tutorials on Node.js and Redux. The host OS is Windows 8.1. I've mapped guest port 8080 to host 8080. When I run a simple Node.js server on the VM I can access it from the host machine on this port, just as expected.
Now I need to try another test server (webpack-dev-server). I start it in VM and check that it works via curl, but when I try to access it from the host, it says the connection was reset by peer. curl -v shows a pretty standard log: it sends a header and then says Recv failure. So:
one web server on VM works OK and is accessible via the mapped port;
another web server on VM works OK on VM, but is not accessible via the mapped port.
What could be the cause?
I think it's something with VirtualBox, but just in case I label this with webpack-dev-server as well.
Related
I've just got a VPS with Ubuntu 18.04 on it.
Now I want to move my Django app I've been developing on a local PC to the VPS. I moved it and it starts okay - it says the server is running on 0.0.0.0:8000.
So the server is running fine, but I can't connect to it from a web browser on my local PC. Note: I'm trying to access it with ip of the server (ip:8000)
I have port 8000 enabled with netstat and I have added the IP to ALLOWED_HOSTS.
Update: I managed to access it using ngrok. By running the command ngrok http 8000 I got the url with which I was able to access the server.
Now I'd like to know how can I access it with IP.
I have an application signed for microsoft store which starts a web socket server on localhost (0.0.0.0:8081) on launching. Then I run python script with websocket client on the same host and try to connect to server (ws://127.0.0.1:8081) and it couldn't connect. But I can connect without any problems if I run this python script from another PC. Actually it works fine on local PC on another platforms: Win7, MacOS.
What i tried:
disabled windows firewall and defender
tried to add exception for application using CheckNetIsolation LoopbackExempt
tried to connect using different ip (0.0.0.0, 127.0.0.1, pc name)
It seems like I have to switch/set on/off some option for application or win10, but I can't find it
Thanks for help in advance
I found a solution https://learn.microsoft.com/en-us/windows/iot-core/develop-your-app/loopback
if you want to connect smth to win application on win 10 you should run
CheckNetIsolation.exe LoopbackExempt -is -n=your application
permanently
the best way to add it to start up menu
I have laravel app which is running in my windows local server. This laravel app is running port:80. I want to load this app in my Ubuntu VirtualBox.
My IP Config:
IPv4 Address : 192.168.8.157
Subnet Mask : 255.255.255.0
Default Gateway: 192.168.8.1
I have config my virtualbox as Bridged Adapter. In my /etc/hosts (ubuntu virtualbox), I have this :
127.0.0.1 localhost
127.0.1.1 asus
192.168.8.157 v2.my.local
I have made a hello word app (node.js) in my local windows which is running on port :3000, and it is running in my VirtualBox by typing v2.my.local:3000, but if I type v2.my.local on my VirtualBox, it is not working (although app is running on windows local machine). it says:
This v2.my.local page can’t be found
Any suggestion? Thanks in Advance.
May be windows firewall blocking connections via port 80. turn off firewall and try it, if it works. Start windows firewall and add firewall rule to allow connections via port 80. If your windows version is 10 then, it will block all virtual box related connections. make sure to add correct rules.
I'm currently attempting to start a project with Compojure.
At this point I am just trying to run the hello world app and see it through the browser.
I have a droplet on Digital Ocean with Ubuntu 13.04 installed and I cannot seem to access the webpage once the server is started.
lein ring server-headless 3000
eg: http://hostname:3000
I just get page not found. I checked to make sure jetty is using port 3000 and it is.
Am I missing dependencies?
I can't think of anything that would prevent me from viewing the page.
*Update: *
If I run the server on port 80 I can see it. I haven't added or configured any firewalls unless the Digital Ocean image comes with one by default.
on the instance run
sudo netstat -np | grep 3000
to see what address your server is listening to, if it is 0.0.0.0 then your server is listening to connections from any source and the problem is with an upstream firewall (most likely) or a local firewall (unlikely). If it is '127.0.0.1or::1/128` then your server is only listening for local connections and you need to change the binding address in the project.clj file, though this is unlikely as binding to any interface by default
Okay so I have my actual laptop which has vmware player installed. I am running lubuntu as a virtual machine and I installed django on the virtual machine and am testing my app so I did python manage.py runserver and I can access the app by visiting 127.0.0.1:8000 from my VM, however, If I go to 127.0.0.1:8000 from the actual computer (not the VM), it says 'chrome could not connect to 127.0.0.1:8000'.. Any idea how to fix it?
You can try running the server on 0.0.0.0
python manage.py runserver 0.0.0.0:8000
The IP address 0.0.0.0 means "all IP addresses on the local machine" (or all IPv4 addresses on the local machine).
Next, you will need the ip address of your VM. Visting http://<ip_address_of_vm>:8000 on other computers should access the django development server on your VM.
Note: If your VM only has an internal IP (e.g. 192.168.x.x) then only computers on the same network can visit the VM.
I was able to get #Kerberos answer to work. (not enough points to comment so I'm adding it as a seperate answer).
I am running Ubuntu 12.04 LTS in a guest OS in VMWare. The host laptop is running Windows 8.
As mentioned by Kerberos, in VMWare, go to Player ==> Manage ==> Virtual Machine Settings...
On the Hardware tab, select Network Adaptor, then select the radio button for Bridged: Connect directly to the physical network. Select OK
In the VM, the network connection information should now have the same IP address of the host OS internet connection. In my case: 192.168.1.141 (yours will vary).
In the VM, start Django using python manage runserver 192.168.1.141:8000
Using this method, I am able to access the webserver running in the VM at this IP address from within the VM, from host machine, and from other systems on the same 192.168.1.xxx network.
to access virtual machine (guest) from outside the host computer, you have to set the guest network mode to bridge
Bridge-mode connects the guest to the actual network so that other machines can connect to it