Can I have multiple VPC's on 1 Instance?

0

Good Afternoon,

I have 3 on premises routers. All in various locations across the UK and I have 1 EC2 instance

I have setup 1 site to site vpn between the router and EC2 successfully, I can access devices on this network I will call this network 10.0.1.0/24

However when I setup site to site VPN for the other 2 routers, I am having issues. The site to site VPNs are connected but I cannot access or ping anything on these 2 subnets: 10.0.2.0/24 10.0.3.0/24

All 3 tunnels are active and I have created the relevent VPCs, routing tables etc for all 3

Is there something I am missing? Can an Instance handle more than 3 site to site VPN connections?

asked a month ago81 views
4 Answers
2

Hi alex32185,

Here are a few things you can check to troubleshoot the connectivity issues:

  1. Routing: Check that your VPC (Virtual Private Cloud) knows how to send traffic to the right places (subnets) through the VPN connections. Each subnet needs to have the correct route set up to send traffic through the right VPN connection.

  2. Security: Make sure your EC2 instance allows traffic from the other subnets through its firewall (security group). If it's blocking traffic, it won't work.

  3. Subnet Setup: Confirm that your subnets are correctly connected to the VPN connections in the AWS console. Each subnet needs to be linked to the correct VPN connection.

  4. Network Rules: Check the network rules in your VPC to ensure they're not blocking the traffic between the subnets and the EC2 instance. These rules need to allow the traffic.

  5. EC2 Configuration: Make sure your EC2 instance is set up to receive traffic from the other subnets and can send traffic back to them.

Regarding handling multiple VPN connections, an EC2 instance doesn't have a specific limit on how many VPN connections it can handle. But if you're experiencing performance issues, it might be because of factors like the type of EC2 instance you're using or the amount of network traffic it's handling.

answered a month ago
  • How can I make sure my instance accepts traffic from the other 2 subnets. I have just noticed my instance says it has the VPC and subnet from the first VPC attatched

1

Hello,

please look at the solution.

start by ensuring that each VPC has correctly configured subnets with unique CIDR ranges and that there are no IP address overlaps. Check the route tables in each VPC to confirm they include routes to other subnets and VPN connections. Verify that the security groups allow necessary inbound and outbound traffic for VPN connections and review VPN configurations to ensure consistency and compatibility with on-premises routers. Additionally, check network ACL settings and monitor VPN connections for any errors or warnings. Conduct connectivity tests to confirm traffic flow over VPN connections.

Could you please look at the AWS Documents Link.

https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html

https://docs.aws.amazon.com/vpc/latest/userguide/extend-intro.html

https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/centralized-network-security-for-vpc-to-vpc-and-on-premises-to-vpc-traffic.html

answered a month ago
0

Hello,

From Oct 26, 2023, It is now possible to attach ENIs related to different VPC for an EC2 instance.

You can take a look at this official announcement from AWS [1].

AWS announces the general availability of multi-Virtual Private Cloud (VPC) elastic network interface (ENI) attachments for Amazon Elastic Compute Cloud (EC2) instances.
With this capability, customers can now launch an instance with a primary ENI in one VPC and attach a secondary ENI from another VPC.
With multi-VPC ENI attachments, customers can maintain VPC level segregation between networks, while allowing select workloads like centralized appliances and databases to communicate between them.

Customers such as telecommunication providers that send different types of network traffic within AWS regions as well as between on-premises and AWS need logical separation for their workload.
Using different VPCs for different types of network traffic such as control and data plane traffic, customers can now segment their traffic at the VPC level, while shared workloads like virtual routers, firewalls, and databases can maintain connectivity between the two.
With multi-VPC ENI attachments, customers can run connected workloads between these otherwise segmented VPCs to ensure specific functions can communicate with each VPC.

Multi-VPC ENI attachments are now available in all commercial regions, the AWS GovCloud (US) Regions, and the Amazon Web Services China (Beijing) Region, operated by Sinnet and Amazon Web Services China (Ningxia) Region, operated by NWCD.
For more information, please visit the EC2 user guide.

Regards,

AWS Support

[1] Multi-VPC ENI Attachments

https://aws.amazon.com/about-aws/whats-new/2023/10/multi-vpc-eni-attachments

profile pictureAWS
SUPPORT ENGINEER
answered a month ago
0

Terminating VPN connections on an EC2 instance, you are beginning to treat the instance as a router. You will need to check the route table on the instance. If the instance is Linux use netstat -rn or route -n command to view the routes. I suspect, the first VPN is installing a route that defaults all traffic across it. Your other VPNs can connect but all traffic gets routed across the first.

If this is the case, you will need to work on the configuration of the VPN software to set a more limited route on the instance that only routes traffic for the CIDRs which are across each of the VPN connections. Typically, the best way to do this is with a routing protocol, such as BGP, running on each end of the VPN.

Hope this helps!

profile pictureAWS
EXPERT
iBehr
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions