- Newest
- Most votes
- Most comments
The issue you're experiencing is likely related to the network configuration changes that occur when attaching a new network interface to your EC2 instance. When you attach a new network interface, it can alter the networking setup of your instance, potentially affecting how it's accessible over the network. Here are some steps you can take to address this issue:
-
Before attaching the new network interface, make sure to configure your security group settings to allow inbound SSH (port 22) traffic from your IP address to both the primary and secondary network interfaces.
-
When attaching the new network interface, pay attention to the device index. It's recommended to use a device index other than 0, as 0 is typically reserved for the primary network interface.
-
After attaching the new network interface and restarting the instance, try connecting using the private IP address of the primary network interface rather than the public DNS name. You can find this in the EC2 console under the instance details.
-
If you're still unable to connect, you may need to modify the instance's network configuration to ensure it's correctly using both network interfaces. This might involve editing network configuration files on the instance.
-
As a precautionary measure, before making any network changes, it's advisable to create a snapshot or AMI of your instance. This way, if you encounter persistent connectivity issues, you can restore from the backup.
-
If you continue to have problems, you might need to detach the newly added network interface, restart the instance, and then try to reconnect using the original public DNS name.
Remember, when working with network interfaces, it's crucial to carefully manage your instance's network configuration to maintain accessibility. If you're following a specific guide, ensure that you're also adapting the steps to your particular network setup and security requirements.
Sources
No Internet connection | AWS re:Post
Let's do the following validations:
-
Can you validate under the instance summary on the EC2 console -> Networking tab that the Public IPv4 DNS name still the same before adding the additional ethernet network card?
-
If so, can you validate your device can resolve the dnslookup for the Public IPv4 hostname to an IP matching the public IP of your primary eth0?
-
finally, review this KB on how to handle ubunto with multiple network interfaces. Some routing configuration needs to be handled within the instance: https://repost.aws/knowledge-center/ec2-ubuntu-secondary-network-interface
Let me know if that doesn't fix your problem.
