-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathAzure-Firewall
51 lines (31 loc) · 2.6 KB
/
Azure-Firewall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
############# Resource Group's Creation #####################
az group create -l westus -n HUB-RG
az group create -l westus -n Proj-01
az group create -l westus -n Proj-02
############### VNET's creation #######################
az network vnet create -g HUB-RG -n HUB-RG-vNET1 --address-prefix 10.10.0.0/16 --subnet-name HUB-RG-subnet1 --subnet-prefix 10.10.1.0/24
az network vnet create -g Proj-01 -n Proj-01-vNET1 --address-prefix 172.16.0.0/16 --subnet-name Proj-01-subnet1 --subnet-prefix 172.16.1.0/24
az network vnet create -g Proj-02 -n Proj-02-vNET1 --address-prefix 172.17.0.0/16 --subnet-name Proj-02-subnet1 --subnet-prefix 172.17.1.0/24
############### Network Security Group & Rules Creation ##########################
a0
az network nsg create -g Proj-01 -n Proj-01-NSG
az network nsg rule create -g Proj-01 --nsg-name Proj-01-NSG -n Proj-01-NSG-RULE1 --priority 100 \
--source-address-prefixes '*' --source-port-ranges '*' --destination-address-prefixes '*' \
--destination-port-ranges '*' --access Allow --protocol Tcp --description "Allowing All Traffic for now"
az network nsg create -g Proj-02 -n Proj-02-NSG
az network nsg rule create -g Proj-02 --nsg-name Proj-02-NSG -n Proj-02-NSG-RULE1 --priority 100 \
--source-address-prefixes '*' --source-port-ranges '*' --destination-address-prefixes '*' \
--destination-port-ranges '*' --access Allow --protocol Tcp --description "Allowing All Traffic for now"
########################VNET Peering Creation ###############################
az network vnet peering create -g HUB-RG -n HUB-to-Proj01 --vnet-name HUB-RG-vNET1 \
--remote-vnet Proj-01-vNET1 --allow-vnet-access
az network vnet peering create -g HUB-RG -n HUB-to-Proj02 --vnet-name HUB-RG-vNET1 \
--remote-vnet Proj-02-vNET1 --allow-vnet-access
#####################VM's Creation###################################
az vm create --resource-group HUB-RG --name HUBRG-VM1 --image UbuntuLTS --vnet-name HUB-RG-vNET1 \
--subnet HUB-RG-subnet1 --admin-username cloudfreak --admin-password "Zoom@12345678" --size Standard_B1s --nsg HUB-RG-NSG
az vm create --resource-group Proj-01 --name Proj-01-VM1 --image UbuntuLTS --vnet-name Proj-01-vNET1 \
--subnet Proj-01-subnet1 --admin-username cloudfreak --admin-password "Zoom@12345678" --size Standard_B1s --nsg Proj-01-NSG
az vm create --resource-group Proj-02 --name Proj-02-VM1 --image UbuntuLTS --vnet-name Proj-02-vNET1 \
--subnet Proj-02-subnet1 --admin-username cloudfreak --admin-password "Zoom@12345678" --size Standard_B1s --nsg Proj-02-NSG
###############################################################################################################################