EDIT: Solved, routing table did not update properly. as was answered.
On AWS and Ubuntu 16.04, a 2nd network interface is attached with 2nd elastic IP.
Instance details show 2 private IPs, dhclient eth1 up works properly. ifconfig shows netmask, hwaddr and broadcast correctly. 1st and 2nd IPs use the same security group, 1st IP works.
Yet instance details show only 1 public/elastic IP, and I can't connect to the second elastic IP. Any ideas on debugging this will be appreciated.
Fixed by the following commands: ip route add default via 10.10.2.1 dev eth0 tab 1
ip route add default via 10.10.2.1 dev eth1 tab 2
ip rule add from IP_1 tab 1
ip rule add from IP_2 tab 2
This is because you have multiple network interfaces on the same subnet, so your OS is not sending it out of the right interface. You will need to use source based routing on your instance to make this work.
To make this change persistence
** Tested AWS Environment