Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Classic VPN Traffic selector with Public IP

Hi,

In my setup I have a Classic VPN where I need to configure the remote IP range as a public IP (A.A.A.A) and the local IP range as a Public IP (B.B.B.B). Creating this VPN works like a charm, but then the routing seems to give me some issues.

That public IP on the local side is not part of my local GCP network, which has a 10.x.x.x range. So I can create a route to direct all that traffic to a particular instance, which still works.

But then I don't seem to get packets back into that VPN tunnel. Packets which are created with in the VM have a src IP A.A.A.A and dst IP B.B.B.B, and eventhough I created a route with destination B.B.B.B to the VPN, that packet is not getting through. It seems as if the packet is going to the default gateway directly to the internet instead. 

Anyone any idea how I can make sure the packets whith a src as public ip still are routed the way I want, through the VPN tunnel?

Appreciate any feedback!

1 2 673