0

I'm tryinng to call an api that is only reachable through my VPN, i setup a VPC connector but i think my nat is redirecting it to the internet intead of the vpn, Is there any way to route the egress traffic from cloud run to my cloud VPN?

VPN configuration: I have a classic VPN with IKEv2 route based to 192.168.1.100/32

Internal load balancer with 2 backends

  • Instance Groups (subnet 10.1.2.0/24)
  • Serverless network endpoint group to my cloud run service

VPC connector with subred range of 192.168.1.0/28

NAT Gateway with the ip address of 35.225.79.89

Routes: IP destination 10.5.1.1 next hoop: my-tunnel-vpn (this route allows me to ping or curl to the destination 10.5.1.1 from another instance with ip 10.1.2.3 successfully)

Firewall: source ip range 192.168.1.100/32, protocols tcp and icmp, target: all instances in the network

cloud run VPC connector with egress-traffic all, route all traffic through vpc yes Ingress controll all

NarAU
  • 1
  • 1
  • Network traffic is not redirected. Network traffic is routed. Without more details, I do not know what you have configured. Edit your post to be on-topic with sufficient details to identify the problem. – John Hanley May 21 '23 at 05:01
  • If you are connected to the correct VPC (VPC connector and VPN) and your routes are correctly defined (and there is no IP overlap and so on), it should work! Add more detail on the configurations! – guillaume blaquiere May 21 '23 at 07:38
  • Looking up and asking to chatGPT, 1. I think i need to make a route to my VPN gateway with next hoop my vpn tunnel or maybe a reverse proxy server with an instance that has connectivity to my vpn, but before i tried the reverse proxy i would like to try something more "simple" or in within google – NarAU May 22 '23 at 20:56

0 Answers0