适用于虚拟网络的 Azure CLI 示例Azure CLI samples for virtual network

下表包含指向使用 Azure CLI 命令的 bash 脚本的链接:The following table includes links to bash scripts with Azure CLI commands:

为多层应用程序创建虚拟网络Create a virtual network for multi-tier applications 创建包含前端和后端子网的虚拟网络。Creates a virtual network with front-end and back-end subnets. 传入前端子网的流量仅限 HTTP 和 SSH,而传入后端子网的流量限于 MySQL、端口 3306。Traffic to the front-end subnet is limited to HTTP and SSH, while traffic to the back-end subnet is limited to MySQL, port 3306.
两个对等虚拟网络Peer two virtual networks 在同一区域中创建并连接两个虚拟网络。Creates and connects two virtual networks in the same region.
通过网络虚拟设备的路由流量Route traffic through a network virtual appliance 创建包含前端和后端子网的虚拟网络,以及可在这两个子网之间路由流量的 VM。Creates a virtual network with front-end and back-end subnets and a VM that is able to route traffic between the two subnets.
筛选入站和出站 VM 网络流量Filter inbound and outbound VM network traffic 创建包含前端和后端子网的虚拟网络。Creates a virtual network with front-end and back-end subnets. 前端子网的入站网络流量仅限于 HTTP、HTTPS 和 SSH。Inbound network traffic to the front-end subnet is limited to HTTP, HTTPS, and SSH. 不允许从后端子网到 Internet 的出站流量。Outbound traffic to the internet from the back-end subnet is not permitted.
使用基本负载均衡器配置 IPv4 + IPv6 双堆栈虚拟网络Configure IPv4 + IPv6 dual stack virtual network with Basic Load Balancer 部署具有两个 VM 的双栈 (IPv4+IPv6) 虚拟网络和具有 IPv4 和 IPv6 公共 IP 地址的 Azure 基本负载均衡器。Deploys dual-stack (IPv4+IPv6) virtual network with two VMs and an Azure Basic Load Balancer with IPv4 and IPv6 public IP addresses.
使用标准负载均衡器配置 IPv4 + IPv6 双堆栈虚拟网络Configure IPv4 + IPv6 dual stack virtual network with Standard Load Balancer 部署具有两个 VM 的双堆栈 (IPv4+IPv6) 虚拟网络和具有 IPv4 和 IPv6 公共 IP 地址的 Azure 标准负载均衡器。Deploys dual-stack (IPv4+IPv6) virtual network with two VMs and an Azure Standard Load Balancer with IPv4 and IPv6 public IP addresses.