services@j3mweb.com
Call us : (214) 234-2665
How to Secure an Azure VM with Network Security Groups
j3mweb Team 09 June 2026 Microsoft Azure

A Network Security Group (NSG) is a firewall for your VM's network traffic — and locking one down properly is one of the highest-value security steps you can take in Azure.

Steps

  1. In the Azure portal, go to your VM, then click Networking in the left-hand menu.
  2. Review the Inbound port rules — look specifically for rules allowing RDP (port 3389) or SSH (port 22) from Any source, which is a common and risky default from quick-create wizards.
  3. Click Add inbound port rule, and for the source, choose IP Addresses and enter your office's public IP range instead of Any.
  4. Delete or disable the old, overly permissive rule once the new restricted rule is confirmed working.
  5. For remote access without opening RDP/SSH to the internet at all, consider Azure Bastion, which provides secure browser-based access to your VM without exposing those ports publicly.

Common Questions

How do I find my office's public IP to allow?

From a device on your office network, search "what is my IP" in a browser — that's the address to allow. Note that if your ISP doesn't provide a static IP, this address can change over time and may need periodic updates.

What's the difference between an NSG and Azure Firewall?

An NSG is a basic, free packet filter attached to a VM or subnet — good for straightforward inbound/outbound rules. Azure Firewall is a separate, more advanced managed service for centralized, organization-wide traffic filtering and logging across multiple resources.

Back to Resources
Keep Reading

More Resources

How to Create an Email Signature in Outlook Microsoft 365
24 July 2026
How to Create an Email Signature in Outlook

A step-by-step walkthrough for setting up a professional email signature in Outlook on desktop, the web, and mobile — including logos, links, and making it insert automatically.

Read more
How to Fix Your Email If It's Been Hijacked and Is Sending Spam IT Support
23 July 2026
How to Fix Your Email If It's Been Hijacked and Is Sending Spam

If contacts are getting spam or scam emails from your address, here's the cleanup order that actually locks the attacker out — not just changing your password and hoping.

Read more
What Are SPF, DKIM, and DMARC? (How They Stop Email Spoofing) Security
22 July 2026
What Are SPF, DKIM, and DMARC? (How They Stop Email Spoofing)

The three DNS records that determine whether someone can send email that looks like it's from your domain — explained without the jargon, plus how to check yours.

Read more
j3mweb Team
Online · replies in a few hours
Hi there! 👋 Tell us a bit about your project and we'll get right back to you.
1 Contact
2 Project
3 Details