Allow traffic to SQL and Webapp

Handian Sudianto 5,821 Reputation points
2024-08-15T05:44:54.34+00:00

Hello,

I want to block internet access from Azure VMs, but letting the VMs connect Azure SQL Server and Web App. Azure SQL Server will use *.database.windows.net and Web App use *.azurewebsite.net.

Can we whitelist that or any azure resource by FQDN tag, or should make custom URL with tar get URLs *.database.windows.net and *.azurewebsite.net ?

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
731 questions
0 comments No comments
{count} votes

Accepted answer
  1. PISITPONG VISARLCHAROENYING 95 Reputation points
    2024-08-15T08:00:07.1033333+00:00

    Hi Handian

    Incase you are using Azure Firewall as tagged in this forum, you ca create Azure Firewall Application Rule. Please specify Application Rule as following.

    Name Source Type Source Protocal Destination Type Destination
    Rule1 IP Address <Your Source VM IP> https fqdn *.azurewebsite.net
    Rule2 IP Address <Your Source VM IP> mysql fqdn *.database.windows.net

    Incase you are using Network Security group to secure you VM, you can setup NSG outbound rule as below.

    Source Source Port Range Destination Destination Service Tag Service Action
    Any * Service Tag Sql MSQL Allow
    Any * Service Tag AppService HTTPS Allow
    Any * Any Any Any Deny

    Thanks Pisitpong


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.