Skip to main content

Configure a Secondary Private IP on Your AWS Linux Instance

  • Add a secondary private IP into the network interface
  • Then, assign an Elastic IP to this Private IP
  • Next, add the following line into /etc/rc.local according to your VPC subnet
sudo ip addr add dev eth0 192.168.X.Y/24
info

Make sure /etc/rc.local has execute permissions

Now you can ping the Elastic IP which you have already added from your local computer. Run the following command and observe ping packets.

sudo tcpdump -n icmp

References:

  1. Get Two Public IPs on an Amazon EC2 Instance for Free