Unit - 3
Unit - 3
Secure Socket Layer (SSL) provides security to the data that is transferred
between web browser and server. SSL encrypts the link between a web
server and a browser which ensures that all data passed between them
remain private and free from attack.
Secure Socket Layer Protocols:
SSL record protocol
Handshake protocol
Change-cipher spec protocol
Alert protocol
Handshake Protocol:
Handshake Protocol is used to establish sessions. This protocol allows the
client and server to authenticate each other by sending a series of messages
to each other. Handshake protocol uses four phases to complete its cycle.
Phase-1: In Phase-1 both Client and Server send hello-packets to
each other. In this IP session, cipher suite and protocol version are
exchanged for security purposes.
Phase-2: Server sends his certificate and Server-key-exchange.
The server end phase-2 by sending the Server-hello-end packet.
Phase-3: In this phase, Client replies to the server by sending his
certificate and Client-exchange-key.
Phase-4: In Phase-4 Change-cipher suite occurred and after this
Handshake Protocol ends.
Change-cipher Protocol:
This protocol uses the SSL record protocol. Unless Handshake Protocol is
completed, the SSL record Output will be in a pending state. After the
handshake protocol, the Pending state is converted into the current state.
Change-cipher protocol consists of a single message which is 1 byte in
length and can have only one value. This protocol’s purpose is to cause the
pending state to be copied into the current state.
Alert Protocol:
This protocol is used to convey SSL-related alerts to the peer entity. Each
message in this protocol contains 2 bytes.
Introduction to DMVPN
DMVPN (Dynamic Multipoint VPN) is a routing technique we can use to build a VPN
network with multiple sites without having to statically configure all devices. It’s a
“hub and spoke” network where the spokes will be able to communicate with each
other directly without having to go through the hub. Encryption is supported
through IPsec which makes DMVPN a popular choice for connecting different sites
using regular Internet connections. It’s a great backup or alternative to private
networks like MPLS VPN. A popular alternative to DMVPN is FlexVPN.
Multipoint GRE
1. No tunnel destination
2. Uses tunnel source and tunnel mode (MGRE)
3. Tunnels can have many end points (using single tunnel interface).
4. The end points can be configured as point to point or multipoint.
5. Mapping is done by NHRP protocol.
Our “regular” GRE tunnels are point-to-point and don’t scale well. For example, let’s
say we have a company network with some sites that we want to connect to each
other using regular Internet connections:
Above we have one router that represents the HQ and there are four branch offices.
Let’s say that we have the following requirements:
Right now we have a hub and spoke topology. The cool thing about DMVPN is that
we use multipoint GRE so we can have multiple destinations. When we need to
tunnel something between branch office 1/2 or 3/4, we automatically “build” new
tunnels:
When there is traffic between the branch offices, we can tunnel it directly instead of
sending it through the HQ router. This sounds pretty cool but it introduces some
problems…
HQ: 1.1.1.1
Branch1: 2.2.2.2
Branch2: 3.3.3.3
On the GRE multipoint tunnel interface we use a single subnet with the following
private IP addresses:
HQ: 192.168.1.1
Branch1: 192.168.1.2
Branch2: 192.168.1.3
Let’s say that we want to send a ping from branch1’s tunnel interface to the tunnel
interface of branch2. Here’s what the GRE encapsulated IP packet will look like:
The “inner” source and destination IP addresses are known to use, these are the IP
address of the tunnel interfaces. We encapsulate this IP packet, put a GRE header in
front of it and then we have to fill in the “outer” source and destination IP addresses
so that this packet can be routed on the Internet. The branch1 router knows it’s own
public IP address but it has no clue what the public IP address of branch2 is…
We need something that helps our branch1 router figure out what the public IP
address is of the branch2 router, we do this with a protocol called NHRP (Next Hop
Resolution Protocol). Here’s an explanation of how NHRP works:
In NHRP terminology , you’ll see that we don’t talk about “public IP addresses” but
NBMA addresses. NHRP is an old protocol (the RFC is from 1998) which was
originally developed for NBMA networks like frame-relay or ATM.
When we talk about DMVPN, we often refer to an underlay and overlay network:
The underlay network is the network we use for connectivity between the
different routers, for example the Internet.
The overlay network is our private network with GRE tunnels.
NHRP is a bit similar to ARP or frame-relay inverse ARP. Instead of mapping L2 to L3
information, we are now mapping a tunnel IP address to a NBMA IP address.
DMVPN has different versions which we call phases, there’s three of them:
Phase 1
Phase 2
Phase 3
Let me give you an overview of the three phases:
Phase 1
With phase 1 we use NHRP so that spokes can register themselves with the hub. The
hub is the only router that is using a multipoint GRE interface, all spokes will be
using regular point-to-point GRE tunnel interfaces. This means that there will
be no direct spoke-to-spoke communication, all traffic has to go through the hub!
Since our traffic has to go through the hub, our routing configuration will be quite
simple. Spoke routers only need a summary or default route to the hub to reach
other spoke routers.
Phase 2
Did you know that more than one-third of today’s websites use an SSL certificate?
That’s a huge increase since just a couple of years ago, about 7% of websites
worldwide used SSL certificates.
However, most internet users have seen the “SSL connection error” displayed
when they try to access a website.
Sometimes this error might appear with a different message such as “Your
connection is not private.”
What’s the reason behind this error?
And what you can do, as a website owner, to fix this problem?
What Is SSL?
SSL stands for Secure Sockets Layer.
It is used to create a safe connection between the client and the server which
transmits data.
This information is encrypted using two keys – a private one and a public one.
The public key is available for everyone to read, but the private one is available
only for the recipient of the message.
When a website has an SSL badge, you’ll see “https://” in front of its domain
name, instead of the classic “http://”.
This means that your connection is more secure and any data you input into the
website is encrypted to prevent theft.
What Is A SSL Certificate?
An SSL Certificate is a method of ensuring the user that the information sent over
a website is safe and encrypted.
SSL certificates contain information about the domain of the website, the owner’s
address and other relevant information.
These certificates can be bought when someone starts a website and they help build
trust with internet users or customers.
Why Does The “SSL Connection Error” Appear?
The SSL connection error is quite common and it can be caused by multiple
factors.
Sometimes the problem is found on the server hosting the website, in other cases,
the problem might be found on the user’s end.
This error can appear for a couple of reasons such as:
Having a browser problem
An antivirus program or firewall might block access to a website
The date and time of the computer trying to access the website is incorrect
Having an untrusted SSL certificate
The website might contain insecure information
The SSL certificate might have wrong information
These are just a few of the reasons why the untrusted certificate error might appear.
You should also know that such errors might be temporary. You can be blocked
from viewing a website today, but tomorrow you’ll be able to visit it just fine.
This error is not necessarily specific to a website or browser either. You can find it
in both Google Chrome and Mozilla Firefox browsers.
Users report seeing this error in multiple websites such as Gmail, Google or even
Reddit.
How To Fix The SSL Connection Error
There are multiple solutions to this problem, depending on the reason why it
appears.
#6 – Disable Antivirus/Firewall
In some cases, your own firewall or antivirus program might cause the SSL
problem.
This happens because the antivirus might mistakenly detect malware on your
website.
By deactivating your antivirus program or firewall for a while, you can fix this
problem. Make sure you also update the virus definitions and restart your computer
to see if this solved the SSL error.
Lesson Contents
GETVPN Components
o Group Member
o Key Server
o GDOI
IPSec
Configuration
o Key Server
GETVPN (Group Encrypted Transport VPN) is a tunnel-less VPN technology meant
for private networks like MPLS VPN where we use a single SA (Security
Association) for all routers in a group.
Traditional IPSec has some scalability issues because it’s point-to-point. Take a look
at the following picture:
Each line represents an IPSec point-to-point tunnel. For each IPSec tunnel, the
router has an IPSec SA. For example, R1 has four tunnels so that’s four IPsec SAs.
With only a couple of routers this is no problem, but if you have a large topology
and you need a full mesh of IPSec tunnels, things can get hairy. There is a limit to
the number of IPSec SAs each router can have.
When you run IPSec on top of a hub and spoke topology like DMVPN then the hub
has an IPSec SA with each and every spoke router. This limits the number of spoke
routers you can have. DMVPN supports direct spoke-to-spoke traffic but when a
spoke wants to send traffic to another spoke, it first has to create a new IPSec SA
which takes time, causing delay.
Another issue with traditional IPSec is that you can’t encapsulate multicast traffic
unless you encapsulate it first with GRE.
GETVPN solves the scalability issue by using a single IPSec SA for all routers in a
group. It also supports multicast traffic without GRE. In this lesson, I’ll explain how
GETVPN works and I’ll show you how to configure it.
GETVPN Components
GM (Group Member)
KS (Key Server)
GDOI (Group Domain of Interpretation)
IPSec
Let’s take a closer look at each component:
Group Member
The GM (Group Member) is a VPN router that is a member of the group
and encrypts traffic with other GMs. All GMs have the same IPSec SA so any GM
can encrypt traffic with any other GM right away.
Key Server
The KS (Key Server) is the “caretaker” of our group. They KS takes care of group
registration and authentication of GMs. Each GM that wants to join the group
registers with the KS and when authentication is successful, the KS sends the
encryption keys and the policy that we use for the group.
When a GM tries to register with the KS, the KS checks a group ID and IKE
credentials. When this checks out, the KS sends the following items to the GM:
The KS takes care of registration, authentication, the security policy, and the keys
but it’s not a GM. The KS does not become part of the group, it doesn’t install and
use the IPSec SA.
GDOI
GDOI is the protocol we use between the KS and GMs. It is protected with ISAKMP
phase 1, the same ISAKMP we use for regular IPSec. You can use all ISAKMP
authentication options like a pre-shared key or certificates. In phase 2, the KS sends
the two keys (KEK and TEK) and the security policy. The KS keeps track of the SA
lifetime and rekeys a new SA when it is about to expire. The rekey messages
are signed with a private key of the KS since anyone could pretend to be the KS.
GETVPN uses ESP (Encapsulating Security Payload), the same as traditional IPSec
VPNs. It only supports tunnel mode which encapsulates the entire IP packet which
adds a new IP header. There is a twist however, GETVPN uses tunnel mode with
address preservation. This means it copies the inner IP header to the outer IP
header, without any changes. Here’s an example:
With traditional IPSec ESP tunnel mode, the outer header always has the IP
addresses of the VPN routers. Here’s an example:
The internal IP header shows traffic from different hosts on the network but the
outside IP header always shows the IP addresses of the VPN routers. Using tunnels
like this is known as overlay routing and one of the disadvantages is that these
packets probably always get routed the same way throughout our network since the
IP addresses never change.
Using tunnel mode with address preservation, the outer IP header has the IP
addresses of the inner IP header:
The advantage of copying the inner IP header to the outer IP header is that the
network can route packets based on the actual destination and find the best path to
each destination. One disadvantage, however, is that you can’t use address
preservation on the Internet since private IP addresses are unroutable. It’s
incompatible with NAT since NAT makes changes to the outer IP header.
GETVPN is meant for private networks, like MPLS VPN where you have full
reachability between all sites.
You might wonder, why don’t we just use IPSec transport mode instead of tunnel
mode? Transport mode uses the original IP header without copying so there is less
overhead. This is true but transport mode has some issues with fragmentation.
There is only one IP header so if you fragment the IP packet before IPSec and it gets
fragmented again during transit, you need an extra header to store the second
fragmentation. Because of this, they decided to use ESP tunnel mode with address
preservation for GETVPN.
Configuration
You now know the basics of GETVPN so let’s see if we can configure this. Here is the
topology I’ll use:
We have one key server and four group members. The cloud in the middle
represents a private WAN. OSPF is configured on the GM routers to advertise the
loopback interfaces.
Key Server
Let’s start with the KS, that’s where we need to configure most things. There are a
couple of items we need:
IKE phase 1 policy: this is how the GMs authenticate with the KS.
RSA key: used for rekeying to secure the re-key messages.
IPSec policy: the policy that defines how we encrypt traffic.
Access-list: the traffic that we want to encrypt.
Read
Discuss
Public key infrastructure or PKI is the governing body behind issuing digital
certificates. It helps to protect confidential data and gives unique identities to users
and systems. Thus, it ensures security in communications.
The public key infrastructure uses a pair of keys: the public key and the private key to
achieve security. The public keys are prone to attacks and thus an intact infrastructure
is needed to maintain them.
The security of a cryptosystem relies on its keys. Thus, it is important that we have a
solid key management system in place. The 3 main areas of key management are as
follows:
A cryptographic key is a piece of data that must be managed by secure
administration.
It involves managing the key life cycle which is as follows:
Public key management further requires:
Keeping the private key secret: Only the owner of a private key
is authorized to use a private key. It should thus remain out of
reach of any other person.
Assuring the public key: Public keys are in the open domain
and can be publicly accessed. When this extent of public
accessibility, it becomes hard to know if a key is correct and what
it will be used for. The purpose of a public key must be explicitly
defined.
PKI or public key infrastructure aims at achieving the assurance of public key.
Public key infrastructure affirms the usage of a public key. PKI identifies a public key
along with its purpose. It usually consists of the following components:
A digital certificate also called a public key certificate
Private Key tokens
Registration authority
Certification authority
CMS or Certification management system
Working on a PKI:
A digital certificate can be divided into four broad categories. These are :
Class 1: These can be obtained by only providing the email address.
Class 2: These need more personal information.
Class 3: This first checks the identity of the person making a request.
Class 4: They are used by organizations and governments.
Disadvantages of PKI:
Speed: Since PKI uses super complex algorithms to create a secure key
pair. So it eventually slows down the process and data transfer.
Private Key Compromise: Even though PKI can’t be hacked very easily
but a private key can be hacked by a professional hacker, since PKI uses
Public and Private key to encrypt and decrypt data so with user’s private
key in hand and public key which is easily available the information can be
decrypted easily.
Digital Signature
The Digital Signature is a technique which is used to validate the authenticity and
integrity of the message. We know that there are four aspects of security: privacy,
authentication, integrity, and non-repudiation. We have already discussed the first
aspect of security and other three aspects can be achieved by using a digital
signature.
The basic idea behind the Digital Signature is to sign a document. When we send a
document electronically, we can also sign it. We can sign a document in two ways: to
sign a whole document and to sign a digest.