Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Azure Administration

You're reading from   Learn Azure Administration Solve your cloud administration issues relating to networking, storage, and identity management speedily and efficiently

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781838551452
Length 452 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Kamil Mrzygłód Kamil Mrzygłód
Author Profile Icon Kamil Mrzygłód
Kamil Mrzygłód
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Section 1: Understanding the Basics
2. Getting Started with Azure Subscriptions FREE CHAPTER 3. Managing Azure Resources 4. Configuring and Managing Virtual Networks 5. Section 2: Identity and Access Management
6. Identity Management 7. Access Management 8. Managing Virtual Machines 9. Section 3: Advanced Topics
10. Advanced Networking 11. Implementing Storage and Backup 12. High Availability and Disaster Recovery Scenarios 13. Automating Administration in Azure 14. Other Books You May Enjoy

Adding an NSG rule

To add an inbound or an outbound rule, you can use either the portal, CLI, or PowerShell. In the portal, the configuration is available via the following blade:

Figure 3.26 – Inbound security rules blade

For the Azure CLI, you can use the following command (in the following example, we opened port 3389 for the RDP activities on Windows):

$ az network nsg rule create -g azureadministrator-euw-rg --nsg-name myfirstnsg-euw-nsg -n AllowRDP --priority 1000 --access Allow --direction Inbound --source-port-ranges 3389 --destination-port-ranges 3389

The preceding command creates a new rule with priority 1000, allowing inbound access on port 3389 to port 3389. For Azure PowerShell, you will have to use the New-AzureRmNetworkSecurityRuleConfig command:

Figure 3.27 – Cmdlet details shown in the PowerShell ISE

As you can see, there are many different parameters available to be set—you can prepare very detailed rules that combine different...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image