Is there a way in GCP to have a single, external IP address for OUTBOUND traffic? I have to provide a static IP to a 3rd party API service so they can allow access to it and let my instances be able to access their API.

In the future I will configure autoscaling to add or subtract instances based on specific rules and I want all these instances communicate with 3rd party API using the same static IP.

I searched the web and I found someone that suggest to use a NAT gateway on GCE but this will create a single point of failure. Can anyone help me? Thanks a lot!

  • Any reason you don't a) reverse proxy their API via reverse proxy which you secure with something more sane or b) use a squid forward proxy for all traffic – Jacob Evans Dec 10 '17 at 2:40

The three approaches I can suggest are the following:

  • Ask the 3rd party for better authentication mechanisms than IP addresses.
  • Create 3 separate NAT gateways in 3 different GCE regions, each with their own static IP address. Get all 3 static IP addresses whitelisted with 3rd party. Have each of the NAT gateways health check connectivity to 3rd party and in case the active NAT gateway lose connectivity to 3rd party but another NAT gateway still has connectivity - automatically change which NAT gateway is active.
  • Contact GCE Support for advice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.