☁️ AWS - EC2 with Two IPs
EC2 with Two IPs
Updated at 2015-01-16 11:22
This checklist guides how to create a single EC2 instance with two public IPs.
- Create VPC e.g. with CIDR 192.168.0.0/16
- Create subnet e.g. with CIRD 192.168.0.0/16
- Create route table.
- Create Internet gateway.
- Attach Internet gateway to the VPC.
Big blue button in Internet Gateway-page. - Set route table to associate to the subnet.
Subnet Associations-tab in Route Table-settings. - Set route table to route 0.0.0.0/0 to the created Internet gateway.
Routes-tab in Route Table-settings. - Create EC2 instance.
- Amazon Linux AMI 2014.09.1 (HVM)
- Select your new VPC as the network.
- Select your subnet as the subnet.
- Make sure that network interface has primary and secondary IP addresses.
Don't create 2 network interfaces, but use 2 IPs. IP addresse can be automatic. - Create a security group with SSH access from anywhere.
- Associate the new instance with 2 elastic IP, one for both IPs created.
- Try to connect to both elastic IPs using a SSH client.