How to make a vpn tunnel in GNS3

Ryan De Vogel
4 min readJul 19, 2022

In this tutorial I will explain how to implement a vpn tunnel in GNS3.

For this tutorial I am going to assume you already have GNS3 configured with vmware and a router installed as well as basic knowledge of how GNS3 works. the following links can help to achieve this:

If you get the error when starting up vmware: vmware virtualized intel vt-x/ept is not supported on this platform. Try turning off Virtual Machine platform in the Windows features.

If you get the error: vmware virtualized intel vt-x/ept is not supported on this platform. Try turning off Virtual Machine platform in the Windows features.

Once that is complete we can start configuring in GNS3.

Create the following topology:

(I added the ip address ranges so it is easy to follow you don’t have to do this.)

The symbols on your computer will probably be like this:

This is no issue I just have custom once the result will be the same.

Implementation:

Once we have the topology we need to turn on all devices. This can with a symbol press of the power on button:

After everything is powered on R1 is the router we will start configuring.

Configure R1:

A terminal that looks like this should open:

Configure the ip addresses like the following:

Configure DHCP to automate the ip configuration for the PC’s:

Now let’s pick a pc to do a DHCP request(It should be successful for all pc’s):

Now do all these steps for R2 and configure only the point-to-point links for the Edge router.

Configure OSPF:

For this we will put the private networks in area 0 and the public networks in area 1.

Private networks:

Public networks:

R1 config for OSPF:

In the network command we use the wildcard mask. We could also do this on the interface but this saves us time.

Explanation wildcard mask.

Now configure R2 and the Edge router with OSPF.

Final step configure VPN tunnel:

This message is a good indication that the vpn tunnel is created successfully:

These links are the Source and Destination from the config above.

Do the same for R2 but flip the Source and destination and use 10.0.5.2 instead of 10.0.5.1 as the ip address.

To test the configuration use the trace command.

We can see it is successful since it passes the ip of the vpn. Namely 10.0.5.1.

Congrats you now have configured a vpn tunnel in GNS3.

Click The link below to download the project file:

--

--