### Route Table Demo Setup Source: https://github.com/ipspace/azure/blob/master/README.md Commands to set up a route table demo, including creating a resource group, virtual network, and VMs. ```bash setup/create-rg rt network/create-vnet network/create-vm ``` -------------------------------- ### VNet Peering Demo Setup Source: https://github.com/ipspace/azure/blob/master/README.md Commands to set up a VNet Peering demo, including creating resource groups, two virtual networks, and VMs. ```bash setup/create-rg peer peer/create-net-a peer/create-net-b peer/create-vm ``` -------------------------------- ### Application Security Groups (ASG) Setup Source: https://github.com/ipspace/azure/blob/master/README.md Commands to set up a demo using Application Security Groups, including creating a resource group, virtual network, ASG, and VMs, and applying NSG rules. ```bash setup/create-rg ASG network/create-vnet asg/create-asg asg/create-vm asg/create-db-nsg asg/create-web-nsg nsg/apply-nsg ``` -------------------------------- ### SSH Key Copy and Access Source: https://github.com/ipspace/azure/blob/master/README.md Commands to get the public IP of a web VM, copy an SSH private key to it, and then use the web VM as a jump host to access a DB VM. ```bash . setup/get-public Web scp ~/.ssh/id_rsa azure@$Web:.ssh/ ssh azure@$Web Web> ssh azure@172.16.2.4 DB> curl www.example.com ``` -------------------------------- ### Get VM Public IP Address Source: https://github.com/ipspace/azure/blob/master/README.md Retrieves the public IP address of a specified VM and sets it as a bash environment variable. This allows for easy SSH access to the VM. ```bash . setup/get-public A ``` -------------------------------- ### Route Table Creation and Application Source: https://github.com/ipspace/azure/blob/master/README.md Commands to create a custom route table and apply it to a subnet. ```bash rt/create-rt rt/apply-rt ``` -------------------------------- ### Create Application Environment with Two Subnets Source: https://github.com/ipspace/azure/blob/master/README.md Sets up a new resource group, a virtual network named 'AppNet' with two subnets ('AppSubnet' and 'DBSubnet'), and deploys a virtual machine into each subnet. It allows testing inter-VM communication. ```bash setup/create-rg Net network/create-vnet network/create-vm ``` -------------------------------- ### VNet Peering Creation and Verification Source: https://github.com/ipspace/azure/blob/master/README.md Commands to create VNet peering between two virtual networks and verify its status. ```bash peer/create-peer az network vnet peering list -g peer --vnet-name Net-A -o table az network vnet peering show --name A2B --vnet-name Net-A --resource-group peer ``` -------------------------------- ### Create Resource Group and VM Source: https://github.com/ipspace/azure/blob/master/README.md Creates a resource group and a virtual machine within it. The resource group name is saved to ~/.rg for subsequent scripts. The script then outputs VM details, including the public IP address for SSH access. ```bash setup/create-rg Simple simple/create-vm-a ``` -------------------------------- ### List Azure Locations Source: https://github.com/ipspace/azure/blob/master/README.md Lists available Azure locations using the Azure CLI. The output can be formatted as a table for better readability. ```azurecli az account list-locations -o table ``` -------------------------------- ### Create Network Security Groups Source: https://github.com/ipspace/azure/blob/master/README.md Demonstrates the creation and application of Network Security Groups (NSGs) to subnets. It first creates VMs without NSGs, then creates and applies NSGs to the 'Web' and 'DB' subnets to control network traffic. ```bash setup/create-rg NSG network/create-vnet nsg/create-vm nsg/create-web-nsg nsg/create-db-nsg nsg/apply-nsg ``` -------------------------------- ### VM IP Address Listing Source: https://github.com/ipspace/azure/blob/master/README.md Azure CLI commands to list private and public IP addresses of VMs within a resource group. ```azurecli az network nic list -g peer --query "[ [*].name,[*].ipConfigurations[*].privateIpAddress ]" -o table az vm list -g peer -d -o table ``` -------------------------------- ### Effective Route Table Verification Source: https://github.com/ipspace/azure/blob/master/README.md Azure CLI commands to show the effective route table for a network interface. ```azurecli az network nic show-effective-route-table -g rt -n DBVMNic -o table az network nic show-effective-route-table -g Net -n DBVMNic -o table ``` -------------------------------- ### Show Effective Route Tables for NICs Source: https://github.com/ipspace/azure/blob/master/README.md Displays the effective route table applied to a Network Interface Controller (NIC). This helps in diagnosing routing issues between virtual machines by showing the prefixes and next hops configured. ```azurecli az network nic show-effective-route-table -g peer -n A1VMNic -o table az network nic show-effective-route-table -g peer -n B1VMNic -o table ``` -------------------------------- ### Create Second VM in Same Subnet Source: https://github.com/ipspace/azure/blob/master/README.md Creates an additional virtual machine within the same resource group and subnet as a previously created VM. This demonstrates that Azure does not recreate existing VNets or subnets. ```bash simple/create-vm-b ``` -------------------------------- ### List Network Security Groups Source: https://github.com/ipspace/azure/blob/master/README.md Lists the contents of newly created Network Security Groups using the Azure CLI, providing details about the rules applied. ```azurecli az network nsg list -o table ``` -------------------------------- ### Fix DB-NSG Source: https://github.com/ipspace/azure/blob/master/README.md A command to automatically fix the DB-NSG configuration. ```bash nsg/fix-db-nsg ``` -------------------------------- ### Network Security Group (NSG) Management Source: https://github.com/ipspace/azure/blob/master/README.md Commands to list NSG rules, effective NSG rules for a NIC, and include default rules. Also includes a command to fix DB-NSG and a cleanup command. ```azurecli az network nsg rule list -g NSG --nsg-name DB-NSG -o table az network nic list-effective-nsg --resource-group NSG --name DBVMNic -o table az network nsg rule list -g NSG --nsg-name DB-NSG -o table --include-default ``` -------------------------------- ### Cleanup Resource Group Source: https://github.com/ipspace/azure/blob/master/README.md Command to delete a resource group. ```bash setup/delete-rg ``` -------------------------------- ### Enable Virtual Network Access in VNet Peering Source: https://github.com/ipspace/azure/blob/master/README.md Updates the virtual network peering settings to enable virtual network access, allowing traffic to flow between peered virtual networks. This involves setting the 'allowVirtualNetworkAccess' flag to true. ```azurecli az network vnet peering update --name A2B --vnet-name Net-A --set allowVirtualNetworkAccess=true --resource-group peer az network vnet peering update --name B2A --vnet-name Net-B --set allowVirtualNetworkAccess=true --resource-group peer ``` -------------------------------- ### Delete Resource Group Source: https://github.com/ipspace/azure/blob/master/README.md Deletes the resource group and all associated resources, effectively cleaning up the demo environment. This can also be done using the `az group delete` command. ```bash setup/delete-rg ``` -------------------------------- ### List Effective Network Security Groups (NSGs) for NICs Source: https://github.com/ipspace/azure/blob/master/README.md Lists the effective Network Security Groups (NSGs) applied to a NIC, including all associated rules. This is crucial for identifying NSG rules that might be blocking traffic, such as those related to service tags. ```azurecli az network nic list-effective-nsg -g peer -n A1VMNic az network nic list-effective-nsg -g peer -n B1VMNic ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.