3.4 ネットワーク
Azure Networking
Azure Virtual Network(VNet)は、Azureリソースを論理的に隔離したネットワーク環境を提供する。AWS VPCと同様の概念だが、NSGの適用範囲やピアリングの仕組みに違いがある。
VNetの基本構成
@startuml
skinparam backgroundColor #FEFEFE
cloud "インターネット" as Internet
rectangle "VNet (10.0.0.0/16)" as VNet #F3F4F6 {
rectangle "サブネット: Web\n10.0.1.0/24" as WebSubnet #DBEAFE {
rectangle "VM (Web)" as WebVM #93C5FD
rectangle "Application\nGateway" as AppGW #93C5FD
}
rectangle "サブネット: App\n10.0.2.0/24" as AppSubnet #D1FAE5 {
rectangle "VM (App)" as AppVM #6EE7B7
}
rectangle "サブネット: DB\n10.0.3.0/24" as DBSubnet #FEF3C7 {
rectangle "Azure SQL\n(Private Endpoint)" as SQL #FDE68A
}
rectangle "Azure Bastion\nサブネット" as BastionSubnet #FCE7F3 {
rectangle "Bastion" as Bastion #F9A8D4
}
}
rectangle "NSG" as NSG #FCA5A5
Internet --> AppGW
AppGW --> WebVM
WebVM --> AppVM
AppVM --> SQL
Internet --> Bastion : 管理アクセス
Bastion --> WebVM
Bastion --> AppVM
NSG --> WebSubnet
NSG --> AppSubnet
note bottom of VNet
AWSとの違い:
- NSGはサブネットまたはNICに適用
- Bastionはマネージドサービス
- Private Endpointでサービス統合
end note
@enduml
図1: Azure VNetの典型的な構成
| コンポーネント | Azure | AWS対応 |
|---|---|---|
| 仮想ネットワーク | VNet | VPC |
| セキュリティグループ | NSG | Security Group + NACL |
| 踏み台サーバー | Azure Bastion | EC2 Bastion / SSM |
| プライベート接続 | Private Endpoint | VPC Endpoint |
| WAF/LB | Application Gateway | ALB + WAF |
NSG(Network Security Group)
@startmindmap skinparam backgroundColor #FEFEFE * NSG ** 適用対象 *** サブネット *** NIC(ネットワークインターフェース) *** 両方に適用可能 ** ルール構成 *** 優先度 (100-4096) *** 名前 *** 方向 (Inbound/Outbound) *** アクション (Allow/Deny) *** ソース/宛先 *** ポート *** プロトコル ** デフォルトルール *** AllowVNetInBound *** AllowAzureLoadBalancerInBound *** DenyAllInBound left side ** AWSとの違い *** 許可/拒否両方可能 **** AWS SGは許可のみ *** 優先度による評価順序 **** AWS SGは全ルール評価 *** サブネットとNIC両方に適用可 ** Application Security Group *** VM論理グループ化 *** IPアドレス不要のルール定義 *** AWS SGのソース指定に類似 @endmindmap
図2: NSGの特徴とAWSとの違い
NSGとAWS Security Groupの違い
Azureの NSGは「許可」と「拒否」の両方のルールを設定でき、優先度順に評価される。AWSのSecurity Groupは「許可」ルールのみで、すべてのルールを評価して最も許容的な結果を適用する。この違いは、きめ細かいアクセス制御を設計する際に重要である。
Azureの NSGは「許可」と「拒否」の両方のルールを設定でき、優先度順に評価される。AWSのSecurity Groupは「許可」ルールのみで、すべてのルールを評価して最も許容的な結果を適用する。この違いは、きめ細かいアクセス制御を設計する際に重要である。
ハイブリッド接続
@startuml
skinparam backgroundColor #FEFEFE
rectangle "オンプレミス" as OnPrem #E5E7EB {
rectangle "企業ネットワーク" as Corp #D1D5DB
}
rectangle "Azure" as Azure #DBEAFE {
rectangle "VNet Hub" as Hub #93C5FD {
rectangle "VPN Gateway" as VPN #60A5FA
rectangle "ExpressRoute GW" as ER #60A5FA
rectangle "Azure Firewall" as FW #60A5FA
}
rectangle "VNet Spoke 1" as Spoke1 #D1FAE5
rectangle "VNet Spoke 2" as Spoke2 #D1FAE5
}
Corp <--> VPN : Site-to-Site VPN\n(インターネット経由)
Corp <--> ER : ExpressRoute\n(専用線)
Hub <--> Spoke1 : VNet Peering
Hub <--> Spoke2 : VNet Peering
note bottom of Hub
Hub & Spoke構成
- 中央でファイアウォール管理
- コスト効率
- AWS Transit Gateway相当
end note
@enduml
図3: Azureハイブリッド接続とHub-Spoke構成
| 接続方式 | 用途 | AWS対応 |
|---|---|---|
| VNet Peering | VNet間接続 | VPC Peering |
| VPN Gateway | オンプレミスVPN接続 | Site-to-Site VPN |
| ExpressRoute | 専用線接続 | Direct Connect |
| Virtual WAN | 大規模ハブ管理 | Transit Gateway |
出典
[1] Microsoft. Azure Virtual Network Documentation. https://docs.microsoft.com/azure/virtual-network/
[2] Microsoft. Hub-spoke network topology. https://docs.microsoft.com/azure/architecture/reference-architectures/hybrid-networking/hub-spoke
[2] Microsoft. Hub-spoke network topology. https://docs.microsoft.com/azure/architecture/reference-architectures/hybrid-networking/hub-spoke
発展学習
→ Azure Firewall vs NVA
→ ExpressRoute Global Reach
→ Azure Firewall vs NVA
→ ExpressRoute Global Reach