1 of 6

IPSec

2 of 6

What is IPsec?

  • IPsec is a group of protocols that are used together to set up encrypted connections between devices.
  • It helps keep data sent over public networks secure.
  • IPsec is often used to set up VPNs, and it works by encrypting IP packets, along with authenticating the source where the packets come from.
  • Within the term "IPsec," "IP" stands for "Internet Protocol" and "sec" for "secure." The Internet Protocol is the main routing protocol used on the Internet; it designates where data will go using IP addresses.
  • IPsec is secure because it adds encryption* and authentication to this process.

  • *Encryption is the process of concealing information by mathematically altering data so that it appears random. In simpler terms, encryption is the use of a "secret code" that only authorized parties can interpret.

3 of 6

What is a VPN? What is an IPsec VPN?

  • A virtual private network (VPN) is an encrypted connection between two or more computers.
  • VPN connections take place over public networks, but the data exchanged over the VPN is still private because it is encrypted.
  • VPNs make it possible to securely access and exchange confidential data over shared network infrastructure, such as the public Internet.
  • For instance, when employees are working remotely instead of in the office, they often use VPNs to access corporate files and applications.
  • Many VPNs use the IPsec protocol suite to establish and run these encrypted connections.
  • However, not all VPNs use IPsec. Another protocol for VPNs is SSL/TLS, which operates at a different layer in the OSI model than IPsec.

(The OSI model is an abstract representation of the processes that make the Internet work.)

4 of 6

How do users connect to an IPsec VPN?

  • Users can access an IPsec VPN by logging into a VPN application, or "client."
  • This typically requires the user to have installed the application on their device.
  • VPN logins are usually password-based. While data sent over a VPN is encrypted, if user passwords are compromised, attackers can log into the VPN and steal this encrypted data.
  • Using two-factor authentication (2FA) can strengthen IPsec VPN security, since stealing a password alone will no longer give an attacker access.

5 of 6

How does IPsec work?

  • IPsec connections include the following steps:
  • Key exchange: Keys are necessary for encryption; a key is a string of random characters that can be used to "lock" (encrypt) and "unlock" (decrypt) messages. IPsec sets up keys with a key exchange between the connected devices, so that each device can decrypt the other device's messages.
  • Packet headers and trailers: All data that is sent over a network is broken down into smaller pieces called packets. Packets contain both a payload, or the actual data being sent, and headers, or information about that data so that computers receiving the packets know what to do with them. IPsec adds several headers to data packets containing authentication and encryption information. IPsec also adds trailers, which go after each packet's payload instead of before.

6 of 6

  • Authentication: IPsec provides authentication for each packet, like a stamp of authenticity on a collectible item. This ensures that packets are from a trusted source and not an attacker.
  • Encryption: IPsec encrypts the payloads within each packet and each packet's IP header. This keeps data sent over IPsec secure and private.
  • Transmission: Encrypted IPsec packets travel across one or more networks to their destination using a transport protocol. At this stage, IPsec traffic differs from regular IP traffic in that it most often uses UDP as its transport protocol, rather than TCP.
  • TCP, the Transmission Control Protocol, sets up dedicated connections between devices and ensures that all packets arrive. UDP, the User Datagram Protocol, does not set up these dedicated connections. IPsec uses UDP because this allows IPsec packets to get through firewalls.
  • Decryption: At the other end of the communication, the packets are decrypted, and applications (e.g. a browser) can now use the delivered data.