Port forwarding in OpenStack is a mechanism that allows you to redirect incoming traffic from a port to an internal address and port within your OpenStack infrastructure.
This is useful, for example, when you need to provide access to a web application running on a specific port within your infrastructure from the outside via a public IP address and port.
To use port forwarding, your infrastructure must have a floating IP address and instances for which this service is being created.
Creating and configuring OpenStack port forwarding is only possible through the CLI.
Learn how to work with the OpenStack CLI here: Server creation via Openstack CLI (command line)
openstack floating ip list
openstack server list
openstack port list --server vm1/vm2
Copy the ID (port identifier, as it will be needed)
vm1 - 192.168.99.120
vm2 - 192.168.99.123
openstack floating ip port forwarding list $FLOATING_IP
(openstack floating ip port forwarding list 94.103.11.84)
HTTP:
http:// $FLOATING_IP:8888 - VM1
http:// $FLOATING_IP:9999 - VM2
SSH:
VM1 $FLOATING_IP 2222
VM2 $FLOATING_IP 2223
openstack floating ip port forwarding delete $FLOATING_IP $ID_FORWARD