Load IP address with data coming from a GPS device - json

I want to have an IP address which when pinged will load all the data sent from a GPS device. The GPS device is configured to send data to an IP address and port. I need to run a server side script to read the data from that port and display it on the IP address. Does GCP provide a static IP address to be purchased and can I use Google Cloud functions or any other GCP tool to read data from that specific port and display it on that IP address? If yes, how could I go about doing this? And is there any other way to implement this using some other platform?

Does GCP provide a static IP address to be purchased
Yes, you can create a static public IP address in Google Cloud.
Public IP addresses are free when attached to running instances/services.
Reserving a Static External IP Address
can I use Google Cloud functions or any other GCP tool to read data
from that specific port and display it on that IP address?
You have not provided enough information to answer this part of your question.
Do not mix multiple topics into one question. Create separate questions. You will get more/better answers.

Related

US IP address to my Google Cloud functions located in Asia

My service is calling a 3rd party service (binance api) and there is a geo location description for US IP addresses (they banned all US IPs). My deployment's region set to Tokyo but the 3rd party services still sees that my request is coming from the US. Is there any solution to get a local ip address to functions where it is located?
You can achieve this requirement by creating a static external IP address in the same region.
To achieve this go through this document which shows how to reserve IP address to a cloud function as it is mentioned clearly what you need to get
In some cases, you might want traffic originating from your function to be associated with a static IP address. For example, this is useful if you are calling an external service that only allows requests from explicitly specified IP addresses.
For more information you can go through this Thread

Public IP Address Works: Google Domain error "Took too long to respond"

I am using Google Compute Engine and have 3 clusters that are grouped that have given me a Public IP address that works.
I changed the name servers for my Google Domain to point to them as directions are listed here: https://cloud.google.com/dns/docs/quickstart
Problem: I am getting a "took too long to respond error".
Other Solutions I have tried:
Use A Record to forward to IP address
I can see that you are using Cloud DNS, I think you only need to complete your configuration.
If you want to continue using Cloud DNS you can follow the next steps:
Go to the DNS zone page in the Cloud Console.
Copy the server names and use it at your Google Domains
Or if you prefer you can work directly to with Google Domains, and you can follow this guide:
https://support.google.com/domains/answer/9211383?hl=en

How to create a domain with both internal and external ips?

I was using Amazon before and there is a possibility that you can create domains like this: database.mydomain.com
Then if you ping this url from outside the server, you get the external IP, and if you ping if from an instance in the network, you get the internal IP.
How is this possible and is there a way to implement the same thing in Google Cloud? Is it about the router?
I don't know the terms for this usage. Sorry if the title is not very clear.

Google Geocode API deny the request - NodeJS

I want a geocode a street address in NodeJS, but the the google API deny the request, because of the IP address. I have dedicated IP address on my server, I generated API key used this IP address. My request looks like this:
https.get('https://maps.googleapis.com/maps/api/geocode/json?address=MY_ADDRESS&key=MY_KEY', function(response){...........});
I registered my currently public IP address of my computer just for to try the API and if I send a request from my computer it is working fine.
I found the following instruction on google developer site:"Every API request is generated by software running on a machine that you control. Per-user limits will be enforced using the address found in each request's userIp parameter, (if specified). If the userIp parameter is missing, your machine's IP address will be used instead."
Does it mean that I can add userIp parameter like this?:
https.get('https://maps.googleapis.com/maps/api/geocode/json?address=MY_ADDRESS&key=MY_KEY&userIp=MY_IP', function(response){...........});
I tried this on as well, but still not working. Has anyone an idea what I doing wrong?
Well, I think it takes some time to active the rule after you set that up.
If you are using it to test your app, you can set a server key which allow the ip 0.0.0.0/0, which in other terms, any ip address.
and I do not think you can override the request ip address. thetest you're referring to is about Per-user limits.

GCE external IP not from selected region?

I selected my VM zone to be in asia-east1-b but the static I got from generating is from the US? Does google give a IP from the selected region at all?
It's likely that the service you're using to check the physical location of the IP address is checking the location of the IP's owner, Google, rather than the IP itself. In any case, the location of the IP isn't really important as long as the routes work properly.