Wednesday, April 29, 2015

Assign a Floating IP to your OpenStack Instance and use SSH




Step 1 - Create the Router

We will use a new router to link the internal network with the external network.
Login on your adminstration interface and go to Network -> Routers in the SideBar.

Click on “Create Router” and use “ExternalLink” for the name.
Click on “Create Router” to validate your new router.
Now under Actions, click on “Set Gateway” which is on the rightmost side of the router “ExternalLink”.
To use the external Gateway, set “External Network” to external and click on Set gateway
Go inside the router parameters to choose the Interface.
Click on “Add Interface”
Select your previously Created Subnet (Subnet of the Instance) and leave the other inputs on default.
Click on “Add Interface”

Step 2 - Network Topology

Go on “Network Topology” in the SideBar under Networks menu and if you have the same image as I presented below, then you are ready to assign floating IP to your instance.

Asign Floating IP on your OpenStack instance.

In the “Compute” menu, click on “Instances” and Associate Floating IP like in the image below:

Follow these steps:

Click on “+”:




Open ping and SSH port on your OpenStack Instance

Go to “Access & Security” and in the tab “Security Groups” select Manage Rules in your instance security group, normally “default”.


Open port for Ping ICMP


  1. To add an ICMP rule, click Add Rule.
  2. In the dialog Add Rule, enter the following values:
Règle
All ICMP
Direction
Entrée
Distant
CIDR
CIDR
0.0.0.0/0

Open SSH port on your OpenStack security group

1.    To allow ssh access, click Add Rule.
2.     In the dialog Add Rule, enter the following values:

Rule
SSH
Distant
CIDR
CIDR
0.0.0.0/0

3.     Click Add.
4.     The bodies will now have SSH open port 22 for requests from any IP address.

Step 3 - Congratulations, you can ping your instance and use SSH on it :

For SSH don’t forget to use ssh user@IP -i [identy file: cloud.pub]


No comments:

Post a Comment