Project

General

Profile

strongswan.conf Reference » History » Version 62

Andreas Steffen, 03.08.2010 10:38
added pki options

1 29 Andreas Steffen
h1. strongswan.conf
2 1 Martin Willi
3 1 Martin Willi
h2. Overview
4 1 Martin Willi
5 49 Andreas Steffen
While the [[IpsecConf|ipsec.conf]] configuration file is well suited to define IPsec related configuration parameters, it is not useful for other strongSwan applications to read options from this file. The file is hard to parse and only [[IpsecStarter|ipsec starter]] is capable of doing so. As the number of components of the strongSwan project is continually growing, we needed a more flexible configuration file that is easy to extend and can be used by all components. The new configuration format consists of hierarchical sections and a list of key/value pairs in each section. Starting with the strongSwan 4.2.1 release, a default strongswan.conf file is installed in your sysconfdir, e.g. _/etc/strongswan.conf_.
6 1 Martin Willi
7 1 Martin Willi
h2. Syntax
8 1 Martin Willi
9 49 Andreas Steffen
Each section has a name, followed by C-Style curly brackets defining the sections body. Each section body contains a set of subsections and key/value pairs:
10 1 Martin Willi
11 1 Martin Willi
<pre>
12 30 Martin Willi
settings := (section|keyvalue)*
13 30 Martin Willi
section  := name { settings }
14 1 Martin Willi
keyvalue := key = value\n
15 29 Andreas Steffen
</pre>
16 49 Andreas Steffen
17 49 Andreas Steffen
Values must be terminated by a newline. Comments are possible using the #-character, but be careful: The parser implementation is currently limited and does not like brackets in comments. Section names and keys may contain any printable character except:
18 49 Andreas Steffen
19 30 Martin Willi
<pre>
20 30 Martin Willi
. { } # \n \t space
21 29 Andreas Steffen
</pre>
22 49 Andreas Steffen
23 29 Andreas Steffen
An example might look like this:
24 49 Andreas Steffen
25 29 Andreas Steffen
<pre>
26 1 Martin Willi
a = b
27 1 Martin Willi
section-one {
28 1 Martin Willi
  somevalue = asdf
29 1 Martin Willi
  subsection {
30 1 Martin Willi
    othervalue = xxx
31 1 Martin Willi
  }
32 1 Martin Willi
  # yei, a comment 
33 1 Martin Willi
  yetanother = zz
34 1 Martin Willi
}
35 1 Martin Willi
section-two {
36 1 Martin Willi
  x = 12
37 1 Martin Willi
}
38 1 Martin Willi
</pre>
39 29 Andreas Steffen
40 1 Martin Willi
Indentation is optional, you may use tabs or spaces.
41 30 Martin Willi
42 30 Martin Willi
43 30 Martin Willi
h2. Reading values
44 29 Andreas Steffen
45 49 Andreas Steffen
The config file is read by libstrongswan during library initialization. Values are accessed using a dot-separated section list and a key: 
46 49 Andreas Steffen
Accessing *section-one.subsection.othervalue* will return *xxx*. Have a look at the [source:trunk/src/libstrongswan/settings.h settings interface] how to query values.
47 27 Andreas Steffen
48 29 Andreas Steffen
h2. Defined keys
49 1 Martin Willi
50 1 Martin Willi
The following keys are currently defined (using dot notation).
51 1 Martin Willi
52 30 Martin Willi
|Key                                                |Default   |Description|
53 40 Tobias Brunner
|\3. *charon section*                               |
54 44 Andreas Steffen
|charon.block_threshold                             |5         |Maximum number of half-open IKE_SAs for a single peer IP|
55 30 Martin Willi
|charon.close_ike_on_child_failure                  |no        |Close the IKE_SA if setup of the CHILD_SA along with IKE_AUTH failed|
56 44 Andreas Steffen
|charon.cookie_threshold                            |10        |Number of half-open IKE_SAs that activate the cookie mechanism| 
57 30 Martin Willi
|charon.dns1                                        |          |DNS server 1 assigned to peer via configuration payload (CP)|
58 30 Martin Willi
|charon.dns2                                        |          |DNS server 2 assigned to peer via configuration payload (CP)|
59 30 Martin Willi
|charon.dos_protection                              |yes       |Enable Denial of Service protection using cookies and aggressiveness checks|
60 30 Martin Willi
|charon.hash_and_url                                |no        |Enable hash and URL support|
61 59 Andreas Steffen
|charon.ikesa_table_segments                        |1         |Number of exclusively locked segments in the hash table|
62 59 Andreas Steffen
|charon.ikesa_table_size                            |1         |Size of the IKE_SA hash table|
63 59 Andreas Steffen
|charon.inactivity_close_ike                        |no        |Whether to close IKE_SA if the only CHILD_SA closed due to inactivity|
64 30 Martin Willi
|charon.install_routes                              |yes       |Install routes into a separate routing table for established IPsec tunnels|
65 30 Martin Willi
|charon.keep_alive                                  |20s       |NAT keep alive interval|
66 30 Martin Willi
|charon.load                                        |          |Plugins to load in charon|
67 30 Martin Willi
|charon.multiple_authentication                     |yes       |Enable multiple authentication exchanges (RFC 4739)|
68 59 Andreas Steffen
|charon.nbns1                                       |          |WINS server 1 assigned to peer via configuration payload (CP)|
69 59 Andreas Steffen
|charon.nbns2                                       |          |WINS server 2 assigned to peer via configuration payload (CP)|
70 30 Martin Willi
|charon.process_route                               |yes       |Process RTM_NEWROUTE and RTM_DELROUTE events|
71 59 Andreas Steffen
|charon.retransmit_base                             |1.8       |Base to use for calculating exponential back off, see [[Retransmission]]|
72 59 Andreas Steffen
|charon.retransmit_timeout                          |4.0       |Timeout in seconds before sending first retransmit|
73 59 Andreas Steffen
|charon.retransmit_tries                            |5         |Number of times to retransmit a packet before giving up|
74 30 Martin Willi
|charon.reuse_ikesa                                 |yes       |Initiate CHILD_SA within existing IKE_SAs|
75 47 Martin Willi
|charon.routing_table                               |          |Numerical routing table to install routes to|
76 47 Martin Willi
|charon.routing_table_prio                          |          |Priority of the routing table|
77 47 Martin Willi
|charon.send_vendor_id                              |no        |Send strongSwan vendor ID payload|
78 50 Martin Willi
|charon.threads                                     |16        |Number of worker threads in charon|
79 59 Andreas Steffen
|Flexible logger configuration                      |          |see [[LoggerConfiguration]]|
80 52 Andreas Steffen
|\3. *charon plugins subsection*                    |
81 52 Andreas Steffen
|charon.plugins.dhcp.identity_lease                 |no        |Derive user-defined MAC address from hash of IKEv2 identity|
82 55 Andreas Steffen
|charon.plugins.dhcp.server                         |255.255.255.255|DHCP server unicast or broadcast IP address|
83 1 Martin Willi
|charon.plugins.eap-aka.request_identity            |yes       ||
84 1 Martin Willi
|charon.plugins.eap-aka-3ggp2.seq_check             |          ||
85 57 Andreas Steffen
|charon.plugins.eap-gtc.pam_service                 |login     |PAM service to be used for authentication|
86 52 Andreas Steffen
|charon.plugins.eap-sim.request_identity            |yes       ||
87 52 Andreas Steffen
|charon.plugins.eap-radius.secret                   |          |Shared secret between RADIUS and NAS|
88 52 Andreas Steffen
|charon.plugins.eap-radius.server                   |          |IP/Hostname of RADIUS server|
89 52 Andreas Steffen
|charon.plugins.eap-radius.port                     |1812      |Port of RADIUS server (authentication)|
90 52 Andreas Steffen
|charon.plugins.eap-radius.sockets                  |5         |Number of sockets (ports) to use, increase for high load|
91 52 Andreas Steffen
|charon.plugins.eap-radius.nas_identifier           |strongSwan|NAS-Identifier to include in RADIUS messages|
92 52 Andreas Steffen
|charon.plugins.eap-radius.eap_start                |no        |Send EAP-Start instead of EAP-Identity to start RADIUS conversation|
93 53 Andreas Steffen
|charon.plugins.eap-radius.id_prefix                |          |Prefix to EAP-Identity, some AAA servers use a IMSI prefix to select the EAP method|
94 53 Andreas Steffen
|charon.plugins.ha.fifo_interface                   |yes       ||
95 53 Andreas Steffen
|charon.plugins.ha.local                            |          ||
96 53 Andreas Steffen
|charon.plugins.ha.monitor                          |yes       ||
97 53 Andreas Steffen
|charon.plugins.ha.remote                           |          ||
98 53 Andreas Steffen
|charon.plugins.ha.resync                           |yes       ||
99 53 Andreas Steffen
|charon.plugins.ha.secret                           |          ||
100 58 Andreas Steffen
|charon.plugins.ha.segment_count                    |1         ||
101 41 Martin Willi
|charon.plugins.kernel-klips.ipsec_dev_mtu          |0         |Set MTU of ipsecN device|
102 41 Martin Willi
|charon.plugins.load-tester.enable                  |no        |Enable the load testing plugin. Read [[LoadTests]] first!|
103 41 Martin Willi
|charon.plugins.load-tester.initiators              |0         |Number of concurrent initiator threads to use in load test|
104 41 Martin Willi
|charon.plugins.load-tester.iterations              |1         |Number of IKE_SAs to initate to self by each initiator in load test|
105 41 Martin Willi
|charon.plugins.load-tester.delay                   |0         |Delay between initiatons for each thread|
106 1 Martin Willi
|charon.plugins.load-tester.proposal                |aes128-sha1-modp1024|IKE proposal to use in load test|
107 1 Martin Willi
|charon.plugins.load-tester.initiator_auth          |pubkey    |Authentication method(s) the intiator uses|
108 41 Martin Willi
|charon.plugins.load-tester.responder_auth          |pubkey    |Authentication method(s) the responder uses|
109 41 Martin Willi
|charon.plugins.load-tester.fake_kernel             |no        |Fake the kernel interface to allow load-testing against self|
110 41 Martin Willi
|charon.plugins.load-tester.delete_after_established|no        |Delete an IKE_SA as soon as it has been established|
111 41 Martin Willi
|charon.plugins.load-tester.request_virtual_ip      |no        |Request an INTERNAL_IPV4_ADDR from the server|
112 41 Martin Willi
|charon.plugins.load-tester.pool                    |NULL      |Provide INTERNAL_IPV4_ADDRs from a named pool|
113 41 Martin Willi
|charon.plugins.load-tester.remote                  |127.0.0.1 |Address to initiation connections to|
114 52 Andreas Steffen
|charon.plugins.load-tester.ike_rekey               |0         |Seconds to start IKE_SA rekeying after setup|
115 52 Andreas Steffen
|charon.plugins.load-tester.child_rekey             |600       |Seconds to start CHILD_SA rekeying after setup|
116 60 Andreas Steffen
|charon.plugins.resolve.file                        |/etc/resolv.conf|File where to add DNS server entries|
117 39 Martin Willi
|charon.plugins.sql.database                        |          |Database URI for charons [[SQL]] plugin|
118 39 Martin Willi
|charon.plugins.sql.loglevel                        |-1        |Loglevel for logging to [[SQL]] database|
119 1 Martin Willi
|\3. *libstrongswan section*                        |
120 40 Tobias Brunner
|libstrongswan.dh_exponent_ansi_x9_42               |yes       |Use ANSI X9.42 DH exponent size or optimum size matched to cryptographical strength| 
121 32 Andreas Steffen
|libstrongswan.crypto_test.on_add                   |no        |Test crypto algorithms during registration| 
122 36 Martin Willi
|libstrongswan.crypto_test.on_create                |no        |Test crypto algorithms on each crypto primitive instantiation|
123 36 Martin Willi
|libstrongswan.crypto_test.required                 |no        |Strictly require at least one test vector to enable an algorithm|
124 1 Martin Willi
|libstrongswan.crypto_test.rng_true                 |no        |Whether to test RNG with TRUE quality; requires a lot of entropy|
125 36 Martin Willi
|libstrongswan.ecp_x_coordinate_only                |yes       |Compliance with the errata for RFC 4753 | 
126 57 Andreas Steffen
|libstrongswan.integrity_test                       |no        |Check daemon, libstrongswan and plugin integrity at startup|
127 41 Martin Willi
|\3. *libstrongswan plugins subsection*             |
128 41 Martin Willi
|libstrongswan.plugins.attr-sql.database            |          |Database URI for attr-sql plugin used by charon and pluto |
129 1 Martin Willi
|libstrongswan.plugins.attr-sql.lease_history       |yes       |Enable logging of [[SQL]] IP pool leases|
130 60 Andreas Steffen
|libstrongswan.plugins.gcrypt.quick_random          |no        |Use faster random numbers in gcrypt; for testing only, produces weak keys!|
131 45 Andreas Steffen
|libstrongswan.plugins.openssl.engine_id            |pkcs11    |ENGINE ID to use in the OpenSSL plugin|
132 40 Tobias Brunner
|libstrongswan.plugins.x509.enforce_critical        |no        |Discard certificates with unsupported or unknown critical extensions|
133 30 Martin Willi
|\3. *manager section*                              |
134 30 Martin Willi
|manager.database                                   |          |Credential database URI for manager|
135 30 Martin Willi
|manager.debug                                      |no        |Enable debugging in manager|
136 30 Martin Willi
|manager.load                                       |          |Plugins to load in manager|
137 30 Martin Willi
|manager.socket                                     |          |FastCGI socket of manager, to run it statically|
138 30 Martin Willi
|manager.threads                                    |10        |Threads to use for request handling|
139 40 Tobias Brunner
|manager.timeout                                    |15m       |Session timeout for manager|
140 30 Martin Willi
|\3. *mediation client section*                     |
141 30 Martin Willi
|medcli.database                                    |          |Mediation client database URI|
142 30 Martin Willi
|medcli.dpd                                         |5m        |DPD timeout to use in mediation client plugin|
143 40 Tobias Brunner
|medcli.rekey                                       |20m       |Rekeying time on mediation connections in mediation client plugin|
144 30 Martin Willi
|\3. *mediation server section*                     |
145 30 Martin Willi
|medsrv.database                                    |          |Mediation server database URI|
146 30 Martin Willi
|medsrv.debug                                       |no        |Debugging in mediation server web application|
147 30 Martin Willi
|medsrv.dpd                                         |5m        |DPD timeout to use in mediation server plugin|
148 30 Martin Willi
|medsrv.load                                        |          |Plugins to load in mediation server plugin|
149 30 Martin Willi
|medsrv.password_length                             |6         |Minimum password length required for mediation server user accounts|
150 30 Martin Willi
|medsrv.rekey                                       |20m       |Rekeying time on mediation connections in mediation server plugin|
151 30 Martin Willi
|medsrv.socket                                      |          |Run Mediation server web application statically on socket|
152 30 Martin Willi
|medsrv.threads                                     |5         |Number of thread for mediation service web application|
153 40 Tobias Brunner
|medsrv.timeout                                     |15m       |Session timeout for mediation service|
154 30 Martin Willi
|\3. *openac section*                               |
155 40 Tobias Brunner
|openac.load                                        |          |Plugins to load in ipsec openac tool|
156 62 Andreas Steffen
|\3. *pki section*                                 |
157 62 Andreas Steffen
|pki.load                                           |          |Plugins to load in ipsec pki tool|
158 30 Martin Willi
|\3. *pluto section*                                |
159 30 Martin Willi
|pluto.dns1                                         |          |DNS server 1 assigned to peer via configuration payload (CP)|
160 30 Martin Willi
|pluto.dns2                                         |          |DNS server 2 assigned to peer via configuration payload (CP)|
161 30 Martin Willi
|pluto.load                                         |          |Plugins to load in ipsec pluto daemon|
162 30 Martin Willi
|pluto.nbns1                                        |          |WINS server 1 assigned to peer via configuration payload (CP)|
163 40 Tobias Brunner
|pluto.nbns2                                        |          |WINS server 2 assigned to peer via configu+ration payload (CP)|
164 30 Martin Willi
|\3. *pool section*                                 |
165 40 Tobias Brunner
|pool.load                                          |          |Plugins to load in ipsec pool tool|
166 30 Martin Willi
|\3. *scepclient section*                           |
167 1 Martin Willi
|scepclient.load                                    |          |Plugins to load in ipsec scepclient tool|
168 61 Andreas Steffen
|\3. *starter section*                              |
169 61 Andreas Steffen
|starter.load_warning                               |yes       |Disable charon/pluto plugin load option warning|