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
Related
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
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.
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.
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.
I am a newcomer at the web part of programming and I was given a host. I uploaded a simple index.html file with one header(It is correct). If I then try to connect with the nameserver/ip (gotten with PuTTy) , I get an 404 error. I have tried many different stuff about folders , but I could not fix anything
The nameserver IP address is almost certainly not your hosting IP address. The nameserver is the server (probably owned by your host - but possibly an outsourced service) that converts the human readable domain name (such as www.domain.com) to an IP address the computer can connect to (such as 198.252.206.16 - the IP 4 address I get for www.stackoverflow.com). It acts as a giant lookup list of domain names and IP addresses, much like a telephone book or Yellow Pages.
Moreover, as your host will almost certainly be hosting many domains (tens or possibly hundreds) per server, you will need to use a domain name when attempting to connect to your web page - this will be needed for Apache or IIS to know how to route the request/which content to return to the browser. It will do this using the request header sent by the browser when requesting the page. If you are testing locally then localhost/127.0.0.1 will be good enough if you have a single site registered/single set of content in a wwwroot directory (or equivalent). Similarly a virtual server or dedicated server may well respond to requests by IP address if it is the only site/application registered on the server.
To use another real-world analogy, it is a bit like addressing an item of post to a town or village - without including the recipient name, street or house number - and then expecting it to be received and to get a response.
Some hosts provide temporary domain names for you to use before you purchase your domain name or whilst the domain name details are propagated to DNS servers around the world. This usually looks something like-
http://your-user.your-host.com/ or http://server.your-host.com/your-username/
If your host offers such a service then this should normally be detailed in their self-help pages, or the admin area where you set up the site. Clearly such a domain is not intended for "production" use, and you should purchase a domain name before using the site for anything other than testing - if only to allow you the flexibility to move to a new host in the future.
This is not a question for StackOverflow users though, and I strongly suggest you consult your host's documentation or contact them for further assistance.