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"
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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).