Secure Access to Database for Game Website

Hi,

I’m working on a game website that’s deployed on Vercel using React/Next.js. I’m encountering an issue with securely connecting to my Azure SQL Database. Currently, we set enormous firewall rule for public IP range open(0.0.0.0-255.255.255.255), which poses a big security risk.

Platforms involved:

  • Frontend: Vercel with React/Next.js (vscode)
  • Backend: Azure SQL Database
  • Data Access: Prisma ORM

What’s the best way to securely connect my Vercel app to Azure SQL Database without exposing it publicly? Are there recommended solutions or best practices for handling this?
I just want give access to all users possible to play my game fast, easy and secure.

Thanks!

Hi @yuvalshalom-s-btech! Vercel has a few docs about this. :smile:

How can I allowlist IP addresses for a deployment?

Due to the nature of the Vercel infrastructure, all outbound function requests come from a range of highly dynamic IP addresses and a fixed IP range cannot be given.

For Pro customers , a range cannot be defined and you must allow all internet traffic. If you wish to restrict access, we recommend using complex passwords and/or a custom header on your outbound requests that can be verified by your backend and set to reject traffic that doesn’t contain this header.

Can I get a fixed IP address for my Vercel deployments?

Vercel’s infrastructure uses a range of dynamic IP addresses.

Hobby and Pro customers can restrict access to their deployments through Deployment Protection and Firewall custom rules

Enterprise teams with Vercel Secure Compute have additional connection and configuration options.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.