Networking: IP Addresses/NSGs/Firewalls Flashcards
Private vs Public IP Address. Usage:
Private IP addresses: Used for communication within an Azure virtual network (VNet), and your on-premises network, when you use a VPN gateway or ExpressRoute circuit to extend your network to Azure.
Public IP addresses: Used for communication with the Internet, including Azure public-facing services.
Static vs Dynamic Addressing (Public IP addresses)
Dynamic addresses are assigned only after a public IP address is associated to an Azure resource, and the resource is started for the first time.
Static addresses are assigned when a public IP address is created.
Public IP Address - SKU Choice (Allowed IP Assignment Methods)
Basic SKU - static or dynamic
Standard SKU - static
Public IP Address - SKU Choice (Security)
Basic SKU : Open by default
Standard SKU: Secure by default. Closed to inbound traffic
Public IP Address - SKU Choice (available resources)
Basic SKU: Network interfaces, VPN Gateways, Application Gateways, and Internet-facing load balancers
Standard SKU: Network interfaces or public standard load balancers
Public IP Address - SKU Choice (Redundancy)
Basic SKU: Not zone redundant
Standard SKU: Zone redundancy by default
Private IP Address (available resources)
Virtual machine, internal load balancer, application gateway
Static vs Dynamic Addressing (PrivateIP addresses)
Dynamic. Azure assigns the next available unassigned or unreserved IP address in the subnet’s address range.
Static. You select and assign any unassigned or unreserved IP address in the subnet’s address range.
Azure Reserved IP Addresses within each subnet
x. x.x.0: Network address
x. x.x.1: Reserved by Azure for the default gateway
x. x.x.2, x.x.x.3: Reserved by Azure to map the Azure DNS IPs to the VNet space
x. x.x.255: Network broadcast address
Network Security Group Rule Properties
Name Priority Port Protocol (Any, TCP, UDP) Source (Any, IP Addresses, Service tag) Destination (Any, IP Addresses, Virtual Network) Action ( allow or deny)
NSGs Default inbound rules
These rules deny all inbound traffic except from the virtual network and Azure load balancer
Priority, Name, Port, Protocol, Source, Destination, Action
65000, AllowVNetInBound, Any, Any, VirutalNetwork, VirtualNetwork, Allow
65001, AllowAzureLoadBalancerInBound, Any, Any, AzureLoadBalancer, Any, Allow
65500, DenyAllInBound, Any, Any, Any, Any, Deny
Note: Rules are enacted in descending order of Priority
NSGs default outbound rules
The rules only allow outbound traffic to the Internet and the virtual network.
Priority, Name, Port, Protocol, Source, Destination, Action
65000, AllowVNetOutBound, Any, Any, VirutalNetwork, VirtualNetwork, Allow
65001, AllowInternetOutBound, Any, Any, Any, Internet, Allow
65500, DenyAllOutBound, Any, Any, Any, Any, Deny
Determining NSG effective rules
NSGs are evaluated independently, and an “allow” rule must exist at both levels (i.e., subnet and NIC levels) otherwise traffic will not be allowed.
Hub-and-Spoke network topology for deploying firewalls
Hub is a virtual network (containing Azure Firewall, VPN Gateway, Azure Bastion) in Azure that acts a central point of connectivity to your on-premises network
Spokes are virtual networks (containing resource subnets) that peer with the hub and can be used to isolate workloads .
Traffic flows between the on-premises datacenter and the hub through an ExpressRoute or VPN gateway connection.
Firewall rules (NAT rules)
Each rule in the NAT rule collection is used to translate your firewall public IP and port to a private IP and port.
Name: A label for the rule.
Protocol: TCP or UDP.
Source Address: * (Internet), a specific Internet address, or a CIDR block.
Destination Address: The external address of the firewall that the rule will inspect.
Destination Ports: The TCP or UDP ports that the rule will listen to on the external IP address of the firewall.
Translated Address: The IP address of the service (virtual machine, internal load balancer, and so on) that privately hosts or presents the service.
Translated Port: The port that the inbound traffic will be routed to by the Azure Firewall.