Add Application Gateway to the current setup & NSG

Mihiran Priyankara 20 Reputation points
2025-10-22T19:20:51.2933333+00:00

I have one Azure subscription with two resource groups (A and B). Each resource group contains two servers:

  • App Server – hosts an application (currently map with DNS Public IP).

DB Server – backend database server (no direct Internet access).

The App Server requires outbound Internet access for updates, but the DB Server should remain private.


Current Network Security Group (NSG) Configuration

App Server NSG

Inbound Rules

Priority Name Port(s) Protocol Source Destination Action Description
1000 VPN-MT 22, 443 TCP 192.168.1.0/24 ASG-MT Allow Allow management/VPN access
1000 VPN-MT 22, 443 TCP 192.168.1.0/24 ASG-MT Allow Allow management/VPN access
1100 MT-INT 443 TCP Internet ASG-MT Allow App accessible via Internet
1110 MGW-MT Any Any 10.10.10.4, -10.10.10.5 Allow Internal MGW communication
4096 DenyAll-Inbound Any Any Any Any Deny Default deny rule

Outbound Rules

Priority Name Port(s) Protocol Source Destination Action Description
1100 MTtoINT 80, 443 TCP ASG-MT Internet Allow Allow app Internet access
1100 MTtoINT 80, 443 TCP ASG-MT Internet Allow Allow app Internet access
1200 MT-DB 1521 TCP ASG-MT ASG-DB Allow Allow DB connection
4096 DenyAll-Outbound Any Any Any Any Deny Default deny rule

DB Server NSG

Inbound Rules

Priority Name Port(s) Protocol Source Destination Action Description
1000 VPN-DB 22,1521 TCP 192.168.1.0/24 10.10.1.6 Allow VPN/DB access
1000 VPN-DB 22,1521 TCP 192.168.1.0/24 10.10.10.6 Allow VPN/DB access
1100 MT-DB 1521 TCP ASG-MT ASG-DB Allow App → DB communication
1101 DBUATtoDBCFG 1521 Any ASG-DB-UAT ASG-DB Allow DB inter-env communication
1200 MGT-DB 22 TCP 10.10.10.4 10.10.10.6 Allow Management SSH access
1300 MGT-DB2 1521,5901,5902 TCP 10.10.10.4 10.10.10.6 Allow Admin tool access
4096 DenyAll-Inbound Any Any Any Any Deny Default deny rule

Outbound Rules

Priority Name Port(s) Protocol Source Destination Action Description
1100 DB-ALLOW 443 TCP ASG-DB Internet Allow DB outbound for updates
1100 DB-ALLOW 443 TCP ASG-DB Internet Allow DB outbound for updates
1300 DB-INT-DENY 80,443 Any ASG-DB Internet Deny Block unwanted Internet traffic
1301 DBtoDB 1521 Any ASG-DB ASG-DB-UAT Allow Inter-DB communication
4096 DenyAll-Outbound Any Any Any Any Deny Default deny rule

I want to add an Application Gateway to this architecture to securely expose the App Server to the Internet and make use of its advanced features. Could you please provide the required NSG rules and the configuration steps for setting up the Application Gateway?

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
{count} votes

Your answer

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