Score:0

Cannot Ping Primary interface after configuring second INT on AWS

in flag

I have an Amazon EC2 Instance running Ubuntu server 16.04

I want the EC2 to have two network interfaces. After configuring the secondary interface. I cannot ping my primary interface from my other instances. This is my configuration of the /etc/network/interfaces.d/51-secondary.cfg . I have enable to allow all traffic on the ec2 as well. My interfaces are ens5 the primary and ens6 the secondary. my primary IP is 172.31.0.67 and the secondary is 172.31.6.43. I want my other ec2s to communicate with both my ip address. Is it possible what did i do wrong here.

 auto ens6
iface ens6 inet static 
address 172.31.6.43
netmask 255.255.240.0

# Gateway configuration
up ip route add default via 172.31.0.1 dev ens6 table 1000

# Routes and rules
up ip route add 172.31.6.43 dev ens6 table 1000
up ip rule add from 172.31.26.168 lookup 1000
Zaffry avatar
in flag
I allowed all incoming traffic on all my EC2s. but still having this issue. I put them on separate security groups and allowed all incoming traffic but still same issue.
Tim avatar
gp flag
Tim
Resources inside the same security group that need to communicate need matching incoming and outgoing security group rules. I know security groups are stateless, but you do have to allow both the outgoing from one resource in the SG and the incoming to another resource in the same SG. Like I said, it's not a subnet. You could also do this with allowing the whole VPC range in and out of the same SG.
Tim avatar
gp flag
Tim
Check the security group for each interface allows them to communicate. Being in the same security group doesn't allow communication, you need explicit allow rule incoming / outgoing. Also check your NACLs.
Zaffry avatar
in flag
I explicitly allowed both on inbound and outbound. but my main interface as mentioned above cannot ping to other EC2s in the same subnet but my second Interface can ping them and vice versa.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.