8 votes

How to connect instances in different AWS accounts by private IP?

It is called VPC Peering. http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-peering.html A VPC peering connection is a networking connection between two VPCs that enables you to route ...
Appleoddity's user avatar
  • 3,860
7 votes
Accepted

Using AWS Nat Gateway from diferrent VPC across VPC peering

This type of configuration is not supported by AWS. VPC Peering does not support "multiple hop" routing. The following configurations are not supported through VPC Peering. VPC A -> VPC B -> Internet ...
Matt Houser's user avatar
  • 10.2k
7 votes
Accepted

How to configure cross region VPC peering on AWS with Terraform

It seems that this is the answer # Required Variables variable "request_vpc_id" {} variable "accept_vpc_id" {} variable "request_region" {} variable "accept_region" {} data "aws_caller_identity" "...
rvabdn's user avatar
  • 245
7 votes

Issue Connecting to Cloud SQL Postgres using Private IP from GKE

I was able to connect to Cloud SQL Postgres by creating a VPC-native cluster as suggested by @patrick-w. My VPC subnetwork creation was modified to include two secondary ranges: gcloud compute ...
Subhash Chandran's user avatar
7 votes
Accepted

Connecting multiple VPCs with the same CIDR block to a shared VPC

First, I must mention: you made a very grave error by duplicating subnets in your VPCs. Even if there is next to zero chance you'll need to route traffic between them, the RFC1918 address space is ...
EEAA's user avatar
  • 110k
6 votes
Accepted

aws vpc to vpc connection with openvpn

Transiting of routed IP traffic across VPCs is not supported by peering connections. A peering connection does not give you the same level of connectivity that you might expect from a VPN or other ...
Michael - sqlbot's user avatar
5 votes
Accepted

Cannot ping between EC2 instances in peered VPCs

VPC peering requires symmetrical route table entries -- the tables on each side of the peering connection need a route pointing across the peering connection to the other side. To send traffic from ...
Michael - sqlbot's user avatar
4 votes
Accepted

SSH connection between two server after VPC Peering

rtb-02f581a0a300cb527 has 172.16.0.0/16 but the actual CIDR is 172.31.0.0/16 (second octet is 31 not 16) fix the destination CIDR to 172.31.0.0/16 in rtb-02f581a0a300cb527, that should resolve the ...
Deepak Deore's user avatar
4 votes
Accepted

Forwarding traffic from AWS ELB to another ELB

You can't add an ELB as a backend behind another ELB. You might be able to add instances in one VPC directly to an ELB in another if the VPCs are peered, but this seems unlikely. The obvious ...
Michael - sqlbot's user avatar
3 votes
Accepted

AWS Active Directory: Cannot access from another VPC

I found the issue. It was quite non-intuitive. When the Active Directory is created, AWS automatically creates an associated security group. The SG was called "d-9462#####_controllers" and had the ...
user1751825's user avatar
3 votes
Accepted

AWS Client VPN Access to a Peered VPC

I found a reason. It was not because I cannot associate VPC2-subnets with VPN. It's not necessary. As I understood, in AWS association means "VPN endpoint directly connected to this subnet". Commonly ...
Nadia's user avatar
  • 113
3 votes
Accepted

Restricting traffic between AWS VPCs

I didn't read your answer in detail but it seems a bit off. I don't know why you're using NAT gateways at all, they're purely to allow instances in private subnet to access the internet. A key here is ...
Tim's user avatar
  • 32.7k
2 votes
Accepted

AWS VPC Peering security concern

Once the two systems are connected through VPC peering, will the two machines have unlimited access to each other implicitly or will there be some rules which will govern the privacy of machines ...
EEAA's user avatar
  • 110k
2 votes

Does AWS RDS read replication require peering?

You don't need a peering connection between VPCs to create a cross region read replica. You can create a cross-region Read Replica in a VPC from a source DB instance that is not in a VPC. You can ...
Lucas Carvalho's user avatar
2 votes
Accepted

Google Cloud routing with VPCs peered in a partially connected mesh topology

According to the GCP documentation, it is not possible for vpcB and vpcC to communicate: Only directly peered networks can communicate. Transitive peering is not supported. In other words, if VPC ...
Cedric Meury's user avatar
2 votes

Solving the mystery - VPCs have overlapping IPv4 CIDR blocks

You need to rebuild one of your VPCs so the CIDR blocks don't overlap. If you look in the VPC service in the AWS console and look at the CIDR ranges for your VPCs they will have overlap or be exactly ...
B. Miller's user avatar
  • 707
2 votes

Is it possible to share same AWS Elastic IP addresses between two and more VPC?

A reverse proxy is almost the only possible solution for this. You can't natively share any kind of gateway device across a peering connection, but a reverse proxy is straightforward. You could also ...
Michael - sqlbot's user avatar
2 votes
Accepted

How to make GKE Services visible to another GKE cluster running in a different VPC

Reaching one cluster service from another cluster is not directly possible, you can use a load balancer for it. The reference that explains it is in the VPC native Clusters and Alias section of ...
Daniel's user avatar
  • 46
2 votes

how do i get a vpc id from another account with terraform

If you're VPC peering across accounts you need to instantiate multiple AWS providers in Terraform, one for each account. You should then be able to use the aws_vpc datasource with the specific ...
bodgit's user avatar
  • 4,771
2 votes

Cannot connect to Cloud SQL Postgres from GKE via Private IP

This is a fully working version for me that: uses GCP GKE VPC-native cluster works with a Private GCP PGSQL instance resource "google_compute_subnetwork" "gke-subnet" { name ...
rantoniuk's user avatar
  • 131
2 votes

Central VPN in a mulit-vpc architecture

AWS Networking AWS networking is not transitive. You generally can't hop between networks without making an explicit provision for it. You have to have a target in the VPC you're connected to, and ...
Tim's user avatar
  • 32.7k
2 votes

How to troubleshoot network flows across peered VPC

VPC flow logs is a great tool to debug network connection issues. However, In your case, I would recommend to go through the following troubleshooting steps: 1-In your scenario you need to make sure ...
Khalid K's user avatar
  • 171
2 votes

Can you have multiple active route tables in AWS?

Main route table controls the routing for all subnets that are not explicitly associated with any other route table If your subnet is associated with a custom route table, put the peering route in the ...
exeral's user avatar
  • 1,872
2 votes
Accepted

AWS Client VPN to improve cross region performance

I don't think this will work. A Client VPN lets you into your Sydney VPC, but it's not transitive to your us-east-1 resources. AWS Global Accelerator might help, and CloudFront would probably help but ...
Tim's user avatar
  • 32.7k
2 votes
Accepted

GCP VPC Peering active, connectivity tests ok, but any request (ssh, icmp...) times out

I have reproduced the environment you have detailed and encountered the same issue when setting the peered network as a secondary interface. But it works when the peered network is set as a sole ...
Dylan's user avatar
  • 40
2 votes

How to access a private zone via DNS peering

I understand that your goal is to reach an instance in VPC-A from VPC-B by its internal (to VPC-A) DNS name by dns-peering VPC-B to VPC-A. If my understanding is correct, it is not only possible, it's ...
jabbson's user avatar
  • 730
2 votes
Accepted

AWS VPC peering response traffic - can return address CIDRs overlap?

In the link to the AWS doc I would say that the answer is below the diagram. If traffic originates in Subnet B of VPC B it's the route table in VPC A that determines whether the traffic get's back to ...
Luke's user avatar
  • 36
2 votes
Accepted

Why does an S3 to S3 copy care about VPCs? Related to error: "VPC endpoints do not support cross-region requests."

I assume since you say "using the AWS CLI from a third machine using an the IAM role" that your "third machine" (why third?) is an EC2 instance inside a VPC. EC2 instances are ...
Tim's user avatar
  • 32.7k
1 vote
Accepted

Terraform: using exportCustomRoutes when setting peering connection

Thanks! I've checked your solution on my project and it works for me with a slightly changed syntax: resource "google_compute_network_peering" "vpc-network-to-transit-network" { ...
Serhii Rohoza's user avatar
1 vote

Connecting two AWS VPCs in different regions

You cannot have separate networks with overlapping addresses. You may have to delete and recreate the VPC (use Cloud Formation to rebuild an exact copy).
Ron Trunk's user avatar
  • 2,179

Only top scored, non community-wiki answers of a minimum length are eligible