CH Azure Networking Fatma SIALA
CH Azure Networking Fatma SIALA
2023/2024
1
Networking
2
Networking is the
foundation of cloud
security
3
Cloud Architecture
A Word of Caution:
NEVER VM
Weather API
VM
Catalog App
leave a VM open to
the internet this way - Directly accessible from the internet
- Can be RDPed from anywhere
We will learn later on what should be done
4
Cloud Architecture
VNets
SubNets
Load Balancer
Application Gateway
Virtual Networks
7
Virtual Networks
… but not
with
VM resources in
VM other
VM
VNets
VM
Virtual Networks
• Other organizations’
VNets cannot
VNet
VNet Pricing
10
Characteristics of VNets
12
Addresses of VNets
• Or IP Range
• Can be customized
between 0 and 32
8 bits
24 bits allocated to allocated
for range
address
109.186.149.240 /24
8 bits 8 bits 8 bits 8 bits
109.186.149.000 – 109.186.149.255
Bits refresher: 256 Addresses
00000000 = 0
11111111=255 15
CIDR Notation Example 2
16 bits 16 bits
allocated to allocated
address for range
109.186.149.240 /16
8 bits 8 bits 8 bits 8 bits
109.186.000.000 – 109.186.255.255
Bits refresher: 65,536 Addresses
00000000 = 0
11111111=255 16
17
Subnet
18
Subnet
VNet*
Subnet
Frontend
*By default, VM
can be VM
customized
Subnet
19
Backend
VM
Subnet Pricing
20
Network Security Group
• Think of it as a mini-firewall
• Looks at 5 tuples:
• The lower the number – the higher the priority of the rule
23
NSG and VMs
to anyone
24
Network Peering
• Examples:
• Separate systems
• System layers
• Sensitive databases 25
Network Peering
• Main reasoning:
resources in a
VNet
VM
that has public Front End
access
26
VM
Database
Network Peering
• So…
NSG
Open Port 80
VNet 2 VNet 1
VM VM
Database Front End
27
Network Peering
• But…
28
Network Peering
• Not
free
30
Network Peering
NSG
Open Port 80
VNet 2 VNet 1
Peering
VM VM
Database Front End
NSG
Open Port 1433
31
Cloud Architecture
VNet VNet
NSG NSG
NSG
ACR
Cart Docker
32
Cloud Architecture
Attack Surface
VNet VNet
NSG NSG
NSG
ACR
Cart Docker
33
Secure VM Access
34
Secure VM Access
• What can be
done?
JIT Access
VPN
Jump Box
35
Bastion
JIT Access
37
Jump Box
VNet VNet
NSG NSG
NSG
ACR
Cart Docker
39
Bastion
40
Service Endpoint
in the cloud
• Is free!
Service Endpoint
• Voila!
43
Without Service Endpoint
The Internet
NSG
VNet
App Service VM 44
Backend App Front End
With Service
Endpoint
Note:
1. Traffic leaves the VNet
2. There is a public IP on the
The Internet PaaS
service (App Service)
3. Can’t be used from on-prem
network
• Almost…
NSG
VNet
App Service VM 45
Backend App Front End
Service Endpoint
the cloud
• Isn’t free
Without
Private Link
The Internet
NSG
VNet
App Service VM 49
Backend App Front End
With Private
Link
Note:
1. Traffic never leaves the VNet
2. The VM talks to the App
The Internet Service
via private IP
3. Can be used from on-prem
network
NSG
VNet
App Service VM 50
Backend App Front End
Private Link
a gateway is required
SE /PL vs VNet Integration
NSG NSG
54
App Service Access Restrictions
58
Source: https://docs.microsoft.com/en-us/windows-hardware/drivers/network/windows-network-architecture-and-the-osi-model
Load Balancer
59
Load Balancer Distribution Algorithm
• Based on 5 tuple
hash:
• Source IP
• Source port I’ve heard
that
• Destination IP before…
• Destination port
• Protocol type
• Same tuples used by
NSG
60
Load Balancer Distribution Algorithm
61
Load Balancer Types
Basic Standard
62
Load Balancer Types
Basic Standard
No redundancy Redundant
63
Load Balancer Types
Basic Standard
No redundancy Redundant
Open by default Secure by default
64
Load Balancer Types
Basic Standard
No redundancy Redundant
Open by default Secure by default
Up to 300 instances Up to 1000 instances
65
Load Balancer Types
Basic Standard
No redundancy Redundant
Open by default Secure by default
Up to 300 instances Up to 1000 instances
No SLA 99.99% SLA
66
Load Balancer Types
Basic Standard
No redundancy Redundant
Open by default Secure by default
Up to 300 instances Up to 1000 instances
No SLA 99.99% SLA
Free Not Free
67
Configuring Load Balancer
• 4 main
configurations:
The public IP exposed by
the Load Balancer
68
Example
Public IP Public IP
204.222.76.09 224.3.101.55
Rule Rule
Backend Backend
Pool Pool
71
Health Probes
72
When to Use Load Balancer
• Great for internal resources
• Do not use for external resources
• Especially on Web Apps / Web API /
etc.
• Can’t handle HTTP
• Doesn’t route based on path
• No protection
• For this we have the Application Gateway 73
76
Application Gateway
77
WAF
• Updates continuously
78
Application Gateway
79
Application Gateway Networking
AG Subnet
Service Endpoint +
Access Restrictions
NSG /
Private Link
VM App Service
81
Configuring Application Gateway
• 5 main
configurations:
The VMs, Scale Sets, or
App Services connected to
Settings for the the Application Gateway
incoming HTTP
Requests The public IP exposed by the
Application Gateway
82
Application Gateway and AKS
does this
NSG NSG
NSG
ACR 85
Cart Docker
Affinity
86
Affinity
App Gateway
Peering
Peering Peering
Frontend VNet
Backend t Backend Net
VNe V
Peering
Peering Peering
Backend VNet
Datastore VNet Datastore VNet
88
Peering