# Libreswan

> Free software implementation of the IPsec VPN protocol and the Internet Key Exchange (IKE)

Source: https://talira.ai/catalog/libreswan-afy3ayy0
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Infrastructure, Command-line tool
- Categories: [networking / vpn](https://talira.ai/categories/networking/vpn)
- Platforms: linux, cli[^2][^5]
- Licence: GPL-2.0-or-later[^2][^4]
- Pricing: Free and open source[^2][^3]
- Pricing notes: Free and open source (GPLv2 or later); core developers' companies (Foobar Oy, No Hats Corporation, Phenome) sell commercial support.
- Free tier: yes[^2][^3]
- Self-hostable: yes[^2]
- Backed by: [The Libreswan Project](https://talira.ai/orgs/libreswan.md)

Libreswan is an IPsec VPN implementation: its IKE daemon negotiates IKEv1 and IKEv2 and installs the security associations in the Linux kernel's built-in XFRM IPsec stack, and it also runs on [FreeBSD](https://talira.ai/catalog/freebsd-d628b1cm.md), [NetBSD](https://talira.ai/catalog/netbsd-rbkr0d2d.md) and [OpenBSD](https://talira.ai/catalog/openbsd-1kbtwmnq.md). It keeps private keys and X.509 certificates in an NSS database, supports NAT traversal and most IPsec extensions, and is configured in /etc/ipsec.conf and ipsec.secrets, with the ipsec command for starting, status and importing certificates. Its documented setups cover host-to-host and subnet-to-subnet tunnels, IKEv2 remote access, route-based VPNs, opportunistic IPsec and connecting to Cisco ASA, AWS and Azure. Forked from Openswan 2.6.38, which came from FreeS/WAN (founded 1997), it ships in Fedora, RHEL and [Arch Linux](https://talira.ai/catalog/arch-linux-6v5qs9ac.md) and is GPLv2 or later.

## Links

- Website: https://libreswan.org/
- GitHub: https://github.com/libreswan/libreswan
- Docs: https://libreswan.github.io/

## Ways to install

### Package managers

- [APT](https://talira.ai/catalog/apt-d7essv0z.md): <https://packages.debian.org/stable/libreswan>[^1]

## Problems it solves

- connect our office network to an AWS or Azure VPN gateway with IPsec from a Linux server
- set up an IKEv2 remote-access VPN on Fedora or RHEL with packages the distribution already ships
- link two sites' subnets with an IPsec tunnel between Linux gateways
- encrypt all traffic between two servers with a host-to-host IPsec connection
- connect a Linux machine to a Cisco ASA VPN as an IPsec client
- encrypt traffic to any host that supports IPsec automatically, without configuring each tunnel
- keep IPsec VPN certificates and private keys in an NSS database or a hardware token
- a route-based IPsec VPN with a virtual interface on Linux
- an IPsec VPN that fails over between instances in AWS
- move an old Openswan IPsec configuration to a maintained IKE daemon

## Features

- IKEv1 and IKEv2
- uses the Linux kernel's XFRM IPsec stack
- NSS crypto library and NSS database for keys and X.509 certificates, including hardware tokens
- NAT traversal
- host-to-host, subnet-to-subnet, remote-access and route-based VPNs
- opportunistic IPsec, including with Let's Encrypt certificates
- ipsec command for start, stop, status and certificate import
- integration with systemd, upstart, sysvinit and openrc
- SELinux labeled IPsec

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.32 out of 1.
Signals: backing 0.30, extensibility 0.20.

- backed by The Libreswan Project

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [strongSwan](https://talira.ai/catalog/strongswan-313s8er0.md): Open-source, modular and portable IPsec-based VPN solution
- [WireGuard](https://talira.ai/catalog/wireguard-5kp2vca6.md): Fast, modern, secure VPN tunnel
- [OpenVPN](https://talira.ai/catalog/openvpn-1k280v71.md): Open source VPN daemon
- [CloudConnexa](https://talira.ai/catalog/cloudconnexa-tqrp0dy7.md): Cloud-delivered VPN and zero trust network access from OpenVPN
- [Pritunl](https://talira.ai/catalog/pritunl-w48hbdn2.md): Enterprise Distributed OpenVPN WireGuard and IPsec Server
- [OpenVPN Access Server](https://talira.ai/catalog/openvpn-access-server-7jptz9hj.md): Fast and Easy Zero-Trust VPN Fully in Your Control

## Sources

[^1]: https://deb.debian.org/debian/dists/stable/main/source/Sources.xz (checked 21 Nov 2026)
[^2]: https://libreswan.org/ (checked 20 Nov 2026)
[^3]: https://libreswan.github.io/Support (checked 20 Nov 2026)
[^4]: https://github.com/libreswan/libreswan/blob/main/LICENSE (checked 20 Nov 2026)
[^5]: https://github.com/libreswan/libreswan (checked 20 Nov 2026)
