Name of the Google compute engine - google-app-engine

I am new to Google Cloud Platform and trying to understand it. I have launched a compute engine and have installed a web application. I can access that application using External IP address of the engine or with private IP address from within the VPC.
How can I refer to them with any kind of name?
Just like AWS has this concept of having a name for each instance as ec2-54-54-54-54.eu-west-1.compute.amazonaws.com. So, I can use this name in my browser and with some DNS, this name will be resolved to actual IP address.

Possible duplicate of Where can i find the name servers of Google Compute Engine.
But the answer is that Google Cloud Platform does not provide default public DNS for external IP addresses.
You will need to use Cloud DNS or another service or leverage an external service like xip-io which will map any IP to a DNS name.

Related

How to configure app engine static outbound IP

I have a server hosted on app engine. I need to call an API from it with a static outbound IP. I followed step-by-step the following guide https://cloud.google.com/appengine/docs/standard/python3/outbound-ip-addresses#static-ip
Now, I do not quite get how to configure the cloud NAT in order to call the external API through my static outbound IP (external IP address). I guess, I should call a local VPC address from my server and configure somewhere the API IP it should redirect to.
Any help appreciated.
Thanks a lot,
Paul
If you configured everything per the doc you linked in your question, then you don't need to do anything special from within your AppEngine application. Setting the Serverless VPC Access egress_setting to all-traffic means that anytime your AppEngine app tries to call an external address, it will be routed this way and will use the static IP configured as part of the setup.

Google App Engine firewall and internal access and error 403

We have 2 app engine app (flex and standard) running on separate projects and we want project A to request project B with https to xxx.appspot.com URL.
Our firewall on both projects Denies all IPs(*) and whitelisted App Engine internal addresss (10.1.0.41, 0.1.0.40, 10.0.0.1 and 0.1.0.30) as explained in the doc.
Yet we receive a "403 error forbidden access" (which disappears when disabling the firewall).
This post is similar to mine but the responses didn't help me.
Is there anything else I can do ?
Did anyone got this to work ?
Thank you in advance.
As you may already know, GCP Projects represent a trust boundary within an organization. Hence, inter-project communication between App Engine services would require Public IP communication or using Shared VPC, which allows connecting between networks from different projects. There should be no internal communication between App Engine Services over different projects. Hence, whitelisting App Engine internal IP addresses might not be useful in this situation.
About using Public App Engine IP addresses, as illustrated in this document. App Engine hosts services on a dynamic public IP address of a Google load balancer. Due to that, the IP address can be changed any time and any Static IP can not be provided. For outbound services, a large pool of IP addresses are used which you can obtain as outlined in this document

How to add a record to a domain on GCP App Engine?

I have a domain given by GCP myDomain.appspot.com by default.
I need to add a record to redirect 'www' subdomain to an IP adress. (www used for an API connection)
Is it possible?
You can set up a custom domain and subdomains via App Engine settings in the console. The documentation gives step by step instructions on how to do it. Then you can use a dispatch.yaml file to map requests to a specific service of your app.
However there's no way to map static IP addresses to an application. This is because App Engine services use a pool of IP addresses that are subject to change over time.

Static IP / IP Range for Site hosted on Google App Engine

Our site is hosted on Google App Engine which means we do not have a server farm with dedicated IP addresses that can be contacted “directly”. It is an elastic farm that spins up with load.
But our client is looking for static ips to route it through firewall and provide suitable access for this site:
"Proxy does not support any voice and video, hence I have to know all the Ip used for this portals so that I can route this via Firewall."
Is there anyway to list all the IP used for a site hosted on Google App engine?
regards,
Kanchan
The best you can achieve is this:
App Engine's current range of outgoing IP addresses are encoded in the
sender policy framework (SPF) record of
_cloud-netblocks.googleusercontent.com. You may need to recursively perform DNS SPF lookups to resolve the entire list of IP ranges. Start
by resolving _cloud-netblocks.googleusercontent.com
https://cloud.google.com/appengine/kb/general#static-ip
You could of course do it the other way round and only allow access to your application from a specific IP range.
Trying to keep track of GAE ip addresses is not a very good idea. They will most likely change over time without any announcements or heads ups.
You will be better of with a proxy. This project https://github.com/TellusTalk/Node_Proxy is one way to accomplish this.

Custom Domain for Google Compute Engine Server

Can I get the external IP of compute engine instance point to a custom domain name that I own ?
I've found a number of links of accomplishing it with App Engine and therefore, presently I'm thinking of calling the Compute Engine from App Engine. Kindly share your thoughts about this solution as well
You have to create an extenal static IP adress and use it in your own domain DNS setup.
Docs: https://developers.google.com/compute/docs/instances-and-network#externaladdresses
Docs: You can assign an optional externally visible IP address to specific instances. Outside callers can address a specific instance by external IP if the network firewalls allow it. Only instances with an external address can send and receive traffic from outside the network.

Resources