user381878
user381878

Reputation: 1539

GCP to GCP connection

I am in a situation in which I have to make a rabbitMQ connection (me being a consumer) to a GCP server. My code is also on a GCP machine. So both parties (one being MQ producer and other me) decided to create a local network connection rather than going for an external IP connection. I have already tried everything but failed to do so. I have successfully done:

  1. VPC network creation on both GCP (lets call A & B):Success
  2. VPC network peering (A - B) and (B - A): Success
  3. Set up the firewall rule: Success
  4. Try ping local address of A (10.x.x.x) from B: failed

Is there anything I am doing wrong here ? Please help.

Thanks, Sunny

This is my firewall rule on "A": enter image description here

Upvotes: 0

Views: 1291

Answers (4)

alex
alex

Reputation: 11

Check below items:

  1. Exchange IPv4 custom routes - vpc custom routes
  2. firewall rule for icmp (ping testing) or open MQ 5671/5672/15671/15672 (based on your user case)
  3. Try GCP network intelligent - conneciton testing - https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview

Ref: https://cloud.google.com/vpc/docs/vpc

Upvotes: 0

devocide
devocide

Reputation: 131

There are some restrictions on VPC peering:

  • No subnet IP range can overlap across peered VPC networks.

  • No subnet IP range can overlap with another subnet IP range in a peered VPC network.

Make sure your subnets do not feature overlapping IP ranges across peered VPCs.

See https://cloud.google.com/vpc/docs/using-vpc-peering#Restrictions

Upvotes: 4

Prakash Choudhary
Prakash Choudhary

Reputation: 143

I think if you enable Egress firewall with same values like Ingress traffic, it will work. Ingress firewall is for incoming request and egress is for outgoing request. I know it is very basic but sometimes help.

Upvotes: 0

Roy Tokeshi
Roy Tokeshi

Reputation: 131

Is there a chance your VPC's are in auto-mode? Custom mode might be required: https://cloud.google.com/vpc/docs/vpc

You plan to connect VPC networks using VPC Network Peering or Cloud VPN. Because the subnets of every auto mode network use the same predefined range of IP addresses, you cannot connect auto mode networks to one another.

Upvotes: 9

Related Questions