Azure networking demo Project

steps

  1. Log in to the Azure portal

  2. Create a resource group

  3. Create a virtual network with the following configuration

    -- give virtual network a name

    --enable azure bastion

    --click on create new public ip address

  4. Enable azure firewall

  5. Click on create new policy

    1. Click on next

    2. keep all the values default and click on create

Creating virtual machine in the Vnet

  1. Go to virtual machines option

  2. Click on create

  3. Give name

  4. select created resource group

  5. Keep all the default values and go to networking tab

  6. select the vnet which is created and keep all the default values

  7. select the option "delete nic when VM is deleted"

  8. Click on create VM and download the keypair

Connecting to Virtual machine through bastion

  1. Click on connection

  2. select via bastion

  3. select authentication type as " ssh private key from local file"

  4. Enter username

  5. and upload the downloaded key pair file

  6. Click on connect

  7. sudo su

  8. sudo apt update

  9. sudo apt install nginx

  10. sudo vim /var/www/html/index.html

  11. enter simple html code for ex : <h1> I Learnt how networking works in Azure today</h1>

  12. 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

  1. The html content should be visible.