How to add multiple IPs to an Amazon EC2 virtual machine

Motivation:

You have a Server 2008 R2 machine on Amazon EC2.

You want to secure multiple domains using different  SSL/TLS certificates.

Server 2008 R2 does not support Server Name Indication (SNI). Therefore you need to add multiple IPs to Server 2008 R2 machine to use different SSL/TLS certificates.

Solution:
  1. Create an EC2 virtual machine.
  2. Click on Network Interfaces tab.
  3. Click Create Network Interface button or select an existing network interface and select Actions > Attach.
  4. Click on a network interface ID, click Actions, click Manage IP Addresses, click on the network interface name (beginning with eth…), click the Assign new IP Address button, enter a private IP Address (e.g. 172.30.0.32), click the Save button, click the Confirm button.
  5. Click Elastic IPs tab, click the Allocate Elastic IP address button, click the Allocate button, optionally name the new allocated IP.
  6. Select the new allocated IP, click on Actions , click Associate Address, choose Network interface, then choose a private IP of the network interface with which the elastic IP will be associated, click the Associate button.
  7. Login Windows.
  8. View the network configuration using below command, note the Default Gateway and DNS Servers information.
ipconfig /all

9. Open Control Panel\All Control Panel Items\Network and Sharing Center.

10. Click Change adapter settings link, click a Local Area Network Connection Network.

11. Manually enter one IP address, Default Gateway and DNS Servers information.

12. Click Advance… button to open Advanced TCP/IP Settings screen, and add the private IPs in the 4th step to the machine.

13. Restart the machine.

If you get any issue then try limit the number of private IPs of a network interface to 4 (including the default private IP).

(Visited 86 times, 1 visits today)

Leave a Reply