Azure networking demo Project
steps
Log in to the Azure portal
Create a resource group
Create a virtual network with the following configuration
-- give virtual network a name
--enable azure bastion
--click on create new public ip address
Enable azure firewall
Click on create new policy
Click on next
keep all the values default and click on create
Creating virtual machine in the Vnet
Go to virtual machines option
Click on create
Give name
select created resource group
Keep all the default values and go to networking tab
select the vnet which is created and keep all the default values
select the option "delete nic when VM is deleted"
Click on create VM and download the keypair
Connecting to Virtual machine through bastion
Click on connection
select via bastion
select authentication type as " ssh private key from local file"
Enter username
and upload the downloaded key pair file
Click on connect
sudo su
sudo apt update
sudo apt install nginx
sudo vim /var/www/html/index.html
enter simple html code for ex : <h1> I Learnt how networking works in Azure today</h1>
sudo systemctl restart nginx
Configuring firewall
1.Open the firewall which we configured
2. Click on the firewall policy
3. Click on DNAT rule
4. Click on add a rule connection
5. Enter name and give priority as 100
6. Click on add
7. Click on " add rule"
8. select the dnat rule and give your computer's ip address as source address and destination as firewalls public ip address
9. Select protocol as TCP
10. Destination ports:4000
11. Translated type : IP address
12. Translated address : take private ip address of VM
13. Translated port : 80
14. Click on save
15. Go to the browser and give the public ip address of firewall:4000
- The html content should be visible.