Documentation Index
Fetch the complete documentation index at: https://mintlify.com/strongswan/strongswan/llms.txt
Use this file to discover all available pages before exploring further.
strongswan.conf configures the strongSwan daemon (charon) and its plugins. It uses a hierarchical key-value format with {} sections.
The distributed default strongswan.conf uses modular loading:
charon section
Thecharon section configures the IKE daemon.
Core settings
Use modular plugin loading controlled by per-plugin
.conf files in strongswan.d/charon/. When yes, the load keyword in the main config is ignored and each plugin’s own config file controls whether it is loaded.Number of worker threads for processing IKE messages and crypto operations. Increase on high-throughput systems.
Size of the hash table used to index IKE SAs.
Number of segments in the IKE SA hash table for locking granularity.
Network and routing
Install routes into the routing table for IPsec tunnel traffic selectors. Disable if you manage routes externally.
Install negotiated virtual IP addresses on the local interface. Disable if your OS or routing daemon manages virtual IPs.
Interface name on which to install virtual IP addresses. Defaults to the interface used for the IKE SA.
NAT keepalive interval in seconds. Sends UDP keepalive packets to maintain NAT mappings.
During MOBIKE path re-selection, prefer the path with the lowest route metric over the currently active path.
IKE SA management
Timeout in seconds to close IKE SAs that have not completed authentication. Protects against half-open SA exhaustion attacks.
Maximum number of simultaneously half-open IKE SAs. New connections are refused when the limit is reached.
Re-use existing IKE SAs when initiating additional CHILD SAs to the same remote address and identity, rather than creating a new IKE SA.
Interval in seconds between retries when connection initiation fails.
0 disables retry.Send the strongSwan vendor ID payload in IKE exchanges. Enables vendor-specific features but reveals the software identity.
Certificate and revocation
Cache downloaded CRLs to the local filesystem under
/etc/ipsec.d/crls/.Length of OCSP nonce values in bytes.
0 disables nonces.Apply strict X.509 certificate validation. Rejects certificates that do not conform strictly to RFC 5280.
Security
Permit IKEv1 Aggressive Mode with PSK authentication. Disabled by default because Aggressive Mode PSK is vulnerable to offline dictionary attacks. Only enable if peer compatibility requires it.
Distinguished Name matching mode for wildcard remote identity matching. Accepted values:
strict, reordered, relaxed.Logging configuration
Logging is configured inside thecharon section using filelog and syslog subsections.
Log levels
| Level | Meaning |
|---|---|
-1 | Absolute silence |
0 | Errors only |
1 | Informational (recommended for production) |
2 | Control-flow debug |
3 | Detailed debug |
4 | Full trace (very verbose) |
Log subsystems
Within a log target, each subsystem level can be set independently:| Key | Subsystem |
|---|---|
ike | IKE SA establishment and management |
chd | CHILD SA establishment |
net | IKE network I/O |
enc | Message encoding/decoding |
cfg | Configuration loading |
knl | Kernel interface (policies, SAs) |
esp | ESP processing |
mgr | IKE SA manager |
lib | libstrongswan |
default sets the level for all subsystems not explicitly listed in the same block.filelog options
Append to the log file. Set to
no to truncate the file on daemon start.Flush the log file after each line. Useful for real-time monitoring but reduces write performance.
strftime(3) format string for log timestamps. Example: "%b %e %T".Include the IKE SA name in each log line.
Plugin configuration
Plugins are configured in subsections undercharon.plugins. With load_modular = yes, each plugin also has a dedicated file in strongswan.d/charon/<plugin>.conf.
eap-radius
attr
Pushes configuration attributes (DNS, routes) to clients:dhcp
Obtains virtual IPs and attributes from a DHCP server:kernel-netlink (Linux)
Netfilter mark applied to IKE packets. Use
!<mark> to exclude marked packets from IPsec policies (useful to avoid routing loops).MTU set on the virtual IP interface.