Tanakagi / Configuring-Azure-Point-to-site-virtual-private-network-VPN-

In this project, I configured a point-to-site VPN connection for client devices to connect to my Azure virtual network.
0 stars 0 forks source link

Configuring-Azure-Point-to-site-virtual-private-network-VPN-

In this project, I configured a point-to-site VPN connection for client devices to connect to an existing Azure virtual network I created named vnet2.

Environments Used

Project walk-through:

I started this project by creating the virtual network gateway. I then to the Azure portal and started the creation of a virtual network gateway:



I filled in all the required fields as seen in the image below, making sure I named the gateway P2S-GW and selected an existing virtual network named vnet2 as well as disabled active-active mode as it wouldn’t be needed for this project:



I then waited for the review and creation of P2S-GW:
Disk Sanitization Steps Disk Sanitization Steps Disk Sanitization Steps


Once the deployment was complete I started with generating a self-signed root certificate named P2SRootCert using Powershell ISE:
Disk Sanitization Steps


and then I generated the VPN Client Certificate Name “P2SchlidCert”, using PowerShell ISE:
Disk Sanitization Steps


I then ran the certmgr command in Powershell to open the manage computer certificate settings window and verified the creation of the certificates:
Disk Sanitization Steps


I then started exporting the root certificate by right-clicking it, selecting all tasks, then selecting export which opened the following prompts:
Disk Sanitization Steps


I then followed the prompts keeping the default selected:
Disk Sanitization Steps


and then selected base 64 encoded X.509 (.CER):
Disk Sanitization Steps


I named it Point to Site Root Cert and continued following the prompts selecting next, finish and ok:
Disk Sanitization Steps Disk Sanitization Steps Disk Sanitization Steps


I then went to the folder that I saved the cert in and opened it with notepad, then copied the text between BEGIN CERTIFICATE and END CERTIFICATE:
Disk Sanitization Steps Disk Sanitization Steps


Once I copied the text I went back to the portal. I went to the virtual network gateway then under point-to-site configuration and clicked configure now:
Disk Sanitization Steps


and added an address pool of 172.16.31.0/24, selected IKEv2 and SSTP for tunnelling type so that both Windows and Mac devices can connect via the gateway:
Disk Sanitization Steps


I then pasted the text I copied from my Root Certificate (P2SRootCert) in the “Public certificate data” field and named it P2SRootCert:
Disk Sanitization Steps


I then downloaded the VPN client:
Disk Sanitization Steps


Once downloaded I went to the zip file and extracted the folder, so that I could install the VPN Client for vnet2 on my local file to test if it worked:
Disk Sanitization Steps


I selected Windows amd64 because that is what my local system runs, then selected VpnClientSetupAmd64:
Disk Sanitization Steps


I then selected “More info” then “run anyways”:
Disk Sanitization Steps Disk Sanitization Steps


then yes:
Disk Sanitization Steps


On my local computer, I went to the search bar, typed in “VPN settings” and then selected it:
Disk Sanitization Steps Disk Sanitization Steps


I then select vnet2 then “connect” on vnet2:
Disk Sanitization Steps


Then followed the prompt and selected continue:
Disk Sanitization Steps


I successfully connected to vnet2 from my local device which was the goal of this project:
Disk Sanitization Steps