Excellent tutorial! Well written, to the point, and easy to understand. There is an abundance of blog posts written on the subject that treat you like a complete beginner (too much reading for something so simple) or use a complicated bridged network setup, which is a solution, but not what I was looking for. Thank you for this post.
How can I use internal docker containers via IPs like 172.17.0.2 of it in the guest machine
Example - I am making an application which requires mysql/mongodb which I've installed as a container of guest machine which is Ubuntu 20.04
I want to add server properties in the app running on windows ... what ip can be used?
You can't add PF for docker container IPs, Because each time u get a new IP for ur container.
--> 1 windows hosting VBox.
--> 2 Ubuntu 20.04 in VBox.
--> 3 Mysql in docker (port 3306).
# ex: inside (2) make sure mysql run on 5200
$ docker run --name some-mysql -p 5200:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.7.40
# MySql now is reachable from (2) localhost:5200
# Check ur Firewall inside (2)
$ ufw allow 5200
$ ufw status
--
# Get ur VMs name
$ VBoxManage list vms
# Add new port forwarding, with empty guest ip
$ VBoxManage modifyvm "MyVmName" --natpf1 "tcp-pf5200,tcp,,5200,,5200"
Hope this helps. Additionally, you can easily configure a host name resolution, for the LAN network, instead of knowing ip address each time, by following the guide at : dev.to/linuxguist/running-servers-...
Excellent tutorial! Well written, to the point, and easy to understand. There is an abundance of blog posts written on the subject that treat you like a complete beginner (too much reading for something so simple) or use a complicated bridged network setup, which is a solution, but not what I was looking for. Thank you for this post.
Thank You
Thanks a lot!!!
thanks, it works for my ubuntu virtual server
Thanks ;)
How can I use internal docker containers via IPs like 172.17.0.2 of it in the guest machine
Example - I am making an application which requires mysql/mongodb which I've installed as a container of guest machine which is Ubuntu 20.04
I want to add server properties in the app running on windows ... what ip can be used?
You can't add PF for docker container IPs, Because each time u get a new IP for ur container.
--> 1 windows hosting VBox.
--> 2 Ubuntu 20.04 in VBox.
--> 3 Mysql in docker (port 3306).
Just what I am looking for. Coupled with How To Use Visual Studio Code for Remote Development via the Remote-SSH Plugin, it is possible to hack into Ubuntu via VSCode, without needing head at all.
I am using Installation/MinimalCD as well.
Yes, it's possible. you just have to configure your Remote-SSH Plugin for VSCode and follow this guide as well.
Very Helpful Post. Thanks.
The OpenSSH server reads a configuration file when it is started. Usually, this file is /etc/ssh/sshd_config
In this file, we need to change the following settings, for password based login to work :
PasswordAuthentication yes
ChallengeResponseAuthentication yes
Hope this helps. Additionally, you can easily configure a host name resolution, for the LAN network, instead of knowing ip address each time, by following the guide at : dev.to/linuxguist/running-servers-...
Thank you very much, you gave the clue I was looking for: "Where user is your username within the VM"
ssh -p 2222 [VM-username]@127.0.0.1Example, your guest machine(the VM) name is "User", so the command going to be
ssh -p 2222 user@127.0.0.1