Skip to content

Instantly share code, notes, and snippets.

@plasticbrain
plasticbrain / gist:49b07885914129150f16
Last active May 3, 2021 19:28
AWS - EC2 - Assign Multiple IPs to the Same Instance
1. Assign a secondary private ip to the instance
- Select the instance, then choose Actions > Mange Private IP Addresses
- In the Manage Private IP Addresses dialog box, Click "Assign new IP"
- Enter a specific IP address that's within the subnet range for the instance (or just leave the field blank to have it choose one for you)
- (Optional) Select Allow reassignment to allow the secondary private IP address to be reassigned if it is already assigned to another network interface.
- Click Yes, Update, and then click Close.
2. Add the new IP to the instance's network interface.
- SSH into the instance
- $ sudo ip addr add new.ip.address.here/20 dev eth0