fbpx

MikroTik IPSec: Choose between Tunnel Mode and Transport Mode for VPN

Facebook
Twitter
LinkedIn
WhatsApp
Telegram

At Mikrotik, the tunnel mode and transport mode They are two different modes of operation for IPsec VPN connections.

At the end of the article you will find a small test that will allow you assess the knowledge acquired in this reading

tunnel mode

In tunnel mode, all traffic passing through the VPN interface is encapsulated in an IPsec packet. This means that traffic is encrypted and decrypted on both ends of the VPN connection.

Tunnel mode is the most secure configuration for VPN connections, as it protects all traffic, regardless of its protocol or application. However, it is also the most resource-demanding configuration, as it requires all packets to be encapsulated and decapsulated. In this mode the entire IP packet is encrypted and becomes the data component of a new (and larger) IP packet.

Frequently used in an Ipsec site-to-site VPN

MikroTik IPSec: Choose between Tunnel Mode and Transport Mode for VPN

In transport mode, only data that is transmitted between two specific hosts is encapsulated in an IPsec packet. This means that traffic that is not directed to specific hosts is not encrypted or decrypted.

Transport mode is less secure than tunnel mode, as it does not protect all traffic. However, it is also less demanding in terms of resources, as it only requires that packets be encapsulated and deencapsulated when transmitted between specific hosts.

Transport Mode Features

  • IPsec header is inserted into the IP packet
  • No new package is created
  • Works well on networks where increasing the size of a packet could cause a problem

Frequently used for remote access VPNs

MikroTik IPSec: Choose between Tunnel Mode and Transport Mode for VPN

Key differences

The following table summarizes the key differences between tunnel mode and transport mode:

Feature

tunnel mode

mode of transport

Security

High

Low

Resource requirement

High

Low

Encapsulation

All traffic

Only traffic between specific hosts

 

Choosing the correct mode

Choosing the correct mode for an IPsec VPN connection depends on the security and performance needs of the application.

If security is the top priority, tunnel mode is the best option. If performance is the main priority, transport mode is a good option.

In general, tunnel mode is the best choice for VPN connections that require a high level of security, such as connections used to access sensitive data. Transport mode is a good choice for VPN connections that require good performance, such as connections used to transmit high-speed data.

Types of tunnels that work with IPSec

Tunnel type

Description

Site-to-Site IPsec Tunnel

Securely connect two separate networks over the Internet. Allows secure communication between the subnets of the two locations.

Remote Access IPsec VPN

Allows remote users to securely connect to the office network from external locations. It uses IPsec to secure the connection and can be implemented with different VPN protocols such as L2TP/IPsec or IKEv2/IPsec.

L2TP/IPsec tunnel

Combines L2TP (Layer 2 Tunneling Protocol) with IPsec to create a secure tunnel. Often used for remote access connections.

IKEv2/IPsec tunnel

It uses the IKEv2 (Internet Key Exchange version 2) protocol for security and key exchange, combined with IPsec for data protection. It offers a more efficient and robust configuration compared to IKEv1.

EoIP/IPsec tunnel

It allows the creation of an Ethernet over IP (EoIP) tunnel and is then secured using IPsec to provide security. Useful for extending an Ethernet network over the Internet safely.

IPIP

It allows the creation of an IPIP and is then secured using IPsec to provide security.

Common features

All IPsec tunnels in MikroTik use the following elements:

  • IPsec interface: A virtual interface used to encapsulate IPsec traffic.
  • Security parameters: Security parameters, such as encryption algorithm and key, are used to protect data transmitted through the tunnel.
  • Firewall rules: Firewall rules allow IPsec traffic to be transmitted through the tunnel.

Choice of tunnel type

The type of IPsec tunnel to choose depends on the specific needs of the application.

  • Site-to-Site IPsec Tunnel: This type of tunnel is suitable for connecting two separate networks over the Internet.
  • Remote Access IPsec VPN: This type of tunnel is suitable for allowing remote users to securely connect to the office network from external locations.
  • L2TP/IPsec Tunnel: This type of tunnel is suitable for remote access connections that require support for the L2TP protocol.
  • IKEv2/IPsec Tunnel: This type of tunnel is suitable for remote access connections that require a more efficient and robust configuration.
  • EoIP/IPsec Tunnel: This type of tunnel is suitable for extending an Ethernet network over the Internet securely.
  • IPIP: This type of tunnel is suitable for providing security to an existing IPIP tunnel.

Brief knowledge quiz

What do you think of this article?
Do you dare to evaluate your learned knowledge?

QUIZ - MikroTik IPSec: Choose between Tunnel Mode and Transport Mode for VPN

Recommended book for this article

Do you want to suggest a topic?

Every week we post new content. Do you want us to talk about something specific?
Topic for the next blog

Leave a comment

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

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011