SSL Setup for .NET Apps Running on Azure Virtual Machines

Goal:

  • Run both .NET apps (frontend and backend) on an Azure VM
  • Each accessible over HTTPS (e.g., https://app.example.com and https://api.example.com)
  • Use free SSL certificates (e.g., via Let’s Encrypt)

Phase 1 : Setup Azure VM and Network Configuration

🖥️ Create an Azure VM:

  • OS: Windows Server 2019 Datacenter
  • Size: Standard B2s (2 vCPUs, 4 GiB Memory)
  • Public IP: Assign a static public IP during creation

🌐 Configure Network Settings (NSG – Network Security Group)

Navigate to your VM’s Networking > Network Interface > NSG (or directly via the NSG resource) and ensure the following security rules are in place.


🔐 Inbound Security Rules

PriorityNamePortProtocolSourceDestinationAction
100RDP-Access3389TCPYour public IPAnyAllow
200HTTP80TCPAnyAnyAllow
300HTTPS443TCPAnyAnyAllow

💡 Note: Azure uses priority numbers (not index). Lower values have higher precedence. Also, “Your public IP” means using a specific IP range (e.g., 203.0.113.10/32) to restrict RDP access securely.


🔄 Outbound Security Rules (if defaults are missing)

PriorityNamePortProtocolSourceDestinationAction
100VirtualNetworkAnyAnyVirtualNetworkVirtualNetworkAllow
200InternetAnyAnyAnyInternetAllow
300DenyAllAnyAnyAnyAnyDeny

Phase 3 : Free SSL Setup on Azure VM Using WACS (Win-ACME)

📥 Step 1: Download Win-ACME

  • Visit https://www.win-acme.com
  • Download the latest .zip version
  • Extract it (e.g., to C:\win-acme)
  • Right-click wacs.exe > Run as Administrator

⚙️ Step 2: Request a New SSL Certificate

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top