How to add floating IPs to your virtual machine?

In order to make your VM accessible from the Internet, you need to use Floating IP’s. Floating IP’s in Openstack are public IP addresses assigned to your Virtual Machine. Floating IP assignment allows you (when you have Security Groups set properly) to host services like SSH, HTTP or other over the Internet.

 In Instances tab in Horizon, click the dropdown menu next to your VM and choose „Associate Floating IP”

You may choose an address from the dropdown menu, but if it's empty, you need to allocate an address first. Click "+" icon on the right.

There are two networks with external IP's available: external and external2. We recommend using external3 network for all your new instances. If you have virtual machines connected to the external network and want to connect them with new machines from external3 network, please use this manual How to make VMs from external and external3 communicate

external2 → 43.130.xxx.xxx

external3 → 185.52.xxx.xxx

Both work on different networks, which can be set up by following steps from this manual:  How to create a network with router in horizon dashboard

Select the pool you are interested in and click "Allocate IP".

Select newly allocated IP address and click Associate.

Notice: the IP address should be associated with a local address from "192.168.x.x" subnet. If you have "10.x.x.x" address change it to "192.168.x.x" address. Click "Associate".

Notice: The VM's communicate between themselves trough internal network "192.168.x.x" so if you are connecting from one Virtual Machine to another you should use private addresses. If you try to connect your VM to the wrong network you will be notified by the following the message.

You now have public IP assigned to your instance and visible in Instances menu:

You can now connect to your Virtual Machine trough SSH or RDP from the Internet.

Was this article helpful?