AZURE P2S and TRANSIT GATEWAY
Published: 2022-09-09 20:56:37


**AZURE POINT-TO-SITE CONNECTIVITY (P2S) and TRANSIT GATEWAY**

A Point-to-Site (P2S) VPN gateway connection lets you create a secure connection to your virtual network from an individual client computer. A P2S connection is established by starting it from the client computer.

Creating a P2S Connectivity:

Block Diagram of the connectivity we will be making shown below.

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

- We need to have **SUBSCRIPTION** in my case I'm using **STUDENT SUBSCRIPTION**.

- Creating a **RESOURCE GROUP**.

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

- Creating a **Virtual Network** and creating a Subnet of IP **(10.0.1.0/24)**.

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

- Creating a **Virtual Machine** and including the **Virtual Network** with **Subnet** in it.

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

- Now creating a **Virtual Network Gateway**. This will take around 20-25mins to be created.

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

- In the mean time we create the root and child certificates.
Now in Google we search for **Point-to-site certificates** . And then we create root certificate by copying the above code and running it in **PowerShell**.

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

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

- Now we open search **certificates** in windows search and then we need to export the **root certificate**.

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

- In the same manner we create the **child certificate** and export it as we have done while doing the **root certificate**.

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

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

- After the certificates are created they are saved in the location provided by us (in my case Downloads section).

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

- Then we go to **Virtual Network Gateway** and under **Point-to-Site-Configuration** we need to add the root credentials in it and save it and **download the VPN Client**.

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

- Now we need to install the child certificate in the point desktop.

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

- Now we extract the VPN that we had downloaded earlier. We will now go traverse in **WindowsAmd64** folder and then run the application. 

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

- : Now we go to Settings>Network & Internet>VPN.

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

By doing this we successfully completed the Point-to-Site connectivity using AZURE.


**TRANSIT GATEWAY**

In this we do peering of more than 1 networks.


Block Diagram of the gateway we will be making shown below.

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

Step to create a **Transit Gateway**.

- Follow the steps to create create another **Virtual Network** and create **Subnet**.

- Create a **Virtual Machine** and include **Virtual Network** and **Subnet** into it.

- We need to create a connection between the Virtual Networks so we need to do **Peering** under **Virtual Network**.

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

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

- Need to create **Certificates** like we have done in **P2S** connectivity and install it in the **Virtual Network Gateway**.

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

- Need to **download the VPN Client**.

- Install the child certificate in the **Point** device.

- Install the Application inside the VPN.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7ycnm61ntp99ob0x2iv.png)
Now we go to **Settings>Network & Internet>VPN**.

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

By doing this we successfully completed the Transit Gateway using AZURE.

Stay tuned for my upcoming blogs.

Thank You !