HOW TO CREATE A WINDOW SERVER WITH IIS,FIREWALL,AND ASG INSTALLED
Published: 2024-05-25 09:54:01

sTEP 1. Create a vm 
YOu can click on the link below on how to create a Vm
https://dev.to/shaloversal123/how-to-create-window-11-pro-virtual-machine-2h2e
Select Webserver as Image.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tzrtl7do0ht0oaijrbsq.png)
Select RDP in the inbound port

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qagmc7slyiix2tkr8rj8.png)
Allow your resource group to load under Vm network page before proceeding.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjqjn4qtvczn7na7asr5.png)
NExt managemnet
Next Monitoring
Next Advance
Click review and create

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t04hdk99gam7esshbq72.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mgrn8rwj7zgshanfqoy9.png)

**HOW TO CONNECT YOUR Vm**
Click on connect on the webserver created
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e7vec3iyfaom9unfje2y.png)

Download RDP protocol
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dm20d427c2a1ex7vre6t.png)
Input the Password Then
Click Connect

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r06m09ps0fzwxl4uf9e8.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zdqbpsphxtw00qy415xm.png)

Click Add role and features

Next to server selection

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wgs9zgc4qcezfdjad4c2.png)
Under server role click on webserver IIS

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wnbwb295uv4q5dx6gkxu.png)
Click add features
NExt to Role Service
Click IIS 6management

Next to INstall
NB; Installation takes few minutes.
HOW TO CREATE APPLICATION SECUTRITY GROUP

Search for ASG on the azure portal

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4eu76adzqcozo2vgfhq2.png)
click create on the top page

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2l6jxjjjj3b3qut26ua.png)
Fill your information
Give suitable name to the ASG
NB:Ensure that you should thesame region for your work when creating it

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z94ij7aiyfsb5748vvxc.png)
Review and Create
Click create a successful Validation passed.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0i8cpon6y0we9omptpsl.png)

**HOW TO ADD INBOUND RULE**
Go your resource group
Click to open the default nsg

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8jbrdi5xxyjmpr8ni0a1.png)
Click +Add at the top of the network page
Select Inbound security group
click add to add rule
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5zxha97vwoif4lxm7846.png)
Tick the following
Source -any
Destination Application security group-Select ASG that you created
Destination Port ranges: Input 80,443
Protocol-Any
Action-Allow
Priority-100
Select Add group

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wsxjs984ctcehgipsvbr.png)
 
HOW TO ATTACHE NEW RULE TO THE SERVER
click on the VM
click to open the server using the Downladed RDP and Password
click Application Security group
Click Add ASG
Once done Success page will show up

HOW TO CREATE AND INSTALL FIREWALL TO THE WEBSERVER
Go to the marketplace
search for firewall
click create
select subcription/Resource group
Select PRemium For SKU
Create a suitable firewall policy
Create a new public IP for your Firewall
Create VNet-Subnet
NB: ALLOW deployment to complete.
steps to attach the Firewall to the server
Go to vm
Click server
IN server page click virtual network
Click firewall to see if its attached successfully.