Coding Agent IP Address for whitelisting in Azure SQL Server #177367
Replies: 3 comments 3 replies
-
|
Hey, I think you can’t currently whitelist a fixed IP or IP range for GitHub Copilot’s Coding Agent, since its execution environment runs in ephemeral cloud containers, the outbound IPs are not static and can change anytime. That’s why your Azure SQL Server blocks the connection when it enforces IP based firewall rules. There’s no official published IP range for Copilot or the Coding Agent yet, since it uses shared infrastructure that scales dynamically. |
Beta Was this translation helpful? Give feedback.
-
|
The problem you’re seeing happens because your Copilot coding agent runs from dynamic IP addresses that are not on your Azure SQL Server’s whitelist. Azure SQL Server only allows connections from IP addresses you explicitly allow. Here’s a simple way to fix it: 1️⃣ Find the Agent’s IPIf you’re running Copilot Coding Agent from your local machine, it will use your local IP. You can check your public IP here:
If it’s running from GitHub Actions (or another cloud environment), the IP can change dynamically, so you need a range of IPs GitHub Actions uses. GitHub provides a JSON file with all the IP ranges:
2️⃣ Add IPs to Azure SQL Server
Example for a range:
Rule Name | Start IP | End IP
-- | -- | --
GitHubAG | 140.82.112.0 | 140.82.115.255
3️⃣ Optional: Enable “Allow Azure Services”
4️⃣ Test Your ConnectionOnce you add the IPs, run your Copilot agent again. It should be able to:
💡 Tip:
|
Beta Was this translation helpful? Give feedback.
-
|
According to the Copilot built into Azure, to allow all public access to the SQL Server, you can add ip range 0.0.0.0/0. I have done this, so we will see how it goes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
Copilot Coding Agent
Body
I want the coding agent to run my web app and use Playwrite to navigate and take screenshots of any new features or changes it has made, to then add to the PR.
But, the app points to an Azure SQL Server Database, which allows access from the public, BUT only from white listed IP addressess.
The agent, when running the web app, reports it can't reach the database, and I assume its because the database is blocking it, as it doesn't have its IP address whitelisted.
Is there an IP range range I can add to my Azure SQL Server which will help with this?
Beta Was this translation helpful? Give feedback.
All reactions