Welcome to the Network Engineering Domain
Pape O. Fall's Blog

GRE Tunnel Encryption – IPSec

In this section, we will discuss securing your data while transmitting through a GRE tunnel. If you are unfamiliar with GRE tunnels, please take the time to read this post here first. We will use the same topology as the one used in the GRE post. We will just add encryption on top.

GRE File 2

It is important to note that the configuration of a plain functional GRE tunnel does not include any encryption whatsoever. In order to secure data passing through a GRE tunnel, we will need to encrypt the traffic by configuring IPSec on top. It is only then, that your GRE tunnel is now secured.

Also note that GRE tunnel are different from Point-to-Point IPSec VPN tunnel. One of the major difference is that GRE allows multicast packets to flow through the tunnel and IPSec VPN tunnel does not. So you can already guess that if you would like to run IGPs to a remote location which needs to peer via a VPN tunnel, then GRE is your best bet.

Let’s dive into the consoles and secure our GRE tunnel. At this point, the tunnel is fully functional and we can ping across. Let’s test from RouteLeak-HQ perspective…

GRE File 20

Let’s now securing the tunnel starting with RouteLeak-HQ. Note that there are 2 steps we would need to undergo.
*We would primarily need to configure a ISAKMP policy which is PHASE 1
*Then we would need to configure a IPSec profile and tie it with the ISAKMP policy

Let’s start with Phase 1 on RouteLeak-HQ…

GRE File 21

Here we initially defined the isakmp policy then moved on to set the Phase 1 parameters.

-We set the encryption to be AES which  is an advanced encryption standard
-Then we set the hash to md5 (Message Digest 5)
-Then we set the authentication method to use pre-shared key
-We set the group to be used as Diffie-Hellman group 2
-Then we set the session key lifetime to 86400sec (Which is default by the way)

Our next step is to define a pre-shared key for authentication purposes…

GRE File 30

Here, we used “RouteLeak-Key” as our pre-shared key and note that you have to specify the remote WAN interface address for all ISAKMP negotiation. Noticed how we needed to get out of the ISAKMP policy mode first ? Also, note that if you were in a scenario where you needed to peer with multiple tunnel endpoints such as in a DMVPN environment, you can use “0.0.0.0” on the hub router when defining your pre-shared key and endpoints addresses.

Let’s now move on to Phase 2…

We need to create a Transform Set for our data protection…

GRE File 23

Noticed here how we chose RouteLeak-TS as our Transform Set tag ? We then went ahead and chose esp-aes as our encryption method and md5 as our hashing algorithm.

We need now to set the transform mode…

GRE File 24

We just set the IPSec mode to transport. Ok good ! Let’s now create the IPSec profile…

GRE File 25

Noticed how we created a IPSec profile and tied the Transform Set to it ? The last step is to apply the IPSec encryption to the GRE tunnel…

GRE File 27

The same configuration needs to be applied at the other end of the tunnel except for the peer address. Let’s do that…

GRE File 31

All right ! We should be set, let’s generate some traffic and run a quick sanity check…

GRE File 32

Let’s now check RouteLeak-HQ while this is running…

GRE File 33

The command “show crypto isakmp sa” displays the ISAKMP Secuity Associations between the peers. We can see our peer here and the status is ACTIVE. This is looking good. Let’s check IPSec…

GRE File 34
GRE File 35

 

The command “show crypto ipsec sa” displays the IPSec Secuity Associations between the peers. Notice the number of encrypted and decrypted packets which increases as more traffic passes through.

That completes this topic… I’ll talk to you guys later.

Comments

  1. Hwa says:

    routeleak.com has potential, you can make your blog go viral easily.

  2. Pape says:

    Thank you. I’ll check it out…

  3. Antony says:

    Thanks Pape

  4. john weider says:

    thank you so much. great format and great information.

Leave a Reply

Your email address will not be published. Required fields are marked *

A Little About Myself

Hello I'm Pape. My friends call me Pop. I'm CCIE #48357. I enjoy my field and love to share it with others. I love to write so I'm sharing my blog with you.

Sign up to receive notifications and updates whenever new topics or videos are uploaded!

RouteLeak Calendar

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930