Reputation: 77
I am trying to connect my Cloud SQL to my on-prem MySQL server, via private IP. I have a Dedicated Interconnect established between on-prem and the Shared VPC that "hosts" the Cloud SQL.
However, the private IP of my Cloud SQL overlaps with one of the local subnets used in my on-prem environment.
Is there any way that I can configure this connection? Given the conflicting IP, the server on-premise will never find the Cloud SQL as it stands. I don't feel like Cloud SQL auth proxy/IAP solves my issue, I think that only allows users to connect, as opposed to systems like a DB server.
Upvotes: 0
Views: 1071
Reputation: 1314
Unfortunately with Cloud interconnect, the IP address space on your on-premises network and on your VPC network must not overlap, or traffic is not routed properly.
Cloud NAT cannot be used, as it only applies to external destinations - ie if you wanted to reach the on-prem via external ip through the internet and not via private ip over interconnect.
You may want to consider a third party solution called Aviatrix Mapped NAT that does NAT mapping to virtual subnets to solve the overlapping address issue. Kindly check this document on how to set it up. Again, this is not a Google Cloud Platform feature and may or may not work with your setup.
Upvotes: 1