| IKED(8) | System Manager's Manual | IKED(8) |
NAME¶
iked.conf —
Internet Key Exchange Daemon Configuration File
DESCRIPTION¶
The iked.conf file is used to configure
iked(8) ( Internet Key Exchange Daemon ). The parameters
supplied are used to negotiate ISAKMP ( phase1 ) and IPsec ( phase2 ) SAs
for IPsec capable hosts.
SYNTAX¶
The configuration parameters are expressed as a series of sections
containing a number of statements. Sections begin with a keyword optionally
followed by a parameter list. All statements for a section are enclosed
using the ‘{’ and
‘}’ characters. Statements begin with
a keyword optionally followed by a parameter list and are terminated with
the ‘;’ character. Lines that begin
with the ‘#’ character are treated as
comments.
This document denotes keywords using this
font and user supplied parameters using this font.
Optional parameters are enclosed using the
‘[’ and
‘]’ characters. Multiple keywords that
may be valid for a single parameter are enclosed using the
‘(’ and
‘)’ characters and separated using the
‘|’ character.
The defined parameter types are as follows ...
- number
- A decimal number
- label
- A string comprised of alphanumeric characters
- quoted
- A quoted string enclosed in ‘
"’ characters - address
- An IP address expressed as x.x.x.x
- network
- An IP network and prefix length expressed as x.x.x.x/y
Daemon Section¶
daemon {statements}- Specifies the general configuration for iked(8)
operation. This includes parameters related to the basic network
configuration, log file and debug output. Only one
daemonsection should be defined.socket(ike|natt) [address] number;- An address and port number that should be used for ike or natt communications. If the address parameter is omitted, the daemon will attempt to bind to any address for the given port number. If no socket statements are specified, the daemon will attempt to bind to all interfaces for both ike and natt using the default port numbers ( 500 & 4500 respectively ). Note, the natt keyword can only be specified if the daemon was compiled with natt support.
retry_countnumber;- The number of times an exchange packet should be resent to a peer. The default value for this parameter is 2.
retry_delaynumber;- The number of seconds to wait between packet resend attempts. The default value for this parameter is 10.
log_filequoted;- The path and file name that should be used for log output.
log_level (none|error|info|debug|loud|decode);- The log output detail level. The default value for this parameter is
none. pcap_decryptquoted;- The path and file name that should be used to dump decrypted ike
packets in pcap format. If no
pcap_decryptstatement is specified, this feature is disabled. pcap_encryptquoted;- The path and file name that should be used to dump encrypted ike
packets in pcap format. If no
pcap_encryptstatement is specified, this feature is disabled. dhcp_filequoted;- The path and file name that should be used to store a dhcp mac address seed value for dhcp over ipsec negotiation. If no file is present, the file will be created.
Network Group Section¶
XAuth LDAP Section¶
xauth_ldap {statements}- Specifies the LDAP configuration to be used for when the
xauth_sourceis set toldapfor a given peer section. Only onexauth_ldapsection should be defined. Note, anxauth_ldapsection can only be defined if the daemon was compiled with LDAP support.versionnumber;- The LDAP protocol version to be used ( 2 or 3 ). The default value for this parameter is 3.
urlquoted;- The LDAP server url. For example, a url may look like "ldap://ldap.shrew.net:389".
basequoted;- The base dn to be used for LDAP searches. For example, a base dn may look like "ou=users,dc=shrew,dc=net".
subtree (enable|disable);- The search scope to be used for LDAP searches. If enabled, searches
will be performed using the subtree search scope. If disabled,
searches will be performed using the one level search scope. The
default value for this parameter is
disable. bind_dnquoted;- The dn to bind as before performing LDAP searches. If this parameter is omitted, searches will be performed using anonymous binds.
bind_pwquoted;- The password to use when a
bind_dnis specified. attr_userquoted;- The attribute used to specify a user name in the LDAP directory. For example, if a user dn is "cn=user,dc=shrew,dc=net" then the attribute would be "cn". The default value for this parameter is "cn".
attr_groupquoted;- The attribute used to specify a group name in the LDAP directory. For example, if a group dn is "cn=group,dc=shrew,dc=net" then the attribute would be "cn". The default value for this parameter is "cn".
attr_memberquoted;- The attribute used to specify a group member in the LDAP directory. The default value for this parameter is "member".
XConf Local Section¶
xconf_local {statements}- Specifies the Configuration Exchange settings to be used when the
xconf_sourceis set tolocalfor a given peer section. Only onexconf_localsection should be defined.network4network [number];- The network that will be used to define a local address pool. An optional number can be specified to restrict the pool to a specific size. An address from this pool along with the network mask are passed to a peer when requested.
dnss4address;- The dns server address to be passed to a peer when requested.
nbns4address;- The netbios name server address to be passed to a peer when requested.
dns_suffixquoted;- The dns suffix to be passed to a peer when requested.
dns_listquoted quoted ...;- A list of split dns suffixes to be passed to a peer when requested. A
peer can use this list to selectivly forward dns requests to the
dnss4server when a query matches one of the supplied split dns suffixes. - The path to a file that contains a login banner to be passed to a peer when requested.
pfs_groupnumber;- The pfs group number to be passed to a peer when requested.
Peer Section¶
peeraddress [number]{statements}- Specifies the parameters used to communicate with a given peer by address
and optional port number. If the port value is omitted, the default isakmp
port number will be used ( 500 ). If an address of 0.0.0.0 is used, the
peer section can be used for any remote host. Multiple
peersections may be defined.contact (initiator|responder|both);- Specifies the contact type when establishing phase1 negotiations with
a peer. If
initiatoris used, the daemon will initiate contact but deny contact initiated by the peer. Ifresponderis used, the daemon will allow contact initiated by the peer but will not initiate contact. Ifbothis specified, the daemon will initiate contact and allow the peer to initiate contact. exchange (main|aggressive);- Specifies the exchange type to be used for phase1 negotiations with a
peer. The default value for this parameter is
main. natt_mode (disable|enable|force[draft|rfc]);- Specifies the NAT Traversal mode to be used for phase1 negotiations
with a peer. If
disableis used, natt negotiations will not be attempted. Ifenableis used, the daemon will attempt to negotiate and use NAT Traversal when appropriate. Ifforceis used, the daemon will use NAT Traversal even if the peer does not negotiate support for this feature. When force is used, thedraftorrfcmodifiers can optionally be specified to select the required method withrfcbeing the default if omitted. The default value for this parameter isdisable. natt_portnumber;- Specifies the NAT Traversal port number to be used for phase1 negotiations with a peer when acting as an initiator. The default value for this parameter is 4500.
natt_ratenumber;- Specifies the number of seconds between sending NAT Traversal keep-alive messages. The default value for this parameter is 15.
dpd_mode (disable|enable|force);- Specifies the Dead Peer Detection mode to be used with a peer. If
disableis used, DPD negotiations will not be attempted. Ifenableis used, the daemon will attempt to negotiate and use DPD when appropriate. Ifforceis used, the daemon will use DPD even if the peer does not negotiate support for this feature. The default value for this parameter isdisable. dpd_delaynumber;- Specifies the number of seconds between sending DPD are-you-there messages. The default value for this parameter is 15.
dpd_retrynumber;- Specifies the number times a DPD are-you-there message will be retransmitted when no response is received. The default value for this parameter is 5.
frag_ike_mode (disable|enable|force);- Specifies the IKE Fragmentation mode to be used with a peer. If
disableis used, IKE Fragmentation negotiations will not be attemted. Ifenableis used, the daemon will attempt to negotiate and use IKE Fragmentation when appropriate. Ifforceis used, the daemon will use IKE Fragmentation even if the peer does not negotiate support for this feature. The default value for this parameter isdisable. frag_ike_sizenumber;- Specifies the maximum number of bytes for an IKE Fragment. The default value for this parameter is 520.
frag_esp_mode (disable|enable);- Specifies the ESP Fragmentation mode to be used with a peer. If
disableis used, the daemon will create IPsec SAs without the ESP Fragmentation option. Ifenableis used, the daemon will create IPsec SAs with the ESP Fragmentation option. The default value for this parameter isdisable. Note, ESP Fragmentation is only valid for IPsec SAs using NAT Traversal. The operating system must also have support for this feature. ( NetBSD Only ) frag_esp_sizenumber;- Specifies the maximum number of bytes for an ESP Fragment. The default value for this parameter is 520.
peerid (local|remote)type ...;- Specifies either the
localidentity to be sent to a peer or theremoteidentity to be compared with the value received from a peer during phase1 negotiations. The valid identity types are as follows ...address[address];- An IP Address. If the address value is omitted, the network address used during phase1 negotiations is used.
fqdnquoted;- A Fully Qualified Domain Name string.
ufqdnquoted;- A User Fully Qualified Domain Name string.
asn1dn[quoted];- An ASN.1 Distinguished Name string. If the quoted value is omitted, the daemon will aquire the DN from the subject field contained within the certificate.
authdatatype ...;- Specifies the authentication data to use during phase1 negotiations.
The valid authentication data types are as
follows ...
pskquoted;- A Pre Shared Secret.
caquoted [quoted];- A path to a OpenSSL PEM or PSK12 file that contains the Remote Certificate Autority. In the case where a PSK12 file is encrypted, the second quoted parameter specifies the file password.
certquoted [quoted];- A path to a OpenSSL PEM or PSK12 file that contains the Local Public Certificate. In the case where a PSK12 file is encrypted, the second quoted parameter specifies the file password.
pkeyquoted [quoted];- A path to a OpenSSL PEM or PSK12 file that contains the Local Private Key. In the case where a PSK12 file is encrypted, the second quoted parameter specifies the password.
life_checklevel;- Specifies the behavior when validating peer lifetime proposal values.
The default level is
claim. The valid levels are as follows ...obey- A responder will always use the initiators value.
strict- A responder will use the initiators value if it is shorter than the responders. A responder will reject the proposal if the initiators value is greater than the responders.
claim- A responder will use the initiators value if it is shorter than the responders. A responder will use its own value if it is shorter than the initiators. In the second case, the responder will send a RESPONDER-LIFETIME notification to the initiator when responding to phase2 proposals.
exact;- A responder will reject the proposal if the initiators value is not equal to the responders.
xauth_source (local|ldap)[quoted];- Sepcifies the Extended Authentication source to be used for user
authentication post phase1 negotitations. The optional quoted value
specifies a group name that can be used to restrict access to only
users that are valid members of the group. If
localis used, the peer supplied credentials will be compared to the local account database. Ifldapis used, the peer supplied credentials will be compared to an LDAP account database. The LDAP source configuration is defined in thexauth_ldapsection. The default value for this parameter islocal. xconf_source local[(push|pull)];- Sepcifies the Configuration Exchange source to be used when responding
to peer configuration requests. If
localis used, the daemon will supply configuration information defined in thexconf_localsection. The default value for this parameter islocal. plcy_mode (disable|config|compat);- Specifies the policy generation mode. When
disableis used, no policy generation is performed. Whenconfigmode is used, policy generation is performed during Configuration Exchange. This allows the daemon to generate polices using the peers private tunnel address. Whencompatmode is used, policy generation is performed post phase1 negotiations. This allows the daemon to interoperate with peers that do not support Configuration Exchanges. plcy_list {statements}- Specifies a list of network groups and parameters that can be used to
perform policy generation. If no
plcy_listis defined butplcy_modeis set toconfigorcompat, the daemon operates as if a singleincludestatement was used that specified a netmap defining all networks.(include|exclude)label [quoted];- Specifies a
netgroupby label for use with policy generation. Whenincludeis used, the daemon will generate appropriate IPsec policies and pass allnetgroupdefined networks during the Configuration Exchange if requested. A peer would use this configuration information to selectively tunnel all traffic destined for any one of these networks. Ifexcludeis used, the daemon will generate appropriate discard policies and pass allnetgroupdefined networks during the Configuration Exchange if requested. A peer would use this configuration information to selectively bypass IPsec processing for all traffic destined to any one of these networks. The optional quoted string specifies a group name that can be used to restrict processing of this netgroup to only users that are valid members of the group. If XAuth is not performed, statements that define a group name are skipped.
proposaltype { statements }- Specifies a proposal to be used during SA negotiations with a peer.
The valid proposal types are as follows ...
isakmp- An ISAKMP proposal supports the following ...
authtype;- Define the authentication mechanism for the ISAKMP proposal.
The accepted types are
hybrid_xauth_rsa,mutual_xauth_rsa,mutual_xauth_psk,mutual_rsaandmutual_psk. ciphtype [number];- Define the cipher algorithm for this proposal. The optional
number specifies the keylength for algorithms that support it.
The accepted types are
aes,blowfish,3des,castanddes. hashtype;- Define the hash algorithm for this proposal. The accepted
types are
md5andsha1. dhgrnumber;- Define the DH group for this proposal. The accepted values are
1,2,5,14,15, 16, 17, 18and16.
ah- An AH proposal supports the following ...
esp- An ESP proposal supports the following ...
ciphtype [number];- Define the cipher algorithm for this proposal. The optional
number specifies the keylength for algorithms that support it.
The accepted types are
aes,blowfish,3des,castanddes. hmactype;- Define the message authentication algorithm for this proposal.
The accepted types are
md5andsha1. dhgrnumber;- Define the DH group for this proposal. The accepted values are
1,2,5,14,15, 16, 17, 18and16.
ipcomp- An IPCOMP proposal supports the following ...
comptype;- Define the compression algorithm for this proposal. The
accepted types are
deflateandlzs.
All proposals types support the following ...
EXAMPLES¶
This section contains a few iked configuration examples.
The first example shows a configuration that only defines the parameters required to support client connectivity mode with NATT and debug options enabled.
daemon
{
socket ike 500;
socket natt 4500;
log_level debug;
log_file "/var/log/iked.log";
pcap_decrypt "/var/log/ike-decrypt.pcap";
pcap_encrypt "/var/log/ike-encrypt.pcap";
retry_delay 10;
retry_count 2;
}
The second example shows a configuration that supports simple peer to peer negotiations using mutual preshared key authentication.
daemon
{
socket ike 500;
log_level debug;
log_file "/var/log/iked.log";
}
peer 1.2.3.4
{
exchange main;
peerid local address;
peerid remote address;
authdata psk "sharedsecret";
life_check claim;
proposal isakmp
{
auth mutual_psk;
life_sec 28800;
life_kbs 0;
}
proposal esp
{
life_sec 3800;
life_kbs 0;
}
}
The third example shows a configuration that supports client gateway negotiations using mutual preshared key authentication with xauth, nat traversal, dead peer detection, ike fragmentation and policy generation. The daemon would allow xauth users that are members of the "remote" group to connect to the gateway. Policies would be generated to allow a peer access to the 10.1.1.0/24 and 1.3.3.0/24 networks with the exception of 1.1.1.15/32 which be accessed directly ( not via IPsec ). Peers that use an xauth user account that is a member of the "netadmin" group would have additional policies generated to allow access to the 10.4.4.0/24 network.
daemon
{
socket ike 500;
socket natt 4500;
log_level debug;
log_file "/var/log/iked.log";
pcap_decrypt "/var/log/ike-decrypt.pcap";
pcap_encrypt "/var/log/ike-encrypt.pcap";
}
netgroup allow
{
10.1.1.0/24;
10.3.3.0/24;
}
netgroup deny
{
1.1.1.15/32;
}
netgroup protect
{
10.4.4.0/24;
}
xconf_local
{
network4 10.2.1.0/24;
dnss4 10.1.1.1;
nbns4 10.1.1.1;
dns_suffix "foo.com";
dns_list "foo.com" "bar.com";
banner "/etc/iked.motd";
pfs_group 2;
}
peer 0.0.0.0
{
contact responder;
exchange main;
natt_mode enable;
dpd_mode enable;
frag_ike_mode enable;
peerid local address;
peerid remote address;
authdata psk "sharedsecret";
life_check claim;
xauth_source local "remote";
xconf_source local;
plcy_mode config;
plcy_list
{
include allow;
exclude deny;
include protect "netadmin";
}
proposal isakmp
{
auth mutual_xauth_psk;
ciph 3des;
hash md5;
dhgr 2;
life_sec 28800;
life_kbs 0;
}
proposal esp
{
life_sec 3800;
life_kbs 0;
}
}
SEE ALSO¶
HISTORY¶
The iked.conf parser was written by
Matthew Grooms ( mgrooms@shrew.net ) as part of the Shrew Soft (
http://www.shrew.net ) family of IPsec products.
| Febuary 2, 2007 | Nixpkgs |