My Firebase cloud functions make calls to an external server A.
This server A only allows requests when the incoming IP-address is whitelisted. So I have to give the (range of) IP address of the Firebase cloud functions to the admin of server A such that he can add it to his list of trusted IP-addresses.
A static IP-address seems to be possible (https://cloud.google.com/functions/docs/networking/network-settings#associate-static-ip) but for the time being, I would like to just add the entire range of IP addresses that Cloud Functions may use.
So what is the entire IP address range used by Firebase cloud functions when making call to an external server?
2
Answers
I guess all possible IP addresses used by Google cloud functions can be found here: https://www.gstatic.com/ipranges/cloud.json
(as referenced from here: https://support.google.com/a/answer/10026322?hl=en)
Whether you are using
Automatic NAT IP address allocation
orManual NAT IP address assignment
, you will not be seeing the entire IP range of the NAT IP(s). You should be able to see the NAT IPs when you go for Manual NAT IP address assignment as you reserve and assign them, but never the entire IP range where they came from.When the Firebase cloud functions makes a call to the external server, its internal IP address which would have an IP range will be NAT-ted by the Cloud Router, thus you see the Cloud Router’s external IP address as the source IP and not the function’s internal IP.