Configuring Network Connectivity
With the instance up and running, we now need to configure network
access to it. This is a two-step process: first, we need to permit traffic
to the instance, and then we need to associate a public IP address to it.
Without configuring network access to it, you wonât be able to access it
from outside of the Nova. In this example, we will permit SSH (TCP port 22) and ICMP
traffic to our instance from any IP
address.
# euca-authorize default -P tcp -p 22 -s 0.0.0.0/0 GROUP default PERMISSION default ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0 # euca-authorize default -P icmp -t -1:-1 GROUP default PERMISSION default ALLOWS icmp -1 -1
Note
Realize that weâve only permitted basic access to the instance. If you want to communicate with the server beyond ping and SSH, youâll need to authorize additional ports. For example, to allow for web server traffic, you will need to authorize TCP port 80.
With traffic permitted to the instance, we now need to assign a public address to it. This is also a two-step process: allocate an address and then associate it to our instance.
# euca-allocate-address ADDRESS 192.168.1.128 # euca-associate-address -i i-00000001 192.168.1.128 ADDRESS 192.168.1.128 i-00000001 # nova list +----+----------+--------+---------------+------------+ | ID | Name | Status | Public IP | Private IP | +----+----------+--------+---------------+------------+ | 1 | Server 1 | ACTIVE | 192.168.1.128 | 10.0.0.2 | +----+----------+--------+---------------+------------+ ...
Get Deploying OpenStack now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.