Azure Fundamental – Azure Networking Live Example (Part-7)

Azure Networking Live Example

How to setup networking

how to deploy the application on Azure VM with networking and use bastion

sending request from firewall ip address using port 4000 to Virtual machine nginx webserver having html code

Step 1: Create resource group

Step 2: Create Virtual Network (VNET)

Note : Azure Bastion – Azure Bastion is a fully managed service that provides secure and seamless RDP (Remote Desktop Protocol) and SSH (Secure Shell) connectivity to your virtual machines (VMs) directly through the Azure portal. It eliminates the need to expose public IP addresses on your VMs, thus enhancing security by preventing exposure to the public internet. Link – https://www.cloudopsnow.in/azure-bastian/

Step 3: Create Virtual machine

if go to machine and check VM it doesn’t have public ip because it will going to access via Bastian (to connect securely)

Step 4 : Connect VM via Bastian and install ngnix and create HTML file

Install and Configure Nginx on Ubuntu

Step 1: Update Package Lists

Before installing any new software, it’s a good practice to update the package lists to ensure you get the latest version.

sudo apt update
sudo apt upgrade

Step 2: Install Nginx

Install Nginx using the following command:

sudo apt install nginx

Step 3: Start Nginx Service

sudo systemctl start nginx

Step 4: Create HTML File

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

Add the HTML content, for example.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Demo Page</title>
</head>
<body>
    <h1> I Learnt how networking works in Azure today</h1>
</body>
</html>

Save the file.

Restart Nginx

sudo systemctl restart nginx

Step 5: configure firewall policy , if someone access ip address of firewall on particular port will forward request to VM.

Go to virtual network –> configured Virtual network –> firewall –> firewall policy –> DNAT –>Add rule collection

Now add rule

Source ip address – I am restricting only to connect from my laptop

Destination ip address – firewall ip address

firewall port can be any number i added 4000

tranlated address is VM ip address and port 80

step 6: Connect via firewall ip address :port number

http://172.191.155.181:4000/

Related Posts

Synapse Analytics Copy Activity Sink dedicated SQL Pool – Failing with SqlClient Data Provider,SqlErrorNumber=105215

Scenario Want to write data into a SQL dedicated pool using a pipeline in Synapse Workspace. In a copy activity I read data from ADLS V2 and…

Read More

Azure Fundamental – Azure Identity and Access Management (Part -11)

What is IAM in Azure? IAM stands for Identity and Access Management. In Azure, IAM is a framework for managing digital identities and access to resources. It…

Read More

Azure Fundamental – Azure Resource Manager and Azure Templates (Part-10)

Detailed Explanation: Example Scenario: Suppose a user wants to deploy a virtual machine (VM) on Azure. They could: To Start with Azure template Download Visual studio –>…

Read More

How to Install Azure CLI in Visual studio

1. Download & Launch Visual Studio Code The first step is to download and install Visual Studio Code here if you haven’t downloaded it before. If you have, just…

Read More

Azure Fundamental – Azure CLI -Command Line Interface (Part-9)

Azure CLI Azure Command-Line Interface (CLI) is a set of commands used to create and manage Azure resources. It is designed for those who prefer to manage…

Read More

Azure Fundamental – Azure Storage Service (Part-8)

Azure Blob Storage Azure File Storage Azure Tables Azure Queue Storage Azure Service Description When to Use It Example from DevOps Engineer Point of View Equivalent Service…

Read More
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x