2

What are the public facing IP addresses, when app maker calls an external service with urlfetch?

My external service insists on white-listing these. Is there a public list available from google?

Within App Maker, I want to use the UrlFetch to call an external service, very much like the App maker sample.

I see there is a list of Apps Script's IP address ranges for the JDBC. Would this be the same ranges? (https://developers.google.com/apps-script/guides/jdbc#accessing)

Thanks in advance, John

John
  • 31
  • 2
  • App Maker Sample:- https://developers.google.com/appmaker/samples/fetch-external-data/ UrlFetch:- https://developers.google.com/apps-script/guides/services/external – John Jul 19 '17 at 15:55

2 Answers2

2

Since App Maker uses Apps Script's URL Fetch service, you need to look at their doc to answer this question. From what I can tell from:

https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app

You need to go here:

https://cloud.google.com/appengine/kb/#static-ip

And then follow these instructions. Since Stack Overflow has an issue with simply posting links (although I really recommend you go to the link :), I'll summarize the instructions here:

nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8

And then nslookup each "include" in the response. This gives you all the IPs currently in use.

Edit: It looks like this might be the same IPs Google uses for it's general URL fetch service, which could mean that if you're whitelisting for these IPs you may also whitelist for all App Engine applications, and probably even more. Obviously you'd be whitelisting for all Apps Script and App Maker applications, so I assume this doesn't matter, but I just wanted to mention it. If your service is trying to rely on this for security reasons then, obviously, it's not adequate.

Devin Taylor
  • 825
  • 5
  • 11
  • Hi Devin, I was just reading that peice. Picking up on the last point. Apps scripts UrlFetchApp, does not look like it has a way of including/using a certificate? https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app#fetchurl-params – John Jul 19 '17 at 17:07
  • Yeah it doesn't seem to, but I'm far from an expert on this topic. – Devin Taylor Jul 19 '17 at 17:12
0

I had the same issue, may be you can try the "useIntranet" option which may reduce the ipaddress range within your websites/webapps current network

https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app

eg:

var response = UrlFetchApp.fetch("https://Url.com",{
  'method' : 'post',
'payload' :{ 
'useIntranet':true,
'key':"value"
}
}
);
Dracula
  • 1
  • 1