<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://agora.nasqueron.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Duranzed</id>
	<title>Nasqueron Agora - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://agora.nasqueron.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Duranzed"/>
	<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/Special:Contributions/Duranzed"/>
	<updated>2026-04-16T07:03:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0-alpha</generator>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2520</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2520"/>
		<updated>2026-04-09T10:00:57Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
Architechture:&lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
Stability:&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== IPsec established SA negociations  ===&lt;br /&gt;
&lt;br /&gt;
With IPsec, the encrypted traffic relies on ESTABLISHED SA, which is based on :&lt;br /&gt;
* Who is the other machine ? &lt;br /&gt;
* Which algorithms to use ?&lt;br /&gt;
* Which session key to use ?&lt;br /&gt;
* Which traffic to protect ?&lt;br /&gt;
&lt;br /&gt;
the result on these negociations is : SA = security associations.&lt;br /&gt;
&lt;br /&gt;
IKE SA is the secured negociations canal between 2 pairs, it is used for:&lt;br /&gt;
&lt;br /&gt;
*Authentification&lt;br /&gt;
*Secret exchange&lt;br /&gt;
*Protect future negociations&lt;br /&gt;
&lt;br /&gt;
CHILD SA is the real SA IPsec that protects the traffic, it defines:&lt;br /&gt;
&lt;br /&gt;
* which traffic to protect&lt;br /&gt;
* Which algorithms to use EPS/AH&lt;br /&gt;
* With which key&lt;br /&gt;
&lt;br /&gt;
In short:&lt;br /&gt;
&lt;br /&gt;
IKE SA : we establish a trusty relationship&lt;br /&gt;
CHILD SA : we encrypt the traffic with these keys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
The following commands require root priviliges, it is recommanded to use a user with sudo priviliges: &lt;br /&gt;
 - &#039;&#039;&#039;service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2374</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2374"/>
		<updated>2026-02-24T10:58:09Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
Architechture:&lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
Stability:&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
The following commands require root priviliges, it is recommanded to use a user with sudo priviliges: &lt;br /&gt;
 - &#039;&#039;&#039;service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2365</id>
		<title>Operations grimoire/Alkane</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2365"/>
		<updated>2026-02-19T14:22:02Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Guides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Alkane&#039;&#039;&#039; is the new codename for our platform to host PHP and static websites.&lt;br /&gt;
&lt;br /&gt;
Alkane servers offer:&lt;br /&gt;
* nginx to serve static content directly and proxy other requests &lt;br /&gt;
* php-fpm to serve PHP content&lt;br /&gt;
&lt;br /&gt;
We maintain a state-of-art installation in the continuity of our shared hosting expertise: up-to-date PHP versions, dedicated site users for privilege separations, custom PHP pools.&lt;br /&gt;
&lt;br /&gt;
Sites are published to Alkane by a Jenkins job running on CD. Again for privilege separation, Jenkins uses different containers per site to build the site artefact.&lt;br /&gt;
&lt;br /&gt;
Alkane is a work in progress to track at [https://devcentral.nasqueron.org/T1803 T1803].&lt;br /&gt;
&lt;br /&gt;
== Guides ==&lt;br /&gt;
=== Host a new site ===&lt;br /&gt;
==== DNS ====&lt;br /&gt;
&#039;&#039;&#039;Production.&#039;&#039;&#039; subdomain.domain.tld CNAME www-alkane.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Devserver.&#039;&#039;&#039; subdomain.domain.tld CNAME www-dev.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
[[File:alkane.png|thumb|Alkane workflow]]&lt;br /&gt;
&lt;br /&gt;
==== nginx ====&lt;br /&gt;
* In {{Ops file|pillar/paas/alkane/web-001/}} add the subdomain in nginx_vhosts&lt;br /&gt;
* In {{Ops file|roles/webserver-alkane/nginx/files/vhosts/}} add the nginx configuration file&lt;br /&gt;
&lt;br /&gt;
==== Auto-provisioning ====&lt;br /&gt;
&lt;br /&gt;
;Through Jenkins:&lt;br /&gt;
* A CD job to deploy specific releases or your last commit&lt;br /&gt;
* Nothing fancy? You can adopt a standard job template &amp;quot;git fetch --all &amp;amp;&amp;amp; git switch &amp;lt;new tag&amp;gt;&amp;quot; or the job &amp;quot;ensure you&#039;re on main then git pull&amp;quot;&lt;br /&gt;
** But beware to trap like Laravel cache clearing, databases migrations&lt;br /&gt;
* Jenkins build scripts can be ported to Dockerfile if you prefer to host the PHP site on our Docker PaaS&lt;br /&gt;
&lt;br /&gt;
;Through Salt:&lt;br /&gt;
{{Ops file|roles/webserver-content}} can provision configuration for your site, especially if you need content elsewhere than in /var/wwwroot/&amp;lt;domain.tld&amp;gt;/&amp;lt;sub&amp;gt; (that content is for Jenkins to provision)&lt;br /&gt;
&lt;br /&gt;
==== Database ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PostgreSQL.&#039;&#039;&#039; Hosted on db-A cluster, see [[Operations grimoire/PostgreSQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MySQL.&#039;&#039;&#039; Hosted on db-B cluster, see [[Operations grimoire/MySQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Redis/memcached/etc.&#039;&#039;&#039; There are fully supported. For more complex applications, there are two roads:&lt;br /&gt;
* (i) the Docker PaaS, look for example how are deployed Airflow, Sentry and Penpot stacks;&lt;br /&gt;
* (ii) we create role/saas-&amp;lt;app&amp;gt; and we look if it&#039;s suitable for Alkane or if we create a specific server for that app.&lt;br /&gt;
&lt;br /&gt;
We&#039;re here to help, create a task on DevCentral with your ideas and we can offer architecture guidance and tips to host it in the best conditions.&lt;br /&gt;
&lt;br /&gt;
=== Provision credentials with .env ===&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;webserver_content_dotenv&amp;lt;/code&amp;gt; pillar to generate .env files.&lt;br /&gt;
&lt;br /&gt;
Those files allow sites using libraries like DotEnv to read secrets.&lt;br /&gt;
&lt;br /&gt;
To ensure secrets can only be read by application user, use:&lt;br /&gt;
&lt;br /&gt;
    user: &amp;lt;php-fpm pool user&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your configuration can be read and stored in memory,&lt;br /&gt;
it&#039;s probably best to directly call Vault from the app&lt;br /&gt;
and only provision Vault AppRole credentials:&lt;br /&gt;
&lt;br /&gt;
    vault: &amp;lt;path to AppRole credential&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For PHP sites where the configuration file is read every&lt;br /&gt;
request, it&#039;s probably best to cache secrets in file&lt;br /&gt;
through this mechanism.&lt;br /&gt;
&lt;br /&gt;
If you need a database, you can use:&lt;br /&gt;
&lt;br /&gt;
    db:&lt;br /&gt;
      service: entry in nasqueron_services table&lt;br /&gt;
      credentials: path to Vault secret&lt;br /&gt;
&lt;br /&gt;
To provision a secret key or other credentials, use:&lt;br /&gt;
&lt;br /&gt;
    extra_credentials:&lt;br /&gt;
      key: path to vault secret&lt;br /&gt;
&lt;br /&gt;
If you need to pass extra plain values use:&lt;br /&gt;
&lt;br /&gt;
    extra_values:&lt;br /&gt;
      key: value&lt;br /&gt;
&lt;br /&gt;
=== Migrate from Ysul ===&lt;br /&gt;
A small checklist:&lt;br /&gt;
&lt;br /&gt;
* Secrets should be stored on Vault&lt;br /&gt;
** As a migration path or alternative, you can use rOPS to provision files from Vault content&lt;br /&gt;
** Database user must be declared to {{Ops file|pillar/dbserver/cluster-B.sls}} (and Vault)&lt;br /&gt;
** You can use a PHP Vault SDK to read it and ask {{Ops file|roles/webserver-content}} to generate AppRole information for your site&lt;br /&gt;
* Build instructions should be moved from {{Ops file|roles/webserver-content}} to a Jenkinsfile on your repository&lt;br /&gt;
* Access to Docker resources should use private network&lt;br /&gt;
&lt;br /&gt;
== Why the name Alkane? ==&lt;br /&gt;
Oh, it&#039;s a word Dereckson thought about while thinking about a new webserver-&amp;lt;word&amp;gt; to replace webserver-legacy.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, ChatGPT suggested &amp;quot;pulse&amp;quot; among other uninspired names.&lt;br /&gt;
&lt;br /&gt;
Some fun about what ChatGPT has to say about Alkane:&lt;br /&gt;
&lt;br /&gt;
    Alkane could be a good product name for a webserver distribution for PHP and static sites. The name &amp;quot;Alkane&amp;quot; is a chemical term that refers to a type of hydrocarbon molecule that is characterized by its stability and simplicity. This name could be interpreted to mean that the webserver distribution is stable and easy to use.&lt;br /&gt;
    &lt;br /&gt;
    Additionally, the name &amp;quot;Alkane&amp;quot; has a unique and memorable sound, which could help the product stand out in a crowded market. The name is also short and easy to spell, which could make it easy to remember and type into search engines.&lt;br /&gt;
    &lt;br /&gt;
    ______&lt;br /&gt;
    &lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could be a good fit for a PaaS that offers a reliable and user-friendly hosting experience. The name also has a technical-sounding quality that could resonate with developers and IT professionals who are familiar with the concept of hydrocarbons in chemistry.&lt;br /&gt;
    &lt;br /&gt;
Both Alkane and Pulse are aligned with Nasqueron values:&lt;br /&gt;
&lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could reflect the value of elegance and simplicity that Nasqueron promotes. Meanwhile, Pulse, with its connotations of speed and responsiveness, could reflect the values of innovation and continuous improvement that Nasqueron also promotes.&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2364</id>
		<title>Operations grimoire/Alkane</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2364"/>
		<updated>2026-02-19T14:21:24Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Alkane&#039;&#039;&#039; is the new codename for our platform to host PHP and static websites.&lt;br /&gt;
&lt;br /&gt;
Alkane servers offer:&lt;br /&gt;
* nginx to serve static content directly and proxy other requests &lt;br /&gt;
* php-fpm to serve PHP content&lt;br /&gt;
&lt;br /&gt;
We maintain a state-of-art installation in the continuity of our shared hosting expertise: up-to-date PHP versions, dedicated site users for privilege separations, custom PHP pools.&lt;br /&gt;
&lt;br /&gt;
Sites are published to Alkane by a Jenkins job running on CD. Again for privilege separation, Jenkins uses different containers per site to build the site artefact.&lt;br /&gt;
&lt;br /&gt;
Alkane is a work in progress to track at [https://devcentral.nasqueron.org/T1803 T1803].&lt;br /&gt;
&lt;br /&gt;
== Guides ==&lt;br /&gt;
=== Host a new site ===&lt;br /&gt;
==== DNS ====&lt;br /&gt;
&#039;&#039;&#039;Production.&#039;&#039;&#039; subdomain.domain.tld CNAME www-alkane.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Devserver.&#039;&#039;&#039; subdomain.domain.tld CNAME www-dev.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
==== nginx ====&lt;br /&gt;
* In {{Ops file|pillar/paas/alkane/web-001/}} add the subdomain in nginx_vhosts&lt;br /&gt;
* In {{Ops file|roles/webserver-alkane/nginx/files/vhosts/}} add the nginx configuration file&lt;br /&gt;
&lt;br /&gt;
==== Auto-provisioning ====&lt;br /&gt;
&lt;br /&gt;
;Through Jenkins:&lt;br /&gt;
* A CD job to deploy specific releases or your last commit&lt;br /&gt;
* Nothing fancy? You can adopt a standard job template &amp;quot;git fetch --all &amp;amp;&amp;amp; git switch &amp;lt;new tag&amp;gt;&amp;quot; or the job &amp;quot;ensure you&#039;re on main then git pull&amp;quot;&lt;br /&gt;
** But beware to trap like Laravel cache clearing, databases migrations&lt;br /&gt;
* Jenkins build scripts can be ported to Dockerfile if you prefer to host the PHP site on our Docker PaaS&lt;br /&gt;
&lt;br /&gt;
;Through Salt:&lt;br /&gt;
{{Ops file|roles/webserver-content}} can provision configuration for your site, especially if you need content elsewhere than in /var/wwwroot/&amp;lt;domain.tld&amp;gt;/&amp;lt;sub&amp;gt; (that content is for Jenkins to provision)&lt;br /&gt;
&lt;br /&gt;
[[File:alkane.png|thumb|Alkane workflow]]&lt;br /&gt;
&lt;br /&gt;
==== Database ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PostgreSQL.&#039;&#039;&#039; Hosted on db-A cluster, see [[Operations grimoire/PostgreSQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MySQL.&#039;&#039;&#039; Hosted on db-B cluster, see [[Operations grimoire/MySQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Redis/memcached/etc.&#039;&#039;&#039; There are fully supported. For more complex applications, there are two roads:&lt;br /&gt;
* (i) the Docker PaaS, look for example how are deployed Airflow, Sentry and Penpot stacks;&lt;br /&gt;
* (ii) we create role/saas-&amp;lt;app&amp;gt; and we look if it&#039;s suitable for Alkane or if we create a specific server for that app.&lt;br /&gt;
&lt;br /&gt;
We&#039;re here to help, create a task on DevCentral with your ideas and we can offer architecture guidance and tips to host it in the best conditions.&lt;br /&gt;
&lt;br /&gt;
=== Provision credentials with .env ===&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;webserver_content_dotenv&amp;lt;/code&amp;gt; pillar to generate .env files.&lt;br /&gt;
&lt;br /&gt;
Those files allow sites using libraries like DotEnv to read secrets.&lt;br /&gt;
&lt;br /&gt;
To ensure secrets can only be read by application user, use:&lt;br /&gt;
&lt;br /&gt;
    user: &amp;lt;php-fpm pool user&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your configuration can be read and stored in memory,&lt;br /&gt;
it&#039;s probably best to directly call Vault from the app&lt;br /&gt;
and only provision Vault AppRole credentials:&lt;br /&gt;
&lt;br /&gt;
    vault: &amp;lt;path to AppRole credential&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For PHP sites where the configuration file is read every&lt;br /&gt;
request, it&#039;s probably best to cache secrets in file&lt;br /&gt;
through this mechanism.&lt;br /&gt;
&lt;br /&gt;
If you need a database, you can use:&lt;br /&gt;
&lt;br /&gt;
    db:&lt;br /&gt;
      service: entry in nasqueron_services table&lt;br /&gt;
      credentials: path to Vault secret&lt;br /&gt;
&lt;br /&gt;
To provision a secret key or other credentials, use:&lt;br /&gt;
&lt;br /&gt;
    extra_credentials:&lt;br /&gt;
      key: path to vault secret&lt;br /&gt;
&lt;br /&gt;
If you need to pass extra plain values use:&lt;br /&gt;
&lt;br /&gt;
    extra_values:&lt;br /&gt;
      key: value&lt;br /&gt;
&lt;br /&gt;
=== Migrate from Ysul ===&lt;br /&gt;
A small checklist:&lt;br /&gt;
&lt;br /&gt;
* Secrets should be stored on Vault&lt;br /&gt;
** As a migration path or alternative, you can use rOPS to provision files from Vault content&lt;br /&gt;
** Database user must be declared to {{Ops file|pillar/dbserver/cluster-B.sls}} (and Vault)&lt;br /&gt;
** You can use a PHP Vault SDK to read it and ask {{Ops file|roles/webserver-content}} to generate AppRole information for your site&lt;br /&gt;
* Build instructions should be moved from {{Ops file|roles/webserver-content}} to a Jenkinsfile on your repository&lt;br /&gt;
* Access to Docker resources should use private network&lt;br /&gt;
&lt;br /&gt;
== Why the name Alkane? ==&lt;br /&gt;
Oh, it&#039;s a word Dereckson thought about while thinking about a new webserver-&amp;lt;word&amp;gt; to replace webserver-legacy.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, ChatGPT suggested &amp;quot;pulse&amp;quot; among other uninspired names.&lt;br /&gt;
&lt;br /&gt;
Some fun about what ChatGPT has to say about Alkane:&lt;br /&gt;
&lt;br /&gt;
    Alkane could be a good product name for a webserver distribution for PHP and static sites. The name &amp;quot;Alkane&amp;quot; is a chemical term that refers to a type of hydrocarbon molecule that is characterized by its stability and simplicity. This name could be interpreted to mean that the webserver distribution is stable and easy to use.&lt;br /&gt;
    &lt;br /&gt;
    Additionally, the name &amp;quot;Alkane&amp;quot; has a unique and memorable sound, which could help the product stand out in a crowded market. The name is also short and easy to spell, which could make it easy to remember and type into search engines.&lt;br /&gt;
    &lt;br /&gt;
    ______&lt;br /&gt;
    &lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could be a good fit for a PaaS that offers a reliable and user-friendly hosting experience. The name also has a technical-sounding quality that could resonate with developers and IT professionals who are familiar with the concept of hydrocarbons in chemistry.&lt;br /&gt;
    &lt;br /&gt;
Both Alkane and Pulse are aligned with Nasqueron values:&lt;br /&gt;
&lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could reflect the value of elegance and simplicity that Nasqueron promotes. Meanwhile, Pulse, with its connotations of speed and responsiveness, could reflect the values of innovation and continuous improvement that Nasqueron also promotes.&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2363</id>
		<title>Operations grimoire/Alkane</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2363"/>
		<updated>2026-02-19T14:20:16Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Alkane&#039;&#039;&#039; is the new codename for our platform to host PHP and static websites.&lt;br /&gt;
&lt;br /&gt;
Alkane servers offer:&lt;br /&gt;
* nginx to serve static content directly and proxy other requests &lt;br /&gt;
* php-fpm to serve PHP content&lt;br /&gt;
&lt;br /&gt;
We maintain a state-of-art installation in the continuity of our shared hosting expertise: up-to-date PHP versions, dedicated site users for privilege separations, custom PHP pools.&lt;br /&gt;
&lt;br /&gt;
Sites are published to Alkane by a Jenkins job running on CD. Again for privilege separation, Jenkins uses different containers per site to build the site artefact.&lt;br /&gt;
&lt;br /&gt;
Alkane is a work in progress to track at [https://devcentral.nasqueron.org/T1803 T1803].&lt;br /&gt;
&lt;br /&gt;
[[File:alkane.png|thumb|Scheme]]&lt;br /&gt;
&lt;br /&gt;
== Guides ==&lt;br /&gt;
=== Host a new site ===&lt;br /&gt;
==== DNS ====&lt;br /&gt;
&#039;&#039;&#039;Production.&#039;&#039;&#039; subdomain.domain.tld CNAME www-alkane.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Devserver.&#039;&#039;&#039; subdomain.domain.tld CNAME www-dev.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
==== nginx ====&lt;br /&gt;
* In {{Ops file|pillar/paas/alkane/web-001/}} add the subdomain in nginx_vhosts&lt;br /&gt;
* In {{Ops file|roles/webserver-alkane/nginx/files/vhosts/}} add the nginx configuration file&lt;br /&gt;
&lt;br /&gt;
==== Auto-provisioning ====&lt;br /&gt;
&lt;br /&gt;
;Through Jenkins:&lt;br /&gt;
* A CD job to deploy specific releases or your last commit&lt;br /&gt;
* Nothing fancy? You can adopt a standard job template &amp;quot;git fetch --all &amp;amp;&amp;amp; git switch &amp;lt;new tag&amp;gt;&amp;quot; or the job &amp;quot;ensure you&#039;re on main then git pull&amp;quot;&lt;br /&gt;
** But beware to trap like Laravel cache clearing, databases migrations&lt;br /&gt;
* Jenkins build scripts can be ported to Dockerfile if you prefer to host the PHP site on our Docker PaaS&lt;br /&gt;
&lt;br /&gt;
;Through Salt:&lt;br /&gt;
{{Ops file|roles/webserver-content}} can provision configuration for your site, especially if you need content elsewhere than in /var/wwwroot/&amp;lt;domain.tld&amp;gt;/&amp;lt;sub&amp;gt; (that content is for Jenkins to provision)&lt;br /&gt;
&lt;br /&gt;
==== Database ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PostgreSQL.&#039;&#039;&#039; Hosted on db-A cluster, see [[Operations grimoire/PostgreSQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MySQL.&#039;&#039;&#039; Hosted on db-B cluster, see [[Operations grimoire/MySQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Redis/memcached/etc.&#039;&#039;&#039; There are fully supported. For more complex applications, there are two roads:&lt;br /&gt;
* (i) the Docker PaaS, look for example how are deployed Airflow, Sentry and Penpot stacks;&lt;br /&gt;
* (ii) we create role/saas-&amp;lt;app&amp;gt; and we look if it&#039;s suitable for Alkane or if we create a specific server for that app.&lt;br /&gt;
&lt;br /&gt;
We&#039;re here to help, create a task on DevCentral with your ideas and we can offer architecture guidance and tips to host it in the best conditions.&lt;br /&gt;
&lt;br /&gt;
=== Provision credentials with .env ===&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;webserver_content_dotenv&amp;lt;/code&amp;gt; pillar to generate .env files.&lt;br /&gt;
&lt;br /&gt;
Those files allow sites using libraries like DotEnv to read secrets.&lt;br /&gt;
&lt;br /&gt;
To ensure secrets can only be read by application user, use:&lt;br /&gt;
&lt;br /&gt;
    user: &amp;lt;php-fpm pool user&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your configuration can be read and stored in memory,&lt;br /&gt;
it&#039;s probably best to directly call Vault from the app&lt;br /&gt;
and only provision Vault AppRole credentials:&lt;br /&gt;
&lt;br /&gt;
    vault: &amp;lt;path to AppRole credential&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For PHP sites where the configuration file is read every&lt;br /&gt;
request, it&#039;s probably best to cache secrets in file&lt;br /&gt;
through this mechanism.&lt;br /&gt;
&lt;br /&gt;
If you need a database, you can use:&lt;br /&gt;
&lt;br /&gt;
    db:&lt;br /&gt;
      service: entry in nasqueron_services table&lt;br /&gt;
      credentials: path to Vault secret&lt;br /&gt;
&lt;br /&gt;
To provision a secret key or other credentials, use:&lt;br /&gt;
&lt;br /&gt;
    extra_credentials:&lt;br /&gt;
      key: path to vault secret&lt;br /&gt;
&lt;br /&gt;
If you need to pass extra plain values use:&lt;br /&gt;
&lt;br /&gt;
    extra_values:&lt;br /&gt;
      key: value&lt;br /&gt;
&lt;br /&gt;
=== Migrate from Ysul ===&lt;br /&gt;
A small checklist:&lt;br /&gt;
&lt;br /&gt;
* Secrets should be stored on Vault&lt;br /&gt;
** As a migration path or alternative, you can use rOPS to provision files from Vault content&lt;br /&gt;
** Database user must be declared to {{Ops file|pillar/dbserver/cluster-B.sls}} (and Vault)&lt;br /&gt;
** You can use a PHP Vault SDK to read it and ask {{Ops file|roles/webserver-content}} to generate AppRole information for your site&lt;br /&gt;
* Build instructions should be moved from {{Ops file|roles/webserver-content}} to a Jenkinsfile on your repository&lt;br /&gt;
* Access to Docker resources should use private network&lt;br /&gt;
&lt;br /&gt;
== Why the name Alkane? ==&lt;br /&gt;
Oh, it&#039;s a word Dereckson thought about while thinking about a new webserver-&amp;lt;word&amp;gt; to replace webserver-legacy.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, ChatGPT suggested &amp;quot;pulse&amp;quot; among other uninspired names.&lt;br /&gt;
&lt;br /&gt;
Some fun about what ChatGPT has to say about Alkane:&lt;br /&gt;
&lt;br /&gt;
    Alkane could be a good product name for a webserver distribution for PHP and static sites. The name &amp;quot;Alkane&amp;quot; is a chemical term that refers to a type of hydrocarbon molecule that is characterized by its stability and simplicity. This name could be interpreted to mean that the webserver distribution is stable and easy to use.&lt;br /&gt;
    &lt;br /&gt;
    Additionally, the name &amp;quot;Alkane&amp;quot; has a unique and memorable sound, which could help the product stand out in a crowded market. The name is also short and easy to spell, which could make it easy to remember and type into search engines.&lt;br /&gt;
    &lt;br /&gt;
    ______&lt;br /&gt;
    &lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could be a good fit for a PaaS that offers a reliable and user-friendly hosting experience. The name also has a technical-sounding quality that could resonate with developers and IT professionals who are familiar with the concept of hydrocarbons in chemistry.&lt;br /&gt;
    &lt;br /&gt;
Both Alkane and Pulse are aligned with Nasqueron values:&lt;br /&gt;
&lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could reflect the value of elegance and simplicity that Nasqueron promotes. Meanwhile, Pulse, with its connotations of speed and responsiveness, could reflect the values of innovation and continuous improvement that Nasqueron also promotes.&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2362</id>
		<title>Operations grimoire/Alkane</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2362"/>
		<updated>2026-02-19T14:19:38Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Alkane&#039;&#039;&#039; is the new codename for our platform to host PHP and static websites.&lt;br /&gt;
&lt;br /&gt;
Alkane servers offer:&lt;br /&gt;
* nginx to serve static content directly and proxy other requests &lt;br /&gt;
* php-fpm to serve PHP content&lt;br /&gt;
&lt;br /&gt;
We maintain a state-of-art installation in the continuity of our shared hosting expertise: up-to-date PHP versions, dedicated site users for privilege separations, custom PHP pools.&lt;br /&gt;
&lt;br /&gt;
Sites are published to Alkane by a Jenkins job running on CD. Again for privilege separation, Jenkins uses different containers per site to build the site artefact.&lt;br /&gt;
&lt;br /&gt;
Alkane is a work in progress to track at [https://devcentral.nasqueron.org/T1803 T1803].&lt;br /&gt;
&lt;br /&gt;
[[File:alkane.png|Scheme]]&lt;br /&gt;
&lt;br /&gt;
== Guides ==&lt;br /&gt;
=== Host a new site ===&lt;br /&gt;
==== DNS ====&lt;br /&gt;
&#039;&#039;&#039;Production.&#039;&#039;&#039; subdomain.domain.tld CNAME www-alkane.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Devserver.&#039;&#039;&#039; subdomain.domain.tld CNAME www-dev.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
==== nginx ====&lt;br /&gt;
* In {{Ops file|pillar/paas/alkane/web-001/}} add the subdomain in nginx_vhosts&lt;br /&gt;
* In {{Ops file|roles/webserver-alkane/nginx/files/vhosts/}} add the nginx configuration file&lt;br /&gt;
&lt;br /&gt;
==== Auto-provisioning ====&lt;br /&gt;
&lt;br /&gt;
;Through Jenkins:&lt;br /&gt;
* A CD job to deploy specific releases or your last commit&lt;br /&gt;
* Nothing fancy? You can adopt a standard job template &amp;quot;git fetch --all &amp;amp;&amp;amp; git switch &amp;lt;new tag&amp;gt;&amp;quot; or the job &amp;quot;ensure you&#039;re on main then git pull&amp;quot;&lt;br /&gt;
** But beware to trap like Laravel cache clearing, databases migrations&lt;br /&gt;
* Jenkins build scripts can be ported to Dockerfile if you prefer to host the PHP site on our Docker PaaS&lt;br /&gt;
&lt;br /&gt;
;Through Salt:&lt;br /&gt;
{{Ops file|roles/webserver-content}} can provision configuration for your site, especially if you need content elsewhere than in /var/wwwroot/&amp;lt;domain.tld&amp;gt;/&amp;lt;sub&amp;gt; (that content is for Jenkins to provision)&lt;br /&gt;
&lt;br /&gt;
==== Database ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PostgreSQL.&#039;&#039;&#039; Hosted on db-A cluster, see [[Operations grimoire/PostgreSQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MySQL.&#039;&#039;&#039; Hosted on db-B cluster, see [[Operations grimoire/MySQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Redis/memcached/etc.&#039;&#039;&#039; There are fully supported. For more complex applications, there are two roads:&lt;br /&gt;
* (i) the Docker PaaS, look for example how are deployed Airflow, Sentry and Penpot stacks;&lt;br /&gt;
* (ii) we create role/saas-&amp;lt;app&amp;gt; and we look if it&#039;s suitable for Alkane or if we create a specific server for that app.&lt;br /&gt;
&lt;br /&gt;
We&#039;re here to help, create a task on DevCentral with your ideas and we can offer architecture guidance and tips to host it in the best conditions.&lt;br /&gt;
&lt;br /&gt;
=== Provision credentials with .env ===&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;webserver_content_dotenv&amp;lt;/code&amp;gt; pillar to generate .env files.&lt;br /&gt;
&lt;br /&gt;
Those files allow sites using libraries like DotEnv to read secrets.&lt;br /&gt;
&lt;br /&gt;
To ensure secrets can only be read by application user, use:&lt;br /&gt;
&lt;br /&gt;
    user: &amp;lt;php-fpm pool user&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your configuration can be read and stored in memory,&lt;br /&gt;
it&#039;s probably best to directly call Vault from the app&lt;br /&gt;
and only provision Vault AppRole credentials:&lt;br /&gt;
&lt;br /&gt;
    vault: &amp;lt;path to AppRole credential&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For PHP sites where the configuration file is read every&lt;br /&gt;
request, it&#039;s probably best to cache secrets in file&lt;br /&gt;
through this mechanism.&lt;br /&gt;
&lt;br /&gt;
If you need a database, you can use:&lt;br /&gt;
&lt;br /&gt;
    db:&lt;br /&gt;
      service: entry in nasqueron_services table&lt;br /&gt;
      credentials: path to Vault secret&lt;br /&gt;
&lt;br /&gt;
To provision a secret key or other credentials, use:&lt;br /&gt;
&lt;br /&gt;
    extra_credentials:&lt;br /&gt;
      key: path to vault secret&lt;br /&gt;
&lt;br /&gt;
If you need to pass extra plain values use:&lt;br /&gt;
&lt;br /&gt;
    extra_values:&lt;br /&gt;
      key: value&lt;br /&gt;
&lt;br /&gt;
=== Migrate from Ysul ===&lt;br /&gt;
A small checklist:&lt;br /&gt;
&lt;br /&gt;
* Secrets should be stored on Vault&lt;br /&gt;
** As a migration path or alternative, you can use rOPS to provision files from Vault content&lt;br /&gt;
** Database user must be declared to {{Ops file|pillar/dbserver/cluster-B.sls}} (and Vault)&lt;br /&gt;
** You can use a PHP Vault SDK to read it and ask {{Ops file|roles/webserver-content}} to generate AppRole information for your site&lt;br /&gt;
* Build instructions should be moved from {{Ops file|roles/webserver-content}} to a Jenkinsfile on your repository&lt;br /&gt;
* Access to Docker resources should use private network&lt;br /&gt;
&lt;br /&gt;
== Why the name Alkane? ==&lt;br /&gt;
Oh, it&#039;s a word Dereckson thought about while thinking about a new webserver-&amp;lt;word&amp;gt; to replace webserver-legacy.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, ChatGPT suggested &amp;quot;pulse&amp;quot; among other uninspired names.&lt;br /&gt;
&lt;br /&gt;
Some fun about what ChatGPT has to say about Alkane:&lt;br /&gt;
&lt;br /&gt;
    Alkane could be a good product name for a webserver distribution for PHP and static sites. The name &amp;quot;Alkane&amp;quot; is a chemical term that refers to a type of hydrocarbon molecule that is characterized by its stability and simplicity. This name could be interpreted to mean that the webserver distribution is stable and easy to use.&lt;br /&gt;
    &lt;br /&gt;
    Additionally, the name &amp;quot;Alkane&amp;quot; has a unique and memorable sound, which could help the product stand out in a crowded market. The name is also short and easy to spell, which could make it easy to remember and type into search engines.&lt;br /&gt;
    &lt;br /&gt;
    ______&lt;br /&gt;
    &lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could be a good fit for a PaaS that offers a reliable and user-friendly hosting experience. The name also has a technical-sounding quality that could resonate with developers and IT professionals who are familiar with the concept of hydrocarbons in chemistry.&lt;br /&gt;
    &lt;br /&gt;
Both Alkane and Pulse are aligned with Nasqueron values:&lt;br /&gt;
&lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could reflect the value of elegance and simplicity that Nasqueron promotes. Meanwhile, Pulse, with its connotations of speed and responsiveness, could reflect the values of innovation and continuous improvement that Nasqueron also promotes.&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=File:Alkane.png&amp;diff=2361</id>
		<title>File:Alkane.png</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=File:Alkane.png&amp;diff=2361"/>
		<updated>2026-02-19T14:19:11Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2360</id>
		<title>Operations grimoire/Alkane</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Alkane&amp;diff=2360"/>
		<updated>2026-02-19T14:18:51Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Alkane&#039;&#039;&#039; is the new codename for our platform to host PHP and static websites.&lt;br /&gt;
&lt;br /&gt;
Alkane servers offer:&lt;br /&gt;
* nginx to serve static content directly and proxy other requests &lt;br /&gt;
* php-fpm to serve PHP content&lt;br /&gt;
&lt;br /&gt;
We maintain a state-of-art installation in the continuity of our shared hosting expertise: up-to-date PHP versions, dedicated site users for privilege separations, custom PHP pools.&lt;br /&gt;
&lt;br /&gt;
Sites are published to Alkane by a Jenkins job running on CD. Again for privilege separation, Jenkins uses different containers per site to build the site artefact.&lt;br /&gt;
&lt;br /&gt;
Alkane is a work in progress to track at [https://devcentral.nasqueron.org/T1803 T1803].&lt;br /&gt;
[[File:alkane.png|Caption text]]&lt;br /&gt;
== Guides ==&lt;br /&gt;
=== Host a new site ===&lt;br /&gt;
==== DNS ====&lt;br /&gt;
&#039;&#039;&#039;Production.&#039;&#039;&#039; subdomain.domain.tld CNAME www-alkane.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Devserver.&#039;&#039;&#039; subdomain.domain.tld CNAME www-dev.nasqueron.org&lt;br /&gt;
&lt;br /&gt;
==== nginx ====&lt;br /&gt;
* In {{Ops file|pillar/paas/alkane/web-001/}} add the subdomain in nginx_vhosts&lt;br /&gt;
* In {{Ops file|roles/webserver-alkane/nginx/files/vhosts/}} add the nginx configuration file&lt;br /&gt;
&lt;br /&gt;
==== Auto-provisioning ====&lt;br /&gt;
&lt;br /&gt;
;Through Jenkins:&lt;br /&gt;
* A CD job to deploy specific releases or your last commit&lt;br /&gt;
* Nothing fancy? You can adopt a standard job template &amp;quot;git fetch --all &amp;amp;&amp;amp; git switch &amp;lt;new tag&amp;gt;&amp;quot; or the job &amp;quot;ensure you&#039;re on main then git pull&amp;quot;&lt;br /&gt;
** But beware to trap like Laravel cache clearing, databases migrations&lt;br /&gt;
* Jenkins build scripts can be ported to Dockerfile if you prefer to host the PHP site on our Docker PaaS&lt;br /&gt;
&lt;br /&gt;
;Through Salt:&lt;br /&gt;
{{Ops file|roles/webserver-content}} can provision configuration for your site, especially if you need content elsewhere than in /var/wwwroot/&amp;lt;domain.tld&amp;gt;/&amp;lt;sub&amp;gt; (that content is for Jenkins to provision)&lt;br /&gt;
&lt;br /&gt;
==== Database ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PostgreSQL.&#039;&#039;&#039; Hosted on db-A cluster, see [[Operations grimoire/PostgreSQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MySQL.&#039;&#039;&#039; Hosted on db-B cluster, see [[Operations grimoire/MySQL]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Redis/memcached/etc.&#039;&#039;&#039; There are fully supported. For more complex applications, there are two roads:&lt;br /&gt;
* (i) the Docker PaaS, look for example how are deployed Airflow, Sentry and Penpot stacks;&lt;br /&gt;
* (ii) we create role/saas-&amp;lt;app&amp;gt; and we look if it&#039;s suitable for Alkane or if we create a specific server for that app.&lt;br /&gt;
&lt;br /&gt;
We&#039;re here to help, create a task on DevCentral with your ideas and we can offer architecture guidance and tips to host it in the best conditions.&lt;br /&gt;
&lt;br /&gt;
=== Provision credentials with .env ===&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;webserver_content_dotenv&amp;lt;/code&amp;gt; pillar to generate .env files.&lt;br /&gt;
&lt;br /&gt;
Those files allow sites using libraries like DotEnv to read secrets.&lt;br /&gt;
&lt;br /&gt;
To ensure secrets can only be read by application user, use:&lt;br /&gt;
&lt;br /&gt;
    user: &amp;lt;php-fpm pool user&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your configuration can be read and stored in memory,&lt;br /&gt;
it&#039;s probably best to directly call Vault from the app&lt;br /&gt;
and only provision Vault AppRole credentials:&lt;br /&gt;
&lt;br /&gt;
    vault: &amp;lt;path to AppRole credential&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For PHP sites where the configuration file is read every&lt;br /&gt;
request, it&#039;s probably best to cache secrets in file&lt;br /&gt;
through this mechanism.&lt;br /&gt;
&lt;br /&gt;
If you need a database, you can use:&lt;br /&gt;
&lt;br /&gt;
    db:&lt;br /&gt;
      service: entry in nasqueron_services table&lt;br /&gt;
      credentials: path to Vault secret&lt;br /&gt;
&lt;br /&gt;
To provision a secret key or other credentials, use:&lt;br /&gt;
&lt;br /&gt;
    extra_credentials:&lt;br /&gt;
      key: path to vault secret&lt;br /&gt;
&lt;br /&gt;
If you need to pass extra plain values use:&lt;br /&gt;
&lt;br /&gt;
    extra_values:&lt;br /&gt;
      key: value&lt;br /&gt;
&lt;br /&gt;
=== Migrate from Ysul ===&lt;br /&gt;
A small checklist:&lt;br /&gt;
&lt;br /&gt;
* Secrets should be stored on Vault&lt;br /&gt;
** As a migration path or alternative, you can use rOPS to provision files from Vault content&lt;br /&gt;
** Database user must be declared to {{Ops file|pillar/dbserver/cluster-B.sls}} (and Vault)&lt;br /&gt;
** You can use a PHP Vault SDK to read it and ask {{Ops file|roles/webserver-content}} to generate AppRole information for your site&lt;br /&gt;
* Build instructions should be moved from {{Ops file|roles/webserver-content}} to a Jenkinsfile on your repository&lt;br /&gt;
* Access to Docker resources should use private network&lt;br /&gt;
&lt;br /&gt;
== Why the name Alkane? ==&lt;br /&gt;
Oh, it&#039;s a word Dereckson thought about while thinking about a new webserver-&amp;lt;word&amp;gt; to replace webserver-legacy.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, ChatGPT suggested &amp;quot;pulse&amp;quot; among other uninspired names.&lt;br /&gt;
&lt;br /&gt;
Some fun about what ChatGPT has to say about Alkane:&lt;br /&gt;
&lt;br /&gt;
    Alkane could be a good product name for a webserver distribution for PHP and static sites. The name &amp;quot;Alkane&amp;quot; is a chemical term that refers to a type of hydrocarbon molecule that is characterized by its stability and simplicity. This name could be interpreted to mean that the webserver distribution is stable and easy to use.&lt;br /&gt;
    &lt;br /&gt;
    Additionally, the name &amp;quot;Alkane&amp;quot; has a unique and memorable sound, which could help the product stand out in a crowded market. The name is also short and easy to spell, which could make it easy to remember and type into search engines.&lt;br /&gt;
    &lt;br /&gt;
    ______&lt;br /&gt;
    &lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could be a good fit for a PaaS that offers a reliable and user-friendly hosting experience. The name also has a technical-sounding quality that could resonate with developers and IT professionals who are familiar with the concept of hydrocarbons in chemistry.&lt;br /&gt;
    &lt;br /&gt;
Both Alkane and Pulse are aligned with Nasqueron values:&lt;br /&gt;
&lt;br /&gt;
    Alkane, with its connotations of stability and simplicity, could reflect the value of elegance and simplicity that Nasqueron promotes. Meanwhile, Pulse, with its connotations of speed and responsiveness, could reflect the values of innovation and continuous improvement that Nasqueron also promotes.&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2359</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2359"/>
		<updated>2026-02-19T08:05:27Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
Architechture:&lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
Stability:&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2358</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2358"/>
		<updated>2026-02-19T08:05:13Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2357</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2357"/>
		<updated>2026-02-18T14:46:05Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* IPsec solution - key decision questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
Architechture:&lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
Stability:&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2356</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2356"/>
		<updated>2026-02-18T14:45:48Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* IPsec solution - key decision questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2355</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2355"/>
		<updated>2026-02-18T14:45:25Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* IPsec solution - key decision questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
 Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
&lt;br /&gt;
 Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
 Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
 Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2354</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2354"/>
		<updated>2026-02-18T14:41:04Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Official documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2353</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2353"/>
		<updated>2026-02-18T13:42:48Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type.&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload).&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdunmp -i grex&#039;&#039;&#039; --&amp;gt; Captures traffic on the gre tunnel interface.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Operations_grimoire/Operations_repository&amp;diff=2352</id>
		<title>Operations grimoire/Operations repository</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Operations_grimoire/Operations_repository&amp;diff=2352"/>
		<updated>2026-02-18T13:34:59Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Python dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Our configuration as code is stores in the operations (rOPS) repository.&lt;br /&gt;
&lt;br /&gt;
== Repository layout ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|+ Content of rOPS&lt;br /&gt;
|-&lt;br /&gt;
! Path !! Description&lt;br /&gt;
|-&lt;br /&gt;
| _modules || Custom execution modules&lt;br /&gt;
|-&lt;br /&gt;
| _states || Custom states modules&lt;br /&gt;
|-&lt;br /&gt;
| _tests || Unit tests for custom modules, scripts, tests for repo&lt;br /&gt;
|-&lt;br /&gt;
| hotfixes || Fixes you need to run to solve a problem on the servers&lt;br /&gt;
|-&lt;br /&gt;
| pillar || Configuration data structures to use in the states&lt;br /&gt;
|-&lt;br /&gt;
| roles || The states to deploy, divided in roles and then in units&lt;br /&gt;
|-&lt;br /&gt;
| utils || Helper scripts to maintain the repository&lt;br /&gt;
|-&lt;br /&gt;
| terraform || OpenTofu / Terraform infrastructure configuration&lt;br /&gt;
|-&lt;br /&gt;
| map.jinja || As we deploy on several OS and distros, mapping of packages names or directories&lt;br /&gt;
|-&lt;br /&gt;
| top.sls || topfile: what we deploy where?&lt;br /&gt;
|-&lt;br /&gt;
| PORTS || Documentation of the ports used in the configuration&lt;br /&gt;
|-&lt;br /&gt;
| UIDs || Documentation of the users used in the configuration&lt;br /&gt;
|-&lt;br /&gt;
| GIDs || Documentation of the groups used in the configuration&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Contributions howto ==&lt;br /&gt;
=== Repository source ===&lt;br /&gt;
You&#039;ll find the Operations repository at https://devcentral.nasqueron.org/source/operations/&lt;br /&gt;
&lt;br /&gt;
If DevCentral isn&#039;t available, a mirror of the repository can be found at https://github.com/nasqueron/operations.&lt;br /&gt;
&lt;br /&gt;
=== Workflow of contributions ===&lt;br /&gt;
We follow the general workflow is described at [[How to contribute code]].&lt;br /&gt;
&lt;br /&gt;
Before committing a change to the main branch, you can test a deployment on a server.&lt;br /&gt;
In that case, merge in main immediately after the deployment as the repository is the source of truth for the server state.&lt;br /&gt;
&lt;br /&gt;
Log what you do on #nasqueron-ops, so it will be included at https://infra.nasqueron.org/servers-log/&lt;br /&gt;
&lt;br /&gt;
=== Code conventions ===&lt;br /&gt;
&#039;&#039;See also: [[Code conventions]].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Python code: run `black` before committing&lt;br /&gt;
* YAML: indent with two spaces, including list bullets&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
id:&lt;br /&gt;
  method:&lt;br /&gt;
    - somekey: value&lt;br /&gt;
    - otherkey: value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Environment setup ==&lt;br /&gt;
&lt;br /&gt;
Use of WindRiver is recommended if you wish to get an environment already installed for your contributions.&lt;br /&gt;
&lt;br /&gt;
=== Everywhere setup ===&lt;br /&gt;
This section cover topics needed both on our development servers or in your laptop.&lt;br /&gt;
&lt;br /&gt;
==== Python dependencies ====&lt;br /&gt;
&lt;br /&gt;
Create a virtual environment, then install dependencies from {{Ops file|requirements.txt}}:&lt;br /&gt;
&lt;br /&gt;
    mkdir -p $HOME/dev/python/ops&lt;br /&gt;
    python3 -m venv $HOME/dev/python/ops&lt;br /&gt;
    source $HOME/dev/python/ops/bin/activate&lt;br /&gt;
    pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
==== Datacube ====&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in the ops group, you&#039;ll need sometimes to deploy from branches. As our deployment server Complector doesn&#039;t have PHP installed (so no arc), you need to exchange branches through our datacube.&lt;br /&gt;
&lt;br /&gt;
On WindRiver:&lt;br /&gt;
&lt;br /&gt;
     git remote add datacube /datacube/git/operations.git&lt;br /&gt;
&lt;br /&gt;
Anywhere else:&lt;br /&gt;
&lt;br /&gt;
     git remote add datacube ssh://windriver.nasqueron.org/datacube/git/operations.git&lt;br /&gt;
&lt;br /&gt;
If you aren&#039;t in the ops groups, and have access to our devserver, you&#039;ll still be able to clone or pull from that directory, but not to write there (ie push branches).&lt;br /&gt;
&lt;br /&gt;
=== Local computer setup ===&lt;br /&gt;
&lt;br /&gt;
This section cover topics NOT needed on our development servers.&lt;br /&gt;
&lt;br /&gt;
==== Arcanist ====&lt;br /&gt;
&lt;br /&gt;
To use arc with the operations repository, our collection of patches is needed.&lt;br /&gt;
&lt;br /&gt;
If arcanist isn&#039;t installed through Git repository, best is to do like on devserver role:&lt;br /&gt;
&lt;br /&gt;
    mkdir /opt/phabricator &amp;amp;&amp;amp; cd /opt/phabricator&lt;br /&gt;
    git clone https://github.com/nasqueron/arcanist.git&lt;br /&gt;
    (cd arcanist &amp;amp;&amp;amp; git checkout production)&lt;br /&gt;
    ln -s /opt/phabricator/arcanist/bin/arc /usr/local/bin/&lt;br /&gt;
    git clone https://devcentral.nasqueron.org/source/shellcheck-linter.git&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve already cloned Arcanist repository, switch to our branch production:&lt;br /&gt;
&lt;br /&gt;
    git remote add nasqueron git@github.com:nasqueron/arcanist.git&lt;br /&gt;
    git fetch --all&lt;br /&gt;
    git checkout production&lt;br /&gt;
&lt;br /&gt;
As of August 2024, there is no plan to make that repository available on DevCentral.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need shellcheck library-linter library, normally at the same level than your arcanist repository.&lt;br /&gt;
&lt;br /&gt;
==== IDE configuration ====&lt;br /&gt;
[[File:PyCharm-TemplateLanguages.png|thumb|right|Screenshot of correctly configured template languages]]&lt;br /&gt;
The states .sls file are Jinja2 templates producing YAML files, or &amp;quot;jinja2+yaml&amp;quot;. If this case can&#039;t be handled by your IDE, it works best to use YAML syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
If you use PyCharm or IntelliJ IDEA Ultimate, you can configure this scheme:&lt;br /&gt;
&lt;br /&gt;
* Allow YAML files to be Jinja2 templates&lt;br /&gt;
** Go to Settings &amp;gt; Languages &amp;amp; Frameworks &amp;gt; Template Languages&lt;br /&gt;
** Select Jinja2 as template language&lt;br /&gt;
** Add YAML in the list&lt;br /&gt;
* Open SLS as YAML&lt;br /&gt;
&lt;br /&gt;
== Linting ==&lt;br /&gt;
&lt;br /&gt;
=== pre-commit ===&lt;br /&gt;
You can use &#039;&#039;&#039;pre-commit&#039;&#039;&#039; you can install with &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; to get a hook running Python code to lint the repository before a commit.&lt;br /&gt;
&lt;br /&gt;
Beware if you use &amp;lt;code&amp;gt;arc diff&amp;lt;/code&amp;gt; without a commit first: your message will be lost if pre-commit raises an error, always use &amp;lt;code&amp;gt;git commit&amp;lt;/code&amp;gt; first.&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, there is an issue to build with clang 16+ the ruamel yaml clib library. You can build the FreeBSD port devel/py-ruamel.yaml.clib and copy the .whl to a stable path, then install it in your virtual environment.&lt;br /&gt;
&lt;br /&gt;
On WindRiver, the .whl is available in /opt/python/py311, so you can:&lt;br /&gt;
&lt;br /&gt;
    $ python3 -m venv /path/to/your/virtualenv&lt;br /&gt;
    $ source /path/to/your/virtualenv/bin/activate&lt;br /&gt;
    $ pip install /opt/python/py311/ruamel.yaml.clib-0.2.8-cp311-cp311-freebsd_14_0_release_p3_amd64.whl&lt;br /&gt;
    $ pip install pre-commit&lt;br /&gt;
    $ make&lt;br /&gt;
    pre-commit install&lt;br /&gt;
    pre-commit installed at .git/hooks/pre-commit&lt;br /&gt;
    $ rehash&lt;br /&gt;
    $ pre-commit&lt;br /&gt;
&lt;br /&gt;
== Refactoring ==&lt;br /&gt;
&lt;br /&gt;
=== Rename a lot of files ===&lt;br /&gt;
&lt;br /&gt;
To move a directory and rename the &#039;&#039;Source file&#039;&#039; headers:&lt;br /&gt;
&lt;br /&gt;
    git mv roles/webserver-legacy/nginx/files roles/webserver-alkane/nginx/&lt;br /&gt;
    cd roles/webserver-alkane/nginx/&lt;br /&gt;
    find . -type f -name &#039;*.conf&#039; | xargs gsed -i s/webserver-legacy/webserver-alkane/g&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[/FAQ]] - Frequently asked questions about the Operations repository&lt;br /&gt;
* [[How to contribute code]]&lt;br /&gt;
* [[Devserver reference]]&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2351</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2351"/>
		<updated>2026-02-18T13:27:48Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan start&#039;&#039;&#039; --&amp;gt; Starts strongswan service&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswwan stop&#039;&#039;&#039; --&amp;gt; Stops strongswan service&lt;br /&gt;
 - &#039;&#039;&#039;sudo service strongswan status&#039;&#039;&#039; --&amp;gt; Shows strongswan service &lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; Loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; Initiates a connection on a specific child SA&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; Closes an IKE SA and all of its children&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; Lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; Lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; Captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2350</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2350"/>
		<updated>2026-02-18T13:23:53Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --load-all&#039;&#039;&#039;--&amp;gt; loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --initiate --child &amp;quot;child name&amp;quot;&#039;&#039;&#039; --&amp;gt; initiates a connection on a specific child SA&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot;&#039;&#039;&#039; --&amp;gt; closes an IKE SA and all of its children&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-conns&#039;&#039;&#039; --&amp;gt; lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type&lt;br /&gt;
 - &#039;&#039;&#039;sudo swanctl --list-sas&#039;&#039;&#039; --&amp;gt; lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 47&#039;&#039;&#039; --&amp;gt; captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
 - &#039;&#039;&#039;sudo tcpdump -i vmx0 proto 50&#039;&#039;&#039; --&amp;gt; captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2349</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2349"/>
		<updated>2026-02-18T13:22:02Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
&lt;br /&gt;
 - sudo swanctl --load-all.--&amp;gt; loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
 - sudo swanctl --initiate --child &amp;quot;child name&amp;quot; --&amp;gt; initiates a connection on a specific child SA&lt;br /&gt;
 - sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot; --&amp;gt; closes an IKE SA and all of its children&lt;br /&gt;
 - sudo swanctl --list-conns --&amp;gt; lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type&lt;br /&gt;
 - sudo swanctl --list-sas --&amp;gt; lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - sudo tcpdump -i vmx0 proto 47 --&amp;gt; captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
 - sudo tcpdump -i vmx0 proto 50 --&amp;gt; captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2348</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2348"/>
		<updated>2026-02-18T13:21:39Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
&lt;br /&gt;
 - sudo swanctl --load-all. --&amp;gt; loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
 - sudo swanctl --initiate --child &amp;quot;child name&amp;quot; --&amp;gt; initiates a connection on a specific child SA&lt;br /&gt;
 - sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot; --&amp;gt; closes an IKE SA and all of its children&lt;br /&gt;
 - sudo swanctl --list-conns --&amp;gt; lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type&lt;br /&gt;
 - sudo swanctl --list-sas --&amp;gt; lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
 - sudo tcpdump -i vmx0 proto 47 --&amp;gt; captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
 - sudo tcpdump -i vmx0 proto 50 --&amp;gt; captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2347</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2347"/>
		<updated>2026-02-18T13:21:00Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
&lt;br /&gt;
- sudo swanctl --load-all. --&amp;gt; loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
- sudo swanctl --initiate --child &amp;quot;child name&amp;quot; --&amp;gt; initiates a connection on a specific child SA&lt;br /&gt;
- sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot; --&amp;gt; closes an IKE SA and all of its children&lt;br /&gt;
- sudo swanctl --list-conns --&amp;gt; lists all configured connections in swanctl.conf, displays connection name, type and -local addresses and remote, children and authentification type&lt;br /&gt;
- sudo swanctl --list-sas --&amp;gt; lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
- sudo tcpdump -i vmx0 proto 47 --&amp;gt; captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
- sudo tcpdump -i vmx0 proto 50 --&amp;gt; captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2346</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2346"/>
		<updated>2026-02-18T13:20:43Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Troubleshoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
- sudo swanctl --load-all --&amp;gt; loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
- sudo swanctl --initiate --child &amp;quot;child name&amp;quot; --&amp;gt; initiates a connection on a specific child SA&lt;br /&gt;
- sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot; --&amp;gt; closes an IKE SA and all of its children&lt;br /&gt;
- sudo swanctl --list-conns --&amp;gt; lists all configured connections in swanctl.conf, displays connection name, type and -local addresses and remote, children and authentification type&lt;br /&gt;
- sudo swanctl --list-sas --&amp;gt; lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
- sudo tcpdump -i vmx0 proto 47 --&amp;gt; captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
- sudo tcpdump -i vmx0 proto 50 --&amp;gt; captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2345</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=IPsec&amp;diff=2345"/>
		<updated>2026-02-18T13:16:25Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
== Troubleshoot ==&lt;br /&gt;
sudo swanctl --load-all --&amp;gt; loads the complete strongswan configuration from swanctl.conf&lt;br /&gt;
sudo swanctl --initiate --child &amp;quot;child name&amp;quot; --&amp;gt; initiates a connection on a specific child SA&lt;br /&gt;
sudo swanctl --terminate --ike &amp;quot;connection name&amp;quot; --&amp;gt; closes an IKE SA and all of its children&lt;br /&gt;
sudo swanctl --list-conns --&amp;gt; lists all configured connections in swanctl.conf, displays connection name, type and local addresses and remote, children and authentification type&lt;br /&gt;
sudo swanctl --list-sas --&amp;gt; lists SA security associations actives and shows what&#039;s established in the tunnel.&lt;br /&gt;
sudo tcpdump -i vmx0 proto 47 --&amp;gt; captures traffic on vmx0 interface which uses protocol 47, which means GRE(generic routing encapsulation)&lt;br /&gt;
sudo tcpdump -i vmx0 proto 50 --&amp;gt; captures traffic on vmx0 interface which uses protocol 50, which means ESP(encapsulation security payload)&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=Main_Page&amp;diff=2315</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=Main_Page&amp;diff=2315"/>
		<updated>2026-02-17T11:25:00Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{DISPLAYTITLE:&amp;lt;span style=&amp;quot;color:white;width:0;font-size:0;&amp;quot;&amp;gt;{{FULLPAGENAME}}&amp;lt;/span&amp;gt;}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-bottom: 2em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 3.75em; margin-bottom: 0.25em;&amp;quot; class=&amp;quot;color-magnetic-three&amp;quot;&amp;gt;Agora&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 3em;&amp;quot; class=&amp;quot;color-magnetic-two&amp;quot;&amp;gt;The Nasqueron wiki &amp;amp; collaboration space.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;block-col block-col-half&amp;quot;&amp;gt;&lt;br /&gt;
== Welcome to Nasqueron ==&lt;br /&gt;
&lt;br /&gt;
🏴 Nasqueron is a budding community of creative people, writers, developers and thinkers.&lt;br /&gt;
&lt;br /&gt;
🌱👨🏽‍🤝‍👨🏼🧑🏾‍🤝‍🧑🏻🙋🏾‍♂️👩🏾 You&#039;ll find here like-minded people to connect to, hang out, and build projects.&lt;br /&gt;
&lt;br /&gt;
📃 We focus on free culture, ethics and to be a positive change. Our software is open source our datasources and content are licensed under CC-BY-SA or CC-BY license. We share values like respect, justice and equity.&lt;br /&gt;
&lt;br /&gt;
❤️ We like experiments, originality and to discover new things.&lt;br /&gt;
&lt;br /&gt;
👽 We are Nasqueron.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;block-col block-col-half&amp;quot;&amp;gt;&lt;br /&gt;
== Agora ==&lt;br /&gt;
&#039;&#039;&#039;Agora&#039;&#039;&#039; is the Nasqueron wiki.&lt;br /&gt;
&lt;br /&gt;
Like an Agora, it&#039;s intended to be a public open space used for assemblies, with a focus on collaboration.&lt;br /&gt;
&lt;br /&gt;
📙📚✏️ As this is a wiki, feel free to edit it.&amp;lt;br&amp;gt;&lt;br /&gt;
You can [https://forms.nasqueron.org/nasqueron-requests/agora-account/new request an account here] or  [irc://libera.chat/wolfplex ask on IRC].&lt;br /&gt;
&lt;br /&gt;
You&#039;ll mostly find here:&lt;br /&gt;
&lt;br /&gt;
* development and contribution information&lt;br /&gt;
* infrastructure / servers / operations documentation&lt;br /&gt;
* project ideas&lt;br /&gt;
* various notes&lt;br /&gt;
* the content you deem relevant&lt;br /&gt;
&lt;br /&gt;
You can read this main page to explore content, [[Special:Search|do a search]] or [[:Category:Nasqueron root category|browse categories]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-bottom: 2em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 3.75em; margin-bottom: 0.25em;&amp;quot; class=&amp;quot;color-magnetic-three&amp;quot;&amp;gt;Contribute&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;block-col block-col-half&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Free culture &amp;amp; open source ==&lt;br /&gt;
;Guides&lt;br /&gt;
* [[How to contribute code]]&lt;br /&gt;
* [[Code conventions]]&lt;br /&gt;
* [[Dev policies]]&lt;br /&gt;
* [[Devserver reference]]&lt;br /&gt;
* [[AI content]]&lt;br /&gt;
&lt;br /&gt;
;DevCentral&lt;br /&gt;
* [https://devcentral.nasqueron.org/tag/good-first-issue/ Good first issues]: you can start here if you would like a nice landing to our projects&lt;br /&gt;
* [https://devcentral.nasqueron.org/home/menu/view/174/ Contribute to projects]&lt;br /&gt;
* [https://devcentral.nasqueron.org/w/new-repo/ Create a new repository]&lt;br /&gt;
&lt;br /&gt;
;Programs &amp;amp; resources&lt;br /&gt;
* [[Monday office hours]]&lt;br /&gt;
* [[Dev zone/Skills sharing]]&lt;br /&gt;
* [https://join.nasqueron.org Internship &amp;amp; Mentoring programs]&lt;br /&gt;
* [[Internship guide]]&lt;br /&gt;
* [[Nasqueron Labs]], workshops to explore new ideas&lt;br /&gt;
&lt;br /&gt;
;Recipes&lt;br /&gt;
* [[Static sites]]&lt;br /&gt;
* [[Dev zone/Vault|Vault]]&lt;br /&gt;
&lt;br /&gt;
;Dev notes for specific projects&lt;br /&gt;
* [[Limiting Factor]]&lt;br /&gt;
* [[Dev zone/Reports|Nasqueron Reports]]&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
* [[Planet]]&lt;br /&gt;
* [[Tools.nasqueron.org]]&lt;br /&gt;
* [[Social media accounts]]&lt;br /&gt;
* [[MediaWiki SaaS]]&lt;br /&gt;
* [[XMPP|Openfire instance]] (XMPP)&lt;br /&gt;
* [[Devserver reference|Development servers]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;block-col block-col-half&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
* [[Operations grimoire]]&lt;br /&gt;
* [[Servers]] map&lt;br /&gt;
&lt;br /&gt;
[[File:Nasqueron Operations Grimoire.jpg|thumb|right|The [[Operations grimoire‎|Nasqueron operations grimoire]] or &#039;&#039;&#039;NOG&#039;&#039;&#039;, the reference to deal with anything on the servers]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nasqueron? ==&lt;br /&gt;
* [[Poem]]&lt;br /&gt;
* To connect with the community, [[Zed]]&lt;br /&gt;
* To declare yourself a Nasqueron inhabitant, [[We are Nasqueron]]&lt;br /&gt;
&lt;br /&gt;
== Projects ==&lt;br /&gt;
* [[Notifications center]]&lt;br /&gt;
* [[Nasqueron Datasources]]&lt;br /&gt;
* [[API]]&lt;br /&gt;
* [[ServPulse]]&lt;br /&gt;
&lt;br /&gt;
; Current network work&lt;br /&gt;
* [[IPsec]]&lt;br /&gt;
* [[Protocol CARP]]&lt;br /&gt;
* [[Creation GRE tunnel]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; References&lt;br /&gt;
* [[Registries]] - OID, tags, XML schemas&lt;br /&gt;
&lt;br /&gt;
; Consolidated resources&lt;br /&gt;
* [https://devcentral.nasqueron.org/project/ All projects on DevCentral]&lt;br /&gt;
* [[Projects index]]&lt;br /&gt;
&lt;br /&gt;
; Draft projects ideas&lt;br /&gt;
* [[Tasacora]]&lt;br /&gt;
* [[Fastes consulaires]]&lt;br /&gt;
* [[Utopia Book Reader]]&lt;br /&gt;
&lt;br /&gt;
== Pads ==&lt;br /&gt;
* [[Dereckson pad]]&lt;br /&gt;
* [[Design]]&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
* [[Hackathon geodata]]&lt;br /&gt;
&lt;br /&gt;
== We participe to ==&lt;br /&gt;
* [[TrustSpace]]&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2310</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2310"/>
		<updated>2026-02-17T11:06:27Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* IPsec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
* IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause of the cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
* When creating a GRE tunnel between two machines and this one doesn&#039;t respond or cuts connectiong, proceed to destory the tunnel on both sides to allow traffic back.&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2309</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2309"/>
		<updated>2026-02-17T11:03:59Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* IPsec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IPsec has two modes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause of the cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
* When creating a GRE tunnel between two machines and this one doesn&#039;t respond or cuts connectiong, proceed to destory the tunnel on both sides to allow traffic back.&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2308</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2308"/>
		<updated>2026-02-17T10:58:24Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= IPsec =&lt;br /&gt;
IPsec is a set of protocols used for security at the network layer of the OSI model.&lt;br /&gt;
&lt;br /&gt;
IP = Internet Protocol&lt;br /&gt;
sec = secure&lt;br /&gt;
&lt;br /&gt;
Its purpose is to secure communications between two points in a network. This is done by adding encryption and authentication.&lt;br /&gt;
&lt;br /&gt;
When machines communicate over a public network, the communication is usually transmitted in plain text. This is dangerous if sensitive information is being sent. IPsec solves this problem by protecting data during transmission using IKE (Internet Key Exchange).&lt;br /&gt;
&lt;br /&gt;
* Phase 1: The two sites identify each other and negotiate parameters for the authentication and encryption methods to be used.&lt;br /&gt;
* Phase 2: IPsec creates a tunnel to protect the data (virtual tunnel).&lt;br /&gt;
&lt;br /&gt;
Data transport is handled by the ESP (Encapsulation Security Protocol). It provides authentication, integrity, and encryption.&lt;br /&gt;
&lt;br /&gt;
To use IPsec, the sender and the receiver must share a public or private key. This key is used to encrypt the data before sending and decrypt it upon reception. This ensures that the data remains intact during transmission.&lt;br /&gt;
&lt;br /&gt;
IPsec has two modes:&lt;br /&gt;
&lt;br /&gt;
* Tunnel mode&lt;br /&gt;
* Transport mode&lt;br /&gt;
&lt;br /&gt;
Data transmitted through IPsec over a network is sent in multiple “packets.” These packets contain:&lt;br /&gt;
&lt;br /&gt;
IP HEADER | TCP HEADER | PAYLOAD&lt;br /&gt;
Source and destination IP address | Port and sequence number | Contains the data to be transmitted&lt;br /&gt;
&lt;br /&gt;
By default, the packet does not include any security.&lt;br /&gt;
&lt;br /&gt;
When using transport mode, an ESP header, ESP trailer, and ESP authentication are added. The TCP header, payload, and ESP trailer are encrypted.&lt;br /&gt;
&lt;br /&gt;
When using tunnel mode, a “NEW IP HEADER” is added, and the original IP header is encrypted along with the TCP header, payload, and ESP trailer.&lt;br /&gt;
[[File:Ipsec-transport-mode-ip-packet.png|ESP transport mode]]&lt;br /&gt;
&lt;br /&gt;
==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause of the cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
* When creating a GRE tunnel between two machines and this one doesn&#039;t respond or cuts connectiong, proceed to destory the tunnel on both sides to allow traffic back.&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=File:Ipsec-transport-mode-ip-packet.png&amp;diff=2307</id>
		<title>File:Ipsec-transport-mode-ip-packet.png</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=File:Ipsec-transport-mode-ip-packet.png&amp;diff=2307"/>
		<updated>2026-02-17T10:53:41Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2296</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2296"/>
		<updated>2026-02-16T12:45:03Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Incident */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause of the cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
* When creating a GRE tunnel between two machines and this one doesn&#039;t respond or cuts connectiong, proceed to destory the tunnel on both sides to allow traffic back.&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2294</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2294"/>
		<updated>2026-02-16T11:12:11Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Incident */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause of the cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2293</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2293"/>
		<updated>2026-02-16T11:11:48Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Incident */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
*Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause of the cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2292</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2292"/>
		<updated>2026-02-16T11:11:18Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Incident */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
*Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&#039;&#039;&#039;gre0: if_output recursively called too many times&#039;&#039;&#039; --&amp;gt; this was the cause to cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2291</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2291"/>
		<updated>2026-02-16T11:10:01Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Incident */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
*Technical analysis:&lt;br /&gt;
&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&amp;quot;gre0: if_output recursively called too many times&amp;quot; --&amp;gt; this was the cause to cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2290</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2290"/>
		<updated>2026-02-16T11:09:33Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Incident */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Technical analysis:&lt;br /&gt;
dmesg showed the following error:&lt;br /&gt;
&amp;quot;gre0: if_output recursively called too many times&amp;quot; --&amp;gt; this was the cause to cut connections between router-001 and windriver. &lt;br /&gt;
this error comes from the FreeBSD kernel file sys/net/if.c, in the function if_tunnel_check_nesting().&lt;br /&gt;
&lt;br /&gt;
Recommandations :&lt;br /&gt;
*avoid stacking GRE tunnels on top of existing ones, to avoid overcomplicating the configuration.&lt;br /&gt;
*test changes while having access to KVM.&lt;br /&gt;
*if restart is needed, always restart Netif along with the routing table with one command using &amp;quot;&amp;amp;&amp;amp;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2286</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2286"/>
		<updated>2026-02-16T11:02:15Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
= Incident =&lt;br /&gt;
&lt;br /&gt;
While experimenting with creating a GRE tunnel between two router-001 and windirver already connected via GRE, the goal was to set up an additional tunnel for redundancy testing.&lt;br /&gt;
&lt;br /&gt;
What happened:&lt;br /&gt;
&lt;br /&gt;
* Creating a GRE tunnel on top of an existing GRE tunnel caused a cut connection between router-001 and windriver.&lt;br /&gt;
* Direct access to the router was unavailable, and the network interface (netif) was restarted without restoring the routing table.&lt;br /&gt;
* As a result, the server did not restart properly, and network services were unavailable.&lt;br /&gt;
* Access via KVM was required to correct the routing table directly on the remote machine.&lt;br /&gt;
&lt;br /&gt;
Actions taken:&lt;br /&gt;
&lt;br /&gt;
* Accessed the server via KVM to restore the routing table.&lt;br /&gt;
* Performed a controlled network interface restart.&lt;br /&gt;
* Established a rule: do not create GRE-over-GRE in the current infrastructure to avoid recursion and outages, if mandatory, always have KVM prepared and the VM itself to prevent any long server outage.&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2282</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2282"/>
		<updated>2026-02-16T10:52:24Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ===&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2281</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2281"/>
		<updated>2026-02-16T10:52:09Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
=== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=File:Network_simplified_topology_-_2023-05-08.png&amp;diff=2279</id>
		<title>File:Network simplified topology - 2023-05-08.png</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=File:Network_simplified_topology_-_2023-05-08.png&amp;diff=2279"/>
		<updated>2026-02-15T21:38:47Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Edit this schema on Mermaid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mermaid schema of the current Drake network for Nasqueron servers&lt;br /&gt;
&lt;br /&gt;
== Edit this schema on Mermaid ==&lt;br /&gt;
&lt;br /&gt;
The schema has been generated with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
graph TD&lt;br /&gt;
 linkStyle default interpolate basis&lt;br /&gt;
 router{&amp;lt;center&amp;gt;router-001&amp;lt;br&amp;gt;51.255.124.8&amp;lt;br&amp;gt;172.27.27.1&amp;lt;/center&amp;gt;}&lt;br /&gt;
 subgraph IntraNought - VM on hyper-001&lt;br /&gt;
  router---complector[&amp;lt;center&amp;gt;complector&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.7&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---db-A-001[&amp;lt;center&amp;gt;db-A-001&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.8&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---db-B-001[&amp;lt;center&amp;gt;db-B-001&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.9&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---docker-002[&amp;lt;center&amp;gt;docker-002&amp;lt;br&amp;gt;51.255.124.9&amp;lt;br&amp;gt;172.27.27.5&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---dwellers[&amp;lt;center&amp;gt;dwellers&amp;lt;br&amp;gt;51.255.124.11&amp;lt;br&amp;gt;172.27.27.4&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---web-001[&amp;lt;center&amp;gt;web-001&amp;lt;br&amp;gt;51.255.124.10&amp;lt;br&amp;gt;172.27.27.10&amp;lt;/center&amp;gt;]&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 subgraph Baremetal servers &lt;br /&gt;
  router-.-|GRE|ysul[&amp;lt;center&amp;gt;Ysul&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.35&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router-.-|GRE|windriver[&amp;lt;center&amp;gt;WindRiver&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.33&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router-.-|GRE|cloudhugger[&amp;lt;center&amp;gt;CloudHugger&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.28&amp;lt;/center&amp;gt;]&lt;br /&gt;
 end &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=File:Network_simplified_topology_-_2023-05-08.png&amp;diff=2278</id>
		<title>File:Network simplified topology - 2023-05-08.png</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=File:Network_simplified_topology_-_2023-05-08.png&amp;diff=2278"/>
		<updated>2026-02-15T21:38:24Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Edit this schema on Mermaid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mermaid schema of the current Drake network for Nasqueron servers&lt;br /&gt;
&lt;br /&gt;
== Edit this schema on Mermaid ==&lt;br /&gt;
&lt;br /&gt;
The schema has been generated with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
graph TD&lt;br /&gt;
 linkStyle default interpolate basis&lt;br /&gt;
 router{&amp;lt;center&amp;gt;router-001&amp;lt;br&amp;gt;51.255.124.8&amp;lt;br&amp;gt;172.27.27.1&amp;lt;/center&amp;gt;}&lt;br /&gt;
 router{&amp;lt;center&amp;gt;router-002&amp;lt;br&amp;gt;---&amp;lt;br&amp;gt;172.27.27.11&amp;lt;/center&amp;gt;}&lt;br /&gt;
 router{&amp;lt;center&amp;gt;router-003&amp;lt;br&amp;gt;---&amp;lt;br&amp;gt;172.27.27.12&amp;lt;/center&amp;gt;}&lt;br /&gt;
 subgraph IntraNought - VM on hyper-001&lt;br /&gt;
  router---complector[&amp;lt;center&amp;gt;complector&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.7&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---db-A-001[&amp;lt;center&amp;gt;db-A-001&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.8&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---db-B-001[&amp;lt;center&amp;gt;db-B-001&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.9&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---docker-002[&amp;lt;center&amp;gt;docker-002&amp;lt;br&amp;gt;51.255.124.9&amp;lt;br&amp;gt;172.27.27.5&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---dwellers[&amp;lt;center&amp;gt;dwellers&amp;lt;br&amp;gt;51.255.124.11&amp;lt;br&amp;gt;172.27.27.4&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router---web-001[&amp;lt;center&amp;gt;web-001&amp;lt;br&amp;gt;51.255.124.10&amp;lt;br&amp;gt;172.27.27.10&amp;lt;/center&amp;gt;]&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 subgraph Baremetal servers &lt;br /&gt;
  router-.-|GRE|ysul[&amp;lt;center&amp;gt;Ysul&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.35&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router-.-|GRE|windriver[&amp;lt;center&amp;gt;WindRiver&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.33&amp;lt;/center&amp;gt;]&lt;br /&gt;
  router-.-|GRE|cloudhugger[&amp;lt;center&amp;gt;CloudHugger&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;172.27.27.28&amp;lt;/center&amp;gt;]&lt;br /&gt;
 end &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2276</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2276"/>
		<updated>2026-02-15T21:12:03Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
* How stable is rekeying ? Does rekeying interrupt GRE traffic ? &lt;br /&gt;
* Any known issues with multicast over GRE ?&lt;br /&gt;
* How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2255</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2255"/>
		<updated>2026-02-13T16:54:38Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
How stable is rekeying ?&lt;br /&gt;
Does rekeying interrupt GRE traffic ? &lt;br /&gt;
Any known issues with multicast over GRE ?&lt;br /&gt;
How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2254</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2254"/>
		<updated>2026-02-13T16:54:00Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
&lt;br /&gt;
=== IPsec solution - key decision questions ===&lt;br /&gt;
&lt;br /&gt;
# Protocol &amp;amp; Cryptography &lt;br /&gt;
Should we use IKEv ? if yes Which IKe version to use ? &lt;br /&gt;
Which encryption algorithms must be supported ? &lt;br /&gt;
Which authentification will we use ? &lt;br /&gt;
* PSK? &lt;br /&gt;
* PKI?&lt;br /&gt;
* EAK?&lt;br /&gt;
Do we require interoperability ?&lt;br /&gt;
* Cisco devices ?&lt;br /&gt;
* CLoud providers ?&lt;br /&gt;
&lt;br /&gt;
# Architechture &lt;br /&gt;
* Can we avoid GRE over GRE in the long term ?&lt;br /&gt;
* How many tunnels ?&lt;br /&gt;
&lt;br /&gt;
# Stability&lt;br /&gt;
How stable is rekeying ?&lt;br /&gt;
Does rekeying interrupt GRE traffic ? &lt;br /&gt;
Any known issues with multicast over GRE ?&lt;br /&gt;
How will IPsec impact CARP ?&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2253</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2253"/>
		<updated>2026-02-13T16:17:21Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming]]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2252</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2252"/>
		<updated>2026-02-13T15:51:06Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
[[File:ProjetTunnelGRE.png|thumb|Brainstorming&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=File:ProjetTunnelGRE.png&amp;diff=2251</id>
		<title>File:ProjetTunnelGRE.png</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=File:ProjetTunnelGRE.png&amp;diff=2251"/>
		<updated>2026-02-13T15:27:22Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2250</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2250"/>
		<updated>2026-02-13T10:28:19Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
The GRE tunnels over IPsec are to be created and configured on FreeBSD 15 OS.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2249</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2249"/>
		<updated>2026-02-13T10:24:27Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 official repo]&lt;br /&gt;
&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
Operational risk:&lt;br /&gt;
&lt;br /&gt;
due to lack of maintenance Racoon2 presents:&lt;br /&gt;
* Security patch uncertainty&lt;br /&gt;
* Limited future protocol support&lt;br /&gt;
* Risk for long term deployments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://libreswan.org/ Libreswan official website]&lt;br /&gt;
*Forked from the original FreeS/WAN project.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* stable and conservative deployments&lt;br /&gt;
* compatibility with older systems&lt;br /&gt;
* Administrators familiar with FreeS/WAN style configuration&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*[https://strongswan.org/ Strongswan official website]&lt;br /&gt;
*Originally derived from FreeS/WAN but largely reimplemented.&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configuration.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
Suitable for :&lt;br /&gt;
&lt;br /&gt;
* Long term infrastructure.&lt;br /&gt;
* Modern cryptographic standards.&lt;br /&gt;
* FUll support of multiple protocols : IKev2, EAP, PKI, MOBIKE.&lt;br /&gt;
* Large or scalable deployments.&lt;br /&gt;
* Mixed FreeBSD/Linux environements.&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ IPsec Solutions Overview&lt;br /&gt;
! Criteria&lt;br /&gt;
! Racoon2&lt;br /&gt;
! Libreswan&lt;br /&gt;
! StrongSwan&lt;br /&gt;
|-&lt;br /&gt;
| Project status&lt;br /&gt;
| ❌ Not maintained&lt;br /&gt;
| ✅ Active&lt;br /&gt;
| ✅ Active&lt;br /&gt;
|-&lt;br /&gt;
| IKEv2 support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Full&lt;br /&gt;
| ✅ Full&lt;br /&gt;
|-&lt;br /&gt;
| NAT-T support&lt;br /&gt;
| ⚠ Limited&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
| ✅ Yes&lt;br /&gt;
|-&lt;br /&gt;
| FreeBSD integration&lt;br /&gt;
| ✅ Native&lt;br /&gt;
| ⚠ Partial&lt;br /&gt;
| ✅ Native&lt;br /&gt;
|-&lt;br /&gt;
| Linux integration&lt;br /&gt;
| ⚠ PF_KEY&lt;br /&gt;
| ✅ XFRM&lt;br /&gt;
| ✅ XFRM/VTI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Technical consideration for GRE over IPsec ==&lt;br /&gt;
When securing a GRE tunnel, the following features are needed:&lt;br /&gt;
&lt;br /&gt;
IKEv2 stability:&lt;br /&gt;
Required for:&lt;br /&gt;
* Reliable rekying &lt;br /&gt;
* Better NAT handling&lt;br /&gt;
* Long term compatibility&lt;br /&gt;
&lt;br /&gt;
Route-based VPN support&lt;br /&gt;
Important when:&lt;br /&gt;
* Using GRE with dynamic routing (BGP/OSPF).&lt;br /&gt;
* Managing multiple tunnels.&lt;br /&gt;
* Automating  configuration.&lt;br /&gt;
&lt;br /&gt;
NAT traversal (NAT-T)&lt;br /&gt;
* Needed if peers are behind NAT.&lt;br /&gt;
&lt;br /&gt;
Rekeying behavior:&lt;br /&gt;
Implementation must:&lt;br /&gt;
* Avoid traffic interruption&lt;br /&gt;
* Handle DPD correctly&lt;br /&gt;
* Maintain tunnel stability&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2235</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2235"/>
		<updated>2026-02-09T14:36:27Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: /* Official documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configure than racoon2 and libreswan.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Libreswan and Strongwan are both based on FreeS/WAN project, Libreswan is closer to it&#039;s origin whereas Strongwan is a full reimplementation with a focus on IKEv2 and strong authentification&lt;br /&gt;
&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ StronSgwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ LibreSwan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2234</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2234"/>
		<updated>2026-02-09T14:26:24Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configure than racoon2 and libreswan.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most complete solution with good documentation and community supports, more protocols than other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Libreswan and Strongwan are both based on FreeS/WAN project, Libreswan is closer to it&#039;s origin whereas Strongwan is a full reimplementation with a focus on IKEv2 and strong authentification&lt;br /&gt;
&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ Strongwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ Libreswan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
	<entry>
		<id>https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2233</id>
		<title>GRE tunnel</title>
		<link rel="alternate" type="text/html" href="https://agora.nasqueron.org/index.php?title=GRE_tunnel&amp;diff=2233"/>
		<updated>2026-02-09T14:25:09Z</updated>

		<summary type="html">&lt;p&gt;Duranzed: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IPsec solutions ==&lt;br /&gt;
&lt;br /&gt;
===IPsec solutions: Racoon2, Libreswan and Strongswan.===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Racoon2:&#039;&#039;&#039;&lt;br /&gt;
;Advantages :&lt;br /&gt;
* Lightweight and easy to use with minimal CPU/RAM usage, compared to other solutions.&lt;br /&gt;
* Native on FreeBSD.&lt;br /&gt;
* Simple configuration for point-to-point.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Project not actively maintained, last update was in 2020.&lt;br /&gt;
* Limited support for modern features (IKEv2, NAT traversal), configuration is possible but may be more complex than others solutions.&lt;br /&gt;
* Apple clients can have difficulty connecting because of the limitations of pfkeyv2 interface to the linux kernel that racoon2 uses.&lt;br /&gt;
* Harder to configure for complex setups.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Libreswan:&#039;&#039;&#039;&lt;br /&gt;
;Advantages:&lt;br /&gt;
* Actively maintained and stable on older hardware&lt;br /&gt;
* IRC community.&lt;br /&gt;
* Support NAT traversal, IKEv2 and enterprise VPN.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
* Less native support on FreeBSD.&lt;br /&gt;
* heavier on ressource usage.&lt;br /&gt;
* might need kernel patches.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Strongswan:&#039;&#039;&#039;&lt;br /&gt;
;Advantages:&lt;br /&gt;
&lt;br /&gt;
* Actively maintained with an active community on IRC.&lt;br /&gt;
* Full support for IKEv2, EAP, PKI and Mobike&lt;br /&gt;
* Well documented with community support.&lt;br /&gt;
* Native of FreeBSD and Linux.&lt;br /&gt;
&lt;br /&gt;
;Disadvantages:&lt;br /&gt;
&lt;br /&gt;
* More complex to configure than racoon2 and libreswan.&lt;br /&gt;
* Slightly heavier on ressources&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Summary:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Racoon2&#039;&#039;&#039;: easier to configure for basic setups but it is a deprecated project&lt;br /&gt;
*&#039;&#039;&#039;Libreswan&#039;&#039;&#039;: stable and maintained but less native on FreeBSD, might need kernel patches.&lt;br /&gt;
*&#039;&#039;&#039;Strongswan&#039;&#039;&#039;: Most modern solution with good documentation and community supports more protocols than the other solutions but might be more complex to configure and is heavier than other solutions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Libreswan and Strongwan are both based on FreeS/WAN project, Libreswan is closer to it&#039;s origin whereas Strongwan is a full reimplementation with a focus on IKEv2 and strong authentification&lt;br /&gt;
&lt;br /&gt;
==== Official documentation ====&lt;br /&gt;
*[https://docs.strongswan.org/docs/latest/index.html/ Strongwan doc]&lt;br /&gt;
*[https://libreswan.org/man/ Libreswan doc]&lt;br /&gt;
*[https://github.com/zoulasc/racoon2/ Racoon2 doc]&lt;br /&gt;
&lt;br /&gt;
Linked to {{T|2202}}&lt;/div&gt;</summary>
		<author><name>Duranzed</name></author>
	</entry>
</feed>