How to allow all IP addresses to send emails from Twillio SendGrid? - ip

I'm trying to integrate SendGrid with Nextjs as mentioned in this post, everything works fine locally. I can send mails using SendGrid with status code 202. But when I deploy it to vercel it blocks IP from vercel and thus I get "Unauthorized" as a response from SendGrid I verified it from vercel. Here is the Screenshot from the SendGrid IP access management section.
All these blocked Ip logs are of my production deployment from vercel when I try to send an email through the production version of my app. Now there's an option to whitelist an IP or IP range in SendGrid but the Ip address of vercel's deployment is not static and thus I can't whitelist a single IP address, is there any way I can whitelist all IP addresses in SendGrid? I have also tried to integrate SendGrid API using #sendgrid/mail library but again having the same error.
Any help is appreciated thanks.

Have you tried disabling IP Allow listing from sendgrid IP Access Management.
This will allow connections from any IP Address.
More info from Vercel here about allowing all IP Addresses -
https://vercel.com/support/articles/how-to-allowlist-deployment-ip-address
They suggest using the IP Address 0.0.0.0 but I found this didn't work whereas disabling IP Allow listing did the trick.

Related

How to know the IP address of the default domain in Firebase Hosting

I'm currently using firebase hosting with my default domain.
Is there a way to check if the IP address associated with this domain is a static IP address?
thank you very much.
I looked up her IP on an IP address lookup service and it pointed to the same her IP address for several days.
I checked the firebase hosting reference, but there was no explanation about the default domain.
* https://firebase.google.com/docs/hosting
Edit: #pregum_fox (the OP) added in the comments below that when they contacted Firebase Support directly, the team confirmed that all *.web.app and *.firebaseapp.com domains will resolve to the same IP address - which at the time of writing is 199.36.158.100, a Fastly edge server. Custom domains will use a different edge server identified in the Firebase Console.
Original content:
If it's not documented, it likely isn't - or at least, is not guaranteed to be.
The only time an IP address linked with your Firebase Hosting site should not change (without being advised), is when you've connected it to a custom domain. This is because the IP address you register as the A record for your custom domain must remain the same to work properly. If it changed often, using a custom DNS would be pointless.

Getting a Static Public IP or any other workaround

I'm developing an integration with an API which requires to whitelist customers based on IP addresses. I can easily get outbound IP from Production environments such as Azure or AWS and get those whitelisted.
How can I configure it for my desktop whose public IP keeps on changing after every few hours?
Getting a fixed IP address for your home computer is dependant on your internet provider. Sometimes they offer fixed IPs for 'Business' customers only or such.
Another solution might be to stand up an OpenVPN instance in your cloud then only whitelist that IP address and your expected partner prod addresses. Then you just connect to your VPN to access your API, you can do this from anywhere as your only dependant on the IP address of the cloud OpenVPN instance.
This solution also scales with your development as you only need to add new OpenVPN users to let other developers work with you and don't need their ever changing IP addresses.
I found an easy solution from NordVPN. It has an option to get a dedicated IP VPN :)

When I get the ip address using the terminal, I get an ip address for a different website, how is this possible?

When I ping or traceroute the website I want to resolve, I get an ip address back, but when I put that into the browser, it leads to a different website. How is this possible?
The IP address you are getting is for a SHARED HOSTING. In Shared Hosting multiple websites are hosted on same IP address. If you have dedicated hosting, you will get your website when you hit the IP address.
The http request sent by your browser includes a Host header that tells the server which website you are trying to reach. This is how multiple websites can be hosted with a single IP address.

Is it possible to access a Firebase hosting site via an IP address?

I have a hardcoded DDNS URL in an application that I can no longer modify the code for. It currently points to a server using its IP address and I'm trying to move over to Firebase.
My problem is that I need to update the DDNS URL with an IP address but I've only got a hosting URL like https://myapp-123q4.firebaseapp.com/.
My understanding is (from this Google Groups post) that because the entire system is shared, there are some specific IP addresses that can be used. Is there any way to access my own firebase hosting URL using an IP address?
(Pinging my firebase URL gave me the IP 151.101.1.195 which is one of the ones mentioned on the above linked post.)
You should not depend on direct IP addresses for accessing Firebase Hosting. There are simply not enough IPv4 addresses available for everyone to have exclusive access to one. You need to use the host name in the HTTP request so that the server can route the request to the correct content.

Accessing Google cloud VM applications through external IP

I have Google Cloud instance (RHEL 6.7 and I have an application working on HTTPS protocol on port 10614). This is perfectly working when I am using the internal IP https://10.125.0.7:10614/home.
I have an external IP with which I am connecting to this machine which is 104.118.81.121.
So i would like to expose my application to the internet using this IP address. Could you please help, how should I be doing the mapping for this?
I have already created the firewall rule for this, but it is not working.
You need to open port 10614 in your Google Cloud Console firewall. You can use the following link: https://console.cloud.google.com/networking/firewalls/list?project=your-project-id. Just replace your-project-id with your project id.

Resources