Hello
We are struggling with this case scenario. We want to connect our GCP VM through Cloud VPN to customer Cisco Flex VPN on-premise. We followed Google Docs to create a classic VPN with the VPN tunnel and VPN Gateway up. The customer only accepts the external IP address from us, so we needed to add the external IP address; we tried to Nated inside the VM by using the following command :
$ sudo iptables -t nat -A POSTROUTING --destination REMOTE_PEER_SUBNET -j SNAT --to-source EXTERNAL_IP_ADDRESS
But we had no luck because the traffic was still routed through the primary internal IP address, so I did the following :
{
"creationTimestamp": "2024-07-18T21:49:01.780-07:00",
"description": "",
"destRange": "Destination EXternal IP /32",
"id": "XXXXXX",
"kind": "compute#route",
"name": "route-to-on-premise",
"network": "Dedicated network for this ",
"nextHopVpnTunnel": "vpnTunnels", ( please note you can't add the VPN gateway as google only support IGW)
"priority": 1000,
"selfLink": "XXX"
}
Status
Tunnel is up and running.
But when we run the network connectivity test, we get the following error :
Configuration analysis aborted
Aborted because no endpoint with the packet's destination IP address (EXTERNAL-IP): is found
Also, we can't make curl requests to the customer endpoints, but we also get the time out.
Solved! Go to Solution.
To avoid any confusion, I want to share the solution I discovered since Google Docs didn't clarify these points for me. First, Google Public NAT can't be used with a VPN. Second, at the moment in GCP, connecting one NAT to multiple NATs is not supported. To resolve this, I created a classic VPN to connect to a remote site and then set up an INGRESS static route, which I had overlooked before. To do this, you need to create the INGRESS route and add your external IP address (the one you want to add to the VM) as the destination IP address range. Then, choose your VM as the next hop with the highest priority (priority 0). I hope this helps someone who has been searching for an answer to this issue as I did for several days.