How Can I Get a Static IP for My Azure SQL Server?

April 27, 2025 3 answers
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

DataGuru42
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
TechSavvy101
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
SQLNinja21
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