Mitaka : access instance via private ip

asked 2016-08-16 08:44:58 -0500

Michel gravatar image

Hi,

After creating successfully the cirros instance, I am able to access it via ssh public ip.

Controller node (VM) and Compute node (G8) are installed in my private lan (10.0.0.0/24)

I am using the provider case with a range of public ip :

+--------------------------------------+-------------+---------------------------------------------+
| id                                   | name        | subnets                                                |
 +--------------------------------------+-------------+--------------------------------------------+
 | bf33523d-589c-40d9-b465-b0c5dfd708ae | provider    | 34f4e7ab-490c-4926-a56...  212.XXX.XX.XXX/XX


[root@controller ~]# openstack server list
+--------------------------------------+-------------------+--------+-------------------------+
| ID                                   | Name              | Status | Networks                |
+--------------------------------------+-------------------+--------+-------------------------+
| a5de1441-15e9-435f-aa3f-c478633d1df5 | provider-instance | ACTIVE | provider=212.XXX.XX.XXX |
+--------------------------------------+-------------------+--------+-------------------------+

I am able to access to the cirros instance via the public ip :

[root@controller ~]# ssh cirros@212.XXX.XXX.XXX
...
$ ifconfig
eth0     ...

I would like to know if its possible to assign a private ip to this instance and be able to access it via SSH :

ssh cirros@10.0.0.X

Thanks & Regards,

Michel

edit retag flag offensive close merge delete

Comments

From outside network you cannot. But from controllers / virtual routers you can access the VM via private IP address. Is this you are looking for ?

Bipin gravatar imageBipin ( 2016-08-21 23:49:52 -0500 )edit

From controllers, I am able to access my VM by using :

ip netns exec qrouter-xxxxx ssh cirros@10.0.0.X

Is there a way to use directly ssh cirros@10.0.0.X without ip netns exec qrouter-xxxxx ?

Michel gravatar imageMichel ( 2016-08-22 09:01:57 -0500 )edit