I'm running a Ubuntu 18.10 LTS virtual box on my Windows 10 system.
In the network configuration I set the network to bridge.
After that my virtual machine appears in my local network with the ip 192.168.0.231.
A ping from my hosting system to the VM works fine.
I'm then starting a flask app with DEBUG=TRUE, TEST=TRUE, SERVER_NAME=127.0.0.1:5001. On the VM the server starts and is available under localhost:5001.
But from my hosting service I get Could not get any response, when I try to access 192.168.0.231:5001.
Do I have to open some ports on the VM?
Thanks!
You need to:
Start the VM with the port forwarded and be sure it is not used on your Host OS
use when starting the app --host=0.0.0.0 if you start it with flask run
Related
I am running a docker container of python server in my computer (MacOS Catalina, the container can connect MySQL and Redis from host computer, the server is running normally, but I can't visit server on host computer), in Linux environment, we need to disable the selinux, firewall and iptables, for example, edit /etc/selinux/config
and type as below
SELINUX=disabled
SELINUXTYPE=targeted
How to disable selinux/iptables in MacOS or how to visit docker server from the Host computer, I already tried to use host.docker.internal instead of 127.0.0.1, but it doesn't work, if I use host.docker.internal in MySQL or Redis config, also failed, I only can use the really IP such as 192.168.1.45 instead of host.docker.internal or 127.0.0.1
I am running a simple python rest server in port 3000 in wsl2 ubuntu machine and not able to access this using wsl ip address.
http://localhost:3000 works with and without vpn
http://172.x.x.x:3000 (wsl ip) works without vpn
http://172.x.x.x:3000 not working with vpn
I am running a web application(copied from github examples) that is running as a container in a remote ubuntu VM. The application is a Node JS application that is using mysql database. I brought the application up using docker-compose in ubuntu.
The application came up as http://172....:3000 using a network port. The ip address is displayed in the docker-compose terminal. In the ubuntu system, when i do curl http://172....:3000, it gives a proper success response. The ip address is a container network address. It is not the VM's ip address. There is no firewall.
How to access the web application from my windows 7 machine. When I tried accessing using http://VM Ip address:3000, it is not hitting ubuntu system. I am not getting any message in the docker-compose terminal. Can anyone help here ?
ports:
- "3031:3000"
similar line in your docker compose means you have published port 3000 of your container to port 3031 of your Ubuntu VM.
now you can access your client service as http://<ubuntu-ip>:3031 but before this, you need to allow access to port 3031
I have an Ubuntu VM on my windows host machine. I have installed Hashicorp consul on my windows host machine. I am trying to run docker container and trying to access the consul url from the VM using ip. But I am unable to do so.
Is there a way where I can access any host machine url from the ubuntu virtual machine. I am not able to access any url of app deployed on host machine from vm.
I want to create an SSH tunnel between my virtual machine (Ubuntu server 12.04) and my MAC OS, the main thing is i want to access to the Ubuntu server from an external machine without
i have the IP address for the Ubuntu Server : 192.168.248.132
and the IP address of the MAC os : 172.20.3.90
I can access form the mac os to the Ubuntu server, but i want to access to the ubuntu server from an external machine.
Which VM you using?
You should create Network interface called Bridged Network - for VM Ware.
This way your Ubuntu will get real IP from local DHCP server - router in your case.
So IP become 172.20.XX.XX.
This should be enough to be accessed from local network.