Workaround - Fixed IP address for access to external DB's

Hi,

As Bubble has a dynamic IP - has anyone managed a workaround to get access to external DB’s that require the whitelisting of an IP Address to access the data?

4 Likes

You need a proxy. I would build my api request in aws with a static ip and go through that from bubble with a token.
you would need:
Api gateway
nat instance (ec2) or nat gateway
Lambda function in private vpc for routing, connected to the instance\gateway

Price wise nat gateway is more expensive but easier to setup than a nat instance.

5 Likes

Hi @matthew2 did you find a workable solution to this? Having the same issues and really didn’t want to go down the API route.

I can’t see what the workaround should be if a static ip is needed From the endpoint. If the provider support ip ranges you could use Integromat for a simpler setup, but that would quickly become expensive with many calls.

Yep, IP ranges for my use case will work with AWS security group inbound rules. I was just interested to see if Bubble had come back with a solution. It’s just a matter of knowing what hose ranges are, I have tried a few from the comments in older discussions but no joy!

I am calling https://apitest.syna.se/ where they have to set the calling ip for security reasons and it cant be a range, for the same reason, how would you do that then?

Found this article which helped me make an API call that required a whitelist IP address: AWS Lambdas with a static outgoing IP | by Financial Engines TechBlog | Financial Engines TechBlog | Medium

Do you know any tutorial to implement similar workaround with bubble?

Hi @simon7, just came across this thread because I have exactly the same problem as OP. Do you have any resources or guides you could link us to for this workaround with a proxy? How difficult is the setup and maintenance?

Thanks!

Hi @user4879
It does require a little bit of coding in either python/javescript and a bit of setup in AWS, but after that the maintenance is almost zero. There is also a generous free tier on AWS so pricing is minimal (and in most cases free for the first year).
I believe the tutorial @hellodwelling links to describes pretty much what has to be done, but I would recommend NOT using the console on AWS - it quickly gets messy. You need to look at a framework like Serverless Framework (easiest to begin with) or AWS CDK.

If its something you want to go forward with I can provide a base template in CDK in typescript with all the, but im pretty hung up at the moment so am not available for freelancing. You’d need to code the connection to the database yourself.

This exact solution is not no-code unfortunately :slight_smile:

2 Likes

@user4879 hi there ! did you find a way to do it ? i’m on the same situation :wink: thanks

@hellodwelling Hello ! i tried to follow your article - did you get to have a white list IP adress and then use an external data base safely on bubble ? Do you have any ressources to share ? thanks

Hi Simon thank you so much for the insights on how to solve this problem I’m sure more than a few are having. Is there a way I can contact you directly?

Hi @rodolfo2
Welcome to the forum :slight_smile:
Sure, feel free to send me a DM. I’ve helped a handfull other users by now and have a GitHub repo with a basic setup that I can send you. It’s not a low/no-code solution though, so you’ll either have to code a bit yourself, or find someone (me or another) to do it.

1 Like

Hello, Simon, I also have the same problem regarding the ip for accessing an external database, would it be possible for you to give me some guidance on how to solve it or how much you would charge to be able to put the solution to work.

@VambertoFarias Sent you a dm.
To others who stumble upon this thread, you are welcome to dm me for a link to the repo with a basic setup. You’ll need to be able to code a bit yourself (java/typescript) or pay someone to deploy and build the rest for you.

I’m probably too expensive (cost of living in Scandinavia is off the charts), but no hard feelings for using another dev for the job :slight_smile:

Sorry for the delay in answering, luckily I managed to get around it in another way using the N8n, but I appreciate your attention, thank you very much and luck with the work

Hey guys. I was referred to this thread from bubble support. I am trying to link my bubble app to a postgres db hosted on digitalocean. I am having the same issue with not being able to add a bubble server ip as a trusted source.

My developer is just finishing the database side of everything, here’s my question - is it best to just switch from digitalocean to aws or something else now? Or figure out this workaround?

Any help appreciated!

Hi Simon,

I’m running into this issue when trying to connect with an API from MX.com. Thanks for your offer to share your repo for the bubble whitelisting workaround. Looking forward to seeing it.

Best,
Tom

Hi @simon7 ,

Could you please the link to the repo with the basic setup?