How Can I Get a Static IP for My Azure SQL Server?
Asked by
CloudWanderer87
Hey folks! I've got a bit of a situation here that I'm hoping you can help me out with. I need to set up an Azure SQL Server for a database that will connect to another Azure SQL database via an external data source. However, the target database only allows connections from certain IP addresses that are whitelisted. They don't want to open it up to all Azure resources, so I'm trying to figure out how to set up my Azure SQL Server to provide a static IP address that I can give them for whitelisting. How do I go about doing this?
Answers
If your SQL tier supports VNET injection, you could think about peering the two networks and whitelisting the subnet of your Azure SQL. Just a heads up, if the target database isnโt part of your corporate network, that might not be an option. Also, establishing a VPN from your VNET to the target system could work, but thatโll come with its own challenges. By the way, it might be worth reevaluating why one SQL server needs to connect to another; there could be alternative solutions that fit better.
Reply to this answer
You might want to set up a private endpoint for your Azure SQL Server. Just keep in mind that while it works well for inbound connections, it generally wonโt help with outbound connections. If you're specifically looking for a static IP for outbound traffic, that could be more challenging. Have you considered what type of Azure SQL product you're using, like Azure SQL Managed Instance? Because options like NAT gateways may not be supported across all services.
Reply to this answer
Honestly, Iโve tried using private endpoints for this, and ran into walls. It didn't work out for me, so just a heads up there!
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions