Ipsec
Ipsec
Users Manual
4.0
Branch offices
Head Office
VPN Gateway
Partner offices
Remote/Home/Mobile Workers
Copyright 2007, F/X Communications. All Rights Reserved. The use and copying of this product is subject to a license agreement. Any other use is strictly prohibited. No part of this publication may be reproduced, transcribed, or translated into any language, in any form by any means without the prior written consent of F/X Communications. Information in this document is subject to change without notice and does not constitute any commitment on the part of F/X Communications.
Contents
1. INTRODUCTION ....................................................................................... 5 1.1. DOCUMENT SCOPE ............................................................................ 5 1.2. READING THIS DOCUMENT ................................................................... 5
I.
2. IPSEC TECHNOLOGY OVERVIEW .............................................................. 7 2.1. WHAT IS A VIRTUAL PRIVATE NETWORK (VPN)? ......................................... 7 2.2. INTRODUCTION TO IPSEC .................................................................... 8 3. INJOY IPSEC FEATURES ......................................................................... 12 3.1. TRAFFIC ENCAPSULATION MODES ......................................................... 12 3.2. ENCRYPTION METHODS ..................................................................... 12 3.3. AUTHENTICATION METHODS ............................................................... 13 3.4. ROAD WARRIORS ........................................................................... 14 3.5. KEY MANAGEMENT .......................................................................... 15 3.6. IPSEC EXTENSIONS ......................................................................... 15
II.
Getting Started
17
4. STARTING IPSEC ................................................................................... 18 4.1. INJOY IPSEC REQUIREMENTS ............................................................. 18 4.2. ENABLING THE IPSEC SOFTWARE COMPONENTS ........................................ 19 4.3. VERIFYING IPSEC SUPPORT ............................................................... 20 5. CONFIGURATION OVERVIEW ................................................................. 21 5.1. WHAT NEEDS CONFIGURATION? .......................................................... 21 5.2. HOW IS IPSEC CONFIGURED? ............................................................ 21 5.3. WHICH IPSEC CONFIGURATION FILES EXIST? .......................................... 23 5.4. HOW DO I ACTIVATE CONFIGURATION CHANGES? ...................................... 26 6. USING THE QUICK VPN WIZARD ............................................................ 28 6.1. VPN WIZARD OVERVIEW .................................................................. 28 6.2. STARTING THE VPN WIZARD .............................................................. 30 6.3. SETTING UP A VPN SERVER OR CLIENT .................................................. 31 6.4. CONFIGURING VPN USERS ................................................................ 34 7. USING THE TUNNEL WORKSHOP ............................................................ 35 7.1. CREATING SECURITY ASSOCIATIONS ..................................................... 35 7.2. EDITING EXISTING SECURITY ASSOCIATIONS ........................................... 40 7.3. SAMPLE SECURITY ASSOCIATIONS ........................................................ 41 8. USING INJOY IPSEC .............................................................................. 42 8.1. BASIC ARCHITECTURE ...................................................................... 42 8.2. MONITORING USERS AND TUNNELS....................................................... 42 8.3. LOGGING AND TRACE FILES................................................................ 44 8.4. FAIL-OVER AND FALL-BACK ................................................................ 45 8.5. TRANSFORM ORDER CONTROL ............................................................. 45 8.6. PERFECT FORWARD SECRECY (PFS) ..................................................... 46 8.7. SELECTIVELY BYPASSING THE TUNNEL ................................................... 46 8.8. PATH MTU DISCOVERY ..................................................................... 46 8.9. HEARTBEATS AND TUNNEL LIVELINESS ................................................... 47 8.10. LIMITATIONS ................................................................................. 47
III.
Setting up a VPN
48
9. IPSEC DEPLOYMENT PLANNING ............................................................. 49 9.1. THE IPSEC PLANNING WORKSHOP ....................................................... 49 9.2. IDENTIFYING YOUR IPSEC ENDPOINTS ................................................... 57 9.3. DEFINING YOUR IKE NEGOTIATION POLICIES .......................................... 58 9.4. DEFINING YOUR ENCRYPTION AND HASHING POLICIES ................................ 59 9.5. USING IPSEC EXTENSIONS ................................................................ 60 10. A VPN CASE STUDY .............................................................................. 62 10.1. SOFTDEV.COM: VPN PLANNING .......................................................... 62 10.2. HEAD OFFICE VPN SERVER CONFIGURATION ........................................... 64 10.3. PARTNER COMPANY CONFIGURATION ..................................................... 74 10.4. REMOTE EMPLOYEES CONFIGURATION .................................................... 76 10.5. ESTABLISHING THE TUNNEL ................................................................ 78 10.6. MONITORING AND MAINTENANCE ......................................................... 79
IV.
80
11. USING ROAD WARRIOR SUPPORT ....................................................... 81 11.1. INTRODUCTION TO ROAD WARRIORS ..................................................... 81 11.2. ROAD WARRIOR LIMITATIONS ............................................................. 82 11.3. OPERATIONAL DETAILS ..................................................................... 83 11.4. SAMPLE ROAD WARRIOR SCENARIOS .................................................... 84 12. USING INNER-IP SUPPORT .................................................................. 87 12.1. INTRODUCTION TO INNER-IP .............................................................. 87 12.2. INNER-IP LIMITATIONS..................................................................... 88 12.3. OPERATIONAL DETAILS ..................................................................... 89 12.4. SAMPLE INNER-IP SCENARIOS ............................................................ 89 13. USING IPSEC BEHIND NAT .................................................................. 91 13.1. INTRODUCTION TO NAT TRAVERSAL...................................................... 91 13.2. NAT-T OPERATION DETAILS .............................................................. 92 13.3. NAT-T LIMITATIONS ....................................................................... 93 14. USING IP COMPRESSION ..................................................................... 95 14.1. INTRODUCTION TO IP COMPRESSION ..................................................... 95 14.2. IP COMPRESSION CONFIGURATION ....................................................... 96 15. USING MANUAL KEYING ...................................................................... 98 15.1. INTRODUCTION TO MANUAL KEYING ...................................................... 98 15.2. MANUAL KEYING DRAWBACKS ............................................................. 98 15.3. USING MANUAL KEYING .................................................................... 98 16. AUTHENTICATION METHODS ............................................................. 101 16.1. PRE-SHARED KEYS ......................................................................... 101 16.2. EXTENDED AUTHENTICATION (XAUTH) .................................................. 102 16.3. RSA DIGITAL SIGNATURES ............................................................... 105 16.4. GROUP AUTHENTICATION ................................................................. 109 16.5. X.509 CERTIFICATES...................................................................... 111
V.
Deployment Examples
17. MORE 17.1. 17.2. 17.3. 17.4. 17.5.
119
SAMPLE SCENARIOS ................................................................ 120 SIMPLE VPN USING MANUAL KEYING ................................................... 120 SIMPLE VPN USING AUTOMATIC KEYING ............................................... 122 VPN WITH MULTIPLE SUB-NETWORKS ................................................. 123 VPN USING RSA DSS AUTHENTICATION .............................................. 127 VPN USING NAT-T AND VPN GATEWAY ............................................... 130
VI.
References
133
18. APPENDIX A UTILITY PROGRAMS ................................................... 134 18.1. IPSEC (IPSEC MANAGEMENT UTILITY)................................................. 134 18.2. RSASIGKEY (RSA SIGNATURE GENERATION) ........................................ 135 19. APPENDIX B - IPSEC INTEROPERABILITY ......................................... 136 20. APPENDIX C PROTOCOL SUPPORT SUMMARY ................................. 138 21. APPENDIX D CONFIGURATION ATTRIBUTES ................................... 140 21.1. SECURITY ASSOCIATIONS (IPSEC.CNF) ............................................ 140 21.2. IPSEC OPTIONS (OPTIONS.CNF) ................................................... 151
1
1.1. Document Scope
1.Introduction
IPSec is a transparent security layer for TCP/IP that is commonly used to create and operate Virtual Private Networks (VPNs). The InJoy IPSec implementation is one of the few end-to-end VPN solutions that is both standards-based and available for multiple Operating Systems.
This document is designed to provide a concise introduction to IPSec and guide you through its configuration. Before setting up a VPN, you should be familiar with TCP/IP and the InJoy products of choice. TCP/IP networking should be functioning properly between any hosts you plan to include in your VPN. Because IPSec represents an addition to your operating systems networking layer, rather than an application or tool, the number of possible configurations and uses for IPSec are endless. This document will provide you with enough instruction to address most common needs.
If you are looking to set up a VPN in the fastest possible way, please refer to section 6, Using the Quick VPN Wizard. For a more comprehensive real-world example, please refer to section 10, A VPN Case Study.
Part I
Learning about InJoy IPSec
Head Office
Partner offices
VPN Gateway
Branch offices
VPN Gateway
VPN Gateway
Remote/Home/Mobile Workers
You are most likely to need and use a Virtual Private Network if you own or work for an organization faced with one of these common needs:
The need to securely link networks or hosts at distant locations or branch offices The need to unify disparate IP address ranges into a single, more convenient address space The need to secure sensitive network communications from prying eyes The need to ensure the integrity of data being exchanged The need to provide telecommuters a secure path to the workplace network The need to securely replace expensive Frame Relay connections with dial-up or DSL based connections
IPSec Goals
IPSec was designed to address a few simple goals that are shared by users of TCP/IP networks around the world. By addressing these goals, IPSec provides the following features: Data Origin Authentication When your hosts exchange important information over a public network, you want to ensure that the sending and receiving hosts are known to and trusted by one another. Data Integrity Corrupted information can cost your business wasted time, wasted money, and worse. Any robust network must be able to confirm that the data your hosts receive is identical to the data they send. Data Confidentiality
Proprietary business data is valuable; any networking technology you use must therefore protect your data from prying eyes. Replay Protection Any networking technology which is vulnerable to attacks or spoofs is a liability when operated on public networks. IPSec protects your data by preventing replay attacks. Automated Key Management By automating the sequencing and periodic exchange of new encryption keys, IPSec ensures that your data is not made public if a key is somehow compromised.
One SA specifies the network host, the local internal network (IP addresses), authentication options, and basically all other options relating to an IPSec VPN tunnel. As IPSec operates it negotiates the user-configured SAs with remote IPSec end-points (through the IKE Server) and the result is a run-time list of
authentication and encryption properties for each connected host in the Virtual Private Network. Together, this list of properties comprises the Security Associations database, a functional summary of network-wide security policy. The figure below illustrates the use of the IKE Server and the SA between two IPSec end-points:
IPSec
IKE Server
SA
IKE negotiation
IKE Server
SA
IPSec
Above, the user-configured SA is provided to the IKE Server for negotiation with the remote IPSec end-point(s). Upon successful negotiation, the run-time SA is provided to the IPSec module, allowing it to apply packet transformation to all IP packets that match the SA
Tunneling
IPSec Tunneling allows IP packets transferred by your network to be completely and securely encapsulated by IPSec. Each packet receives a new header; all address and connection information present in the original packet headers is hidden from public view. The figure below illustrates the process:
10
Original Datagram
Original Datagram
Tunnel Encapsulation
Tunnel De-encapsulation
For hosts in the VPN this feature is transparent; tunneled traffic appears to be local and peer-to-peer, even if the datagrams themselves must travel across the public Internet to reach their destinations. Split tunneling allows a host to maintain tunneled virtual network communication with other hosts in the VPN while at the same time communicating with public Internet hosts (such as a normal web server on the Internet) directly, outside the tunnel. This reduces both processing and traffic overhead on the private network.
Authentication
Authentication encompasses a number of tools used by IPSec to guarantee the identities of remote users and hosts, who can then be trusted as members of the VPN.
Encryption
Encryption is a way of making data unreadable to third parties, using one of several mathematically complex scrambling techniques. Even if intercepted, encrypted data is difficult or impossible for everyone but the intended sender and receiver to decode.
11
12
times slower than DES. The security robustness of 3DES, however, is much better; 3DES is more difficult to break than DES by several orders of magnitude. For critical data, 3DES remains a good and widely compatible choice. Blowfish Blowfish is among the most modern and fastest encryption methods. It supports long keys, and is well-respected in the industry. Blowfish run many times faster than DES and it offers several different key lengths: 32, 48, 56, 128 and 448. Each version runs at the same speed. The various key lengths are generally required for compliance with certain export control laws. AES (recommended) Short for Advanced Encryption Standard, a symmetric 128 to 256-bit block data encryption technique. AES is a high-speed encryption protocol (comparable to blowfish), which generally out-performs 3DES by factor 2-3. The U.S government adopted the algorithm as its encryption technique in October 2000, replacing the DES encryption it used. The National Institute of Standards and Technology (NIST) of the U.S. Department of Commerce selected the AES algorithm, also called Rijndael (pronounced Rhine Dahl), out of a group of five algorithms under consideration. As a measure for the AES security, the NIST homepage makes available the following information: Assuming that one could build a machine that could recover a DES key in a second (i.e., try 255 keys per second), then it would take that machine approximately 149 thousand-billion (149 trillion) years to crack a 128-bit AES key. To put that into perspective, the universe is believed to be less than 20 billion years old. The InJoy Firewall was developed and compiled outside of the USA and is not subject to US export restrictions. Note: You can use NULL-ESP when you need to be able to tunnel and authenticate data, but dont want the overhead or need the privacy provided by data encryption.
13
Keys should be used only when more secure types of early authentication are unavailable. Extended Authentication (recommended) Extended Authentication (Xauth) brings user-based authentication to IPSec tunnels. Xauth associates a username and password to each IPSec end-point; after first authenticating with Pre-shared Keys, RSA Digital Signatures or X.509 certificates, a host must be able to supply the correct username and password for the IP address being used before any further exchange of information can occur. RSA Digital Signatures The RSA Digital Signature Standard (DSS) can be used in place of Preshared Keys when strong security is needed. RSA DSS is a popular, secure mechanism that uses public-private key pairs for authentication. Each host is associated with a pair of cryptographic keysa private key known only to the host, and a public key that is shared with others. In order to authenticate itself, a host must be able to decrypt (using its private key) a message which has been encrypted (using its public key) by the other party. X.509 Certificates X.509 is an RSA-like protocol, generally considered the most comprehensive and safe authentication method in IPSec. Unlike RSA Keys, X.509 public keys are stored in packages (basically a file) referred to as the X.509 certificate. Along with the public key, information about the certificate owner (e.g. company and department) is also stored in the certificate. To strengthen security and provide flexible management options, X.509 certificates rely on a trustinheritance scheme, where each certificate must be signed by a root certificate (or another upper-level certificate from the hierarchy). With this scheme in place, an outside-user with a seemingly valid certificate cannot bypass the server security check, since the user wouldnt have been able to sign his certificate with a proper upper-level certificate (an outside user simply wouldnt have access to the upper-level certificates). The X.509 authentication method also provides a possibility to declare any certificate invalid, for cases where a certificate is stolen or otherwise compromised. Group authentication Group authentication is used when VPN requires even more security and provides additional layer of authentication by using additional login/password pair and replacing Pre-shared Keys. However, Group authentication is not well-spreaded among IPSec/IKE implementations.
14
With Road Warrior support, where the IP address doesnt help identify the peer and where all dynamic IP end-points must share the same pre-shared key, use of a user based authentication method is strongly recommended. Road Warrior support is not a widely available IPSec standard.
15
16
Part II
Getting Started
17
4
Step 1:
Ensure the software requirements are met.
4.Starting IPSec
This section is designed to help you to activate the software components necessary to use InJoy IPSec. This process involves three simple steps:
Step 2:
Enable the IPSec plugin in the InJoy software.
Step 3:
Verify the IPSec support is loaded.
18
Latest versions of InJoy software automatically stop the built-in Windows version of IPSec, so the above steps are not necessary. Your InJoy product software level must include IPSec support IPSec is an advanced feature, not included in all software levels of the InJoy products. Before you attempt to configure and start InJoy IPSec, ensure your InJoy software is licensed at a level that includes IPSec support.
19
2 New messages should be written to logs/ipsec.log and logs/pluto, indicating the operational status of the IPSec and IKE Server components, respectively. With IPSec and the IKE Server being operational and ready to be configured, you are ready to further study the configuration options and plan your VPN.
20
5.Configuration Overview
This section is designed to help you quickly become familiar with the IPSec configuration, including: GUI tools for IPSec configuration IPSec configuration files and their formats How to activate configuration changes.
In addition to the graphical configuration, IPSec can also be configured through plain-text configuration files, covered later in this chapter.
21
Two templates exist, one configured as a VPN Server/Concentrator and one configured as a VPN Client. The VPN Server is configured to accept connections from both fixed and dynamic IP addresses, even through a NAT Gateway using the NAT Traversal feature. The VPN Server authenticates VPN Clients through a combination of the Preshared Key (a VPN password) and a login based useraccount (user-id and password). You decide which encryption standard to use and specify what network is behind each IPSec endpoint. On the VPN Server you maintain the simple user database and optionally assign a Virtual IP address to the remote VPN Clients directly from the VPN Wizard. The VPN Wizard configuration can be carried out locally or remotely, allowing the network administrator to maintain a complete VPN network from a central location. You should use the VPN Wizard when: The VPN is to use a Client / Server based topology All VPN Clients can share the same overall IPSec/IKE policy Only one internal network exists behind the different VPN end-points Third-party interoperability requirements are minimal
22
The Tunnel Workshop also allows you to edit the VPN Wizard template SAs, or add additional SAs to a VPN already configured through the VPN Wizard. You should use the Tunnel Workshop when: Many different (types of) tunnels must be configured Third party interoperability is of key-importance The VPN Wizard isnt sufficient
23
For simple VPNs that dont make use of RSA Digital Signatures and extended authentication, the network administrator will typically only be changing the ipsec.cnf file. The configuration files in the ipsec directory all follow a common format, where typically only non-default configuration attributes actually need to be specified. Default values for all configuration attributes are loaded from files of similar names in the template directory.
IPSEC.CNF
This is the file that contains the actual Security Associations, for example created or edited using the Tunnel Workshop. The file is made up of one or more configuration records, with one record for every tunnel:
Each individual SA is a comma-separated list which begins with a line containing the SA name and description. The rest of the lines in an SA contain a keyword and a value (option pairs). The keywords in the file are (mostly) similar to those youll encounter while using the Tunnel Workshop and the values are editable by you, the network administrator. The names of the individual records in ipsec.cnf, such as PartnerConnection, are non-significant and only used for logging purposes. For more information about the configuration attributes and their possible values, refer to Appendix D Configuration Attributes.
OPTIONS.CNF
Using a single record, the general options of IPSec are configured in the file options.cnf. Through this file, the IPSec administrator can control autostarting of the IKE Server, size limits of the IPSec log files, SA nesting, and verbose levels. In the file you will see a number of configurable keyword and option pairs. Using these, you can enable the various types of IPSec tracing (including AH
24
or ESP header tracing), alter the IPSec logging level, or decide whether the Pluto IKE Server should be started automatically when IPSec starts or not.
For more information about the configuration attributes and their possible values, refer to Appendix D Configuration Attributes.
VPN-AUTH.CNF
This file contains the server side user accounts (username and password pairs), used by the Authentication Module to perform Extended Authentication (Xauth).
You will see a number of sections related to particular users. Each section begins with a username and contains keyword and value pairs for the users description, password, account status (enable or disable) and inner IP, when applicable. For more information about this file, please refer to Section 16.2, Extended Authentication (Xauth).
25
PLUTO.SECRETS
This file is used only when IPSec is configured to authenticate users via the RSA Digital Signatures protocol. The file holds a table of secrets. These secrets are used by the Internet Key Exchange Server, to authenticate other hosts.
An RSA private key is a composite of eight generally large numbers. The notation used is a brace-enclosed list of field name and value pairs. An RSA private key may be generated by rsasigkey tool. For details on using RSA, please refer to Section 16.3, RSA Digital Signatures.
26
GUI Activation
In the InJoy Firewall GUI, you may activate changes by using the pop-up menu:
27
28
Allows VPN Clients situated behind NAT devices to effortlessly connect to the VPN Server on the Internet without any additional configuration in the remote Firewall/NAT device. When the IPSec Server runs behind a NAT device, simple Firewall redirection rules are required to forward traffic on UDP port 500 & 4500 to the internal VPN Server and no non-standard protocols are used (when NAT-T is enabled). IP Compression Compression of VPN traffic provides increased network bandwidth, modestly enhances security, and saves money. The VPN Wizard enables compression by default. Fixed and Dynamic IP address support The VPN server supports remote VPN Clients with dynamic IP addresses, known as Road Warriors, and also VPN Clients with fixed IP address. 30 minute key life-time Keys are generated every 30 minutes, providing powerful security, while limiting the well-known issues with dead VPN tunnels (e.g. dial-up users who lost the Internet connection) that clutter the monitor windows. The features of the VPN Wizard are pre-configured, but not fixed. The volatile settings (such as passwords, encryption standard and IP addresses) can be easily changed directly in the VPN Wizard dialogs. More complicated VPN Wizard settings (such as NAT-T, IP Compression and Key life-time) can be tweaked in the tunnel workshop retaining flexibility, while eliminating the complexity for beginners. The VPN Wizard relies on standard features, allowing you to find more information about any of its features throughout this manual.
29
The VPN Wizard includes context sensitive on-screen hints at the bottom of each dialog, making it easy for anyone to quickly understand the questions and make the right decisions.
30
6.3.
31
32
Once you click Save and Activate, IPSec will enable your configuration and if you were setting up a VPN Client, a tunnel will be attempted set up with the remote VPN Server.
33
34
On the left side of the Tunnel Workshop, youll see a list of the existing security associations. On the right side of the Tunnel Workshop are the settings that make up the security association.
35
SA Setup
In the SA Setup dialog, you will choose a name and a brief description for the security association you are about to create.
Local End
In the Local End dialog, you will configure the IPSec network interface on the local machine, including: The public IP address for the local interface A private address range for the local network (if any) A network mask for the local network or host
36
The Advanced button in the Local End dialog leads to a sub-dialog that offers you the choice to tunnel using the remote hosts internal IP address, rather than its public IP address.
Remote End
The Remote End dialog is similar to the Local End dialog, but applies to the host on the other end of the IPSec connection. In the Remote End dialog, you will configure the IPSec network properties of the remote machine: The public IP address for the remote interface A private address range for the remote network (if any) A network mask for the remote network or host
37
The Advanced button in the Remote End dialog leads to a sub-dialog that offers you the choice to exclude the remote host itself from this SA and apply your configuration only to hosts within the remote network.
VPN Policy
The VPN Policy dialog allows you configure the IPSec properties of the connection you are creating: Whether to use tunnel or transport mode The type of host authentication to use The type of packet authentication (if any) to use The type of encryption (if any) to use The Advanced button in the VPN Policy dialog leads to a sub-dialog that allows you to enable IP compression, NAT traversal features, aggressive mode negotiation, and other special-needs features.
38
Authentication
The Authentication dialog allows you to configure the host authentication properties for this connection, including: The Pre-shared Key required for all other data exchange The type of host authentication to use A username and password for host authentication
39
The Advanced button in the Authentication dialog leads to a sub-dialog where you can enter additional information required by some types of authenticationfor example, public and private keys for RSA DSS authentication.
40
41
42
IPSec Tunnels Monitor For each active tunnel (SA), the IPSec Tunnels Monitor shows the security association name, the user-id (if any), the local IP address and network, the remote IP address and network, the protocols in use, the time at which the connection was opened and the volume of traffic which has been received and sent.
IPSec Log Monitors The IPSec Plugin Log Monitor, the IPSec IKE Log Monitor, and the IPSec Auth. Log Monitor each display entries made to the logs described in Section 8.3, Logging and Trace Files. The Plugin Log Monitor watches logs\ipsec.log; the IKE Server Log Monitor watches logs\pluto.log; the Auth. Log Monitor watches logs\vpn-auth.log.
The IPSec Plugin Log, showing a new SA being installed for a remote user.
43
IPSec Logging
The logs\ipsec.log file contains messages related to the IPSec engine and the various IPSec-related modules described in detail in Section 8.1, Basic Architecture. Each one-line entry in the logs\ipsec.log file contains a number of fields: Time of event or time of entry. Category, one of Warning, Error or Internal Error. When no category is given, the entry is simply a status or informational message. Name of related security association. Logged event or message. The logs\pluto.log file contains messages related to the Pluto IKE Server and Internet Key Exchange, as well as aspects of authentication which are managed by the IKE Server. For details on the format of this file, please refer to the Pluto IKE Server documentation. The logs\vpn-auth.log file contains messages related to Extended Authentication (Xauth) attempts from remote hosts.
44
When log files reach their maximum size, they are deleted.
A transform is composed from 4 values separated by semicolons. Possible values include: Encryption: AES-256 (256-bit AES), AES-192 (192-bit AES), AES (128bit AES), BF (BlowFish), 3DES (Triple DES), DES. Data Authentication: MD5, SHA1. Client Authentication: PK (Pre-shared keys), RSA (RSA Signatures).
45
Diffie-Hellmann Group: DH1 (768 bits), DH2 (1024 bits), DH5 (1536 bits).
Notice the notation: Networks are separated by spaces and wildcards can be used in the network addresses (only the * wildcard is supported). As a security consideration, be sure to use this feature carefully, as the traffic matching the Direct-Nets is sent in the clear.
46
The smallest datagram size in the path is called Path MTU and the process of identifying the Path MTU is called Path MTU Discovery. Because InJoy IPSec is built on top of TCP/IP and not inside the kernel, InJoy IPSec requires additional setup for Path MTU Discovery to work as intended. By default, Path MTU Discovery is turned on in the options.cnf, and its operation is transparent to TCP/IP stack and user.
8.10.Limitations
The InJoy IPSec implementation is a powerful, flexible software product designed to protect your network and keep your data private. There are, however, several limitations to be aware of as you use InJoy IPSec: Applications which require broadcast or multicast support will not work with IPSec. IPSec works only with TCP/IP traffic; other types of network traffic can not be secured using IPSec. A maximum of 1000 security associations (tunnels) are supported. More tunnels are possible with specially compiled versions. Only one instance of InJoy IPSec can operate on any one computer, regardless of the number of network interfaces.
47
Part III
Setting up a VPN
48
Step 1:
Preliminary planning and decision-making.
Step 2:
Identifying VPN participants (endpoints and networks).
Step 3:
Choosing specific IKE and IPSec policies.
Step 4:
Choosing which IPSec extensions to use.
This section is intended to provide you with background information about IPSec options, along with answers to common IPSec deployment questions. After reading this section, you should be able to make good decisions about the IPSec-related security architecture of your network. If you are setting up a small-business VPN or a simply need to hook up two PCs securely, the information in this section will be helpful, but it should not be considered required reading. For an easy start, instead refer to section 6, Using the Quick VPN Wizard.
49
headaches when used with third-party products or large numbers of independent remote users. For these reasons, the first step in building your VPN is make two simple lists: A list of the resources and communications in your business which must be protected, and related networks or hosts A list of users which must be given secure access to these resources and communications, and related networks or hosts Under most circumstances, you will deploy your VPN with respect to these two liststhereby avoiding, if appropriate, the use of extra processing, bandwidth, and administration resources on hosts where IPSec just isnt needed.
50
VPN Client / Server tunnels are the obvious solution when remote VPN clients need central authentication, if there are many VPN hosts, and when some remote IPSec hosts use dynamic IP addresses (i.e. IP addresses are only known by the central VPN Gateway, to which the VPN clients login). To communicate with other hosts, client machines in the private network first connect to the VPN Gateway, then route traffic through it. This allows a large number of SAs often a mix of hosts, networks, and users with a variety of access policiesto be managed from a single, central location. Furthermore, rather than needing to know the address of every client or user that requires a secure connection, all a client needs to know is the address of the VPN server responsible for routing secure traffic. Notice in the figure below, how remote VPN nodes can only communicate through the VPN Gateway.
51
Head Office
(VPN Gateway)
VPN Node
VPN Node
Note: IPSec is a flexible protocol and even if you initially decide to use a VPN Server, then you can easily add peer-to-peer security associations at a later stage effortlessly mixing the two technologies. How is IPSec tunnel negotiation handled? In general, whether your network is organized primarily as a peer-to-peer network or as a centrally served network, any host will be able to open a secure IPSec connection whenever it needs to communicate to another host. The important exception to this rule is the Road Warrior, or any IPSec host that uses dynamic IP addresses. When dynamic addresses are used, only the dynamic client is able to make an initial connection request. IKE negotiation is automatically triggered at a number of different times: As the host is booted, if you have configured IPSec to remain connected on a permanent basis. Whenever tunnel synchronization problems occur. When the firewall GUI or command line tools like ipsec.exe or sync.exe are used to restart various InJoy components. When a client is assigned a new IP address via DHCP. When the remote host IP resolves to a new address (if a DNS name is specified). Can I avoid routing Internet traffic through my VPN server? In practice, most network clients will communicate both with your proprietary resources (which should be secured using IPSec) and with the public Internet, for things like Web browsing or streaming media. Communication with the public Internet obviously does not need to be routed through an IPSec server; in fact, doing so can unnecessarily tax computing and network resources. To eliminate this waste, you can use split tunneling to connect the host to the networktraffic that is destined for other hosts on your internal network will
52
be routed through your VPN server, while traffic destined for the public Internet is routed through your standard Internet gateway.
Split Tunnelling
VPN end-point
VPN end-point
Internet Host
(Web server)
There are cons to using split tunneling as well, however. Clients who route all network traffic through a VPN server are less susceptible to attack. The VPN server also provides a forum for logging clients traffic and connection requests, a feature which can be very useful in business contexts.
53
setups with many Road Warriors should pay extra attention to the choice of the authentication method. In general, you should use one of the other authentication methods in addition to mandatory Pre-shared Keys to ensure a reasonable level of trust between authenticated hosts. What are the pros and cons of RSA signatures? RSA signatures provide one of the most secure forms of host authentication that can be used with IPSec. This form of authentication uses two keys, a public key and a private key, to verify the identity of a host. Data is encrypted with a hosts freely available public key; in order to be trusted, the host must then be able to decrypt the data (which can only be done with the hosts private key) and return it intact. RSA signatures also offer another benefitthe ability to uniquely identify a host based on their public key. This allows security associations to be build for hosts whose IP addresses are not known or are subject to change, as is often the case with Road Warriors. Unfortunately, while RSA signatures are very secure, they are also somewhat difficult to manage, requiring: Use of an additional command (rsasigkey.exe) to generate public and private key pairs for each host Manual editing of the IKE Servers pluto.secrets file A trusted system for distributing public and private keys to hosts before they can be authenticated What are the pros and cons of X.509 certificates? X.509 is the most technology advanced and safe private-public key-pair authentication and encryption model. It is widely available in most IPSec solutions and by using signed certificates rather than just the key-pairs themselves, it represents a significant improvement over RSA signatures. Further, in addition to RSA signatures, X.509 certificates can be easily revoked on the certificate revocation list, thus making the authentication server reject a user with that certificate. X.509 certificates make it easier for administrators to uniquely identify users, because an ID and other relevant information about the user are embedded in every certificate. X.509 certificates can be managed more flexibly than RSA signatures, since they reside in individual files and their generation/management can be fully automated with certificate management software. The flexibility comes at a cost though. X.509 in medium sized installations might introduce more overhead and administration than the added security might justify. What are the pros and cons of extended authentication? Extended authentication employs a user ID and password to authenticate each new IPSec connection. Because it requires two identifying pieces of information, rather than just one, extended authentication is somewhat more secure than Pre-shared Key authentication.
54
You can also configure extended authentication to prompt for username and password information when new VPN connections are negotiated; this reduces the possibility that a stolen or lost laptop could compromise your VPN. In addition, X-authentication provides the additional benefit of login audit logs and as it integrates well with the IPSec configuration-mode protocol, it also allows the central VPN Gateway to assign internal IP addresses to remote VPN clients. These are features that help ease the day-to-day management of the VPN, as well as administration of the corporate network services. Overall, Extended Authentication provides an excellent balance between high security authentication and easy manageability. For the same reason it is recommended for the common VPNs that have strict, but not very high-grade authentication needs. What are the pros and cons of data encryption? Data encryption provides security beyond mere host authentication. The Internet is a packet-switched network; traffic between two hosts often passes invisibly through any number of other hosts on its way. Even when you know that a remote host can be trusted, you can rarely be sure that every host between you and that remote host can be trusted as well. Data encryption solves this potential security problem by making the data being sent unreadable to everyone but the sender and receiver. IPSec supports several types of encryption, refer to Section 3.2, Encryption Methods for details. Can I use these together for maximum trust and security? In short, yes. When you need maximum security and a high level of trust between hosts, you can pick freely among the authentication methods and the encryption standards. For authentication, these combinations are supported: Pre-shared Keys (by itself) RSA signatures (by itself) X.509 certificates (by itself) Pre-shared Keys + Extended Authentication RSA signatures + Extended Authentication X.509 certificates + Extended Authentication Any of the available encryption standards (e.g. 3DES) can then be used in conjunction with the chosen authentication method.
55
What precautions can I take against problem VPN users? When you give IPSec tunnel access to a remote user, it is as though you have given them access to a workstation in your LAN. You should therefore apply any security checks or considerations to IPSec connections that you would to users or employees who work onsite. Because the InJoy Firewall includes a number of rules designed specifically to interoperate with InJoy IPSec, you can and should use the InJoy Firewall to control access to your VPN server or other hosts in your VPN. Should I limit access to my VPN? You should avoid giving anyone access to your internal network who does not absolutely need to access it; this includes users who connect via IPSec. IPSec excels at preventing attacks and data theft from unknown parties; IPSec can not, however, protect you from users to whom youve explicitly given access.
How can I access all of InJoys features across platforms? Because the InJoy software represents a truly multiplatform solution, including versions for OS/2, Windows 2003/2000/XP, Linux and FreeBSD, you can use InJoy IPSec to access all of these features across multiple platforms, bridging legacy and future systems under a single administrative and compatibility umbrella.
56
57
58
Many network appliance platforms support only Aggressive Mode negotiation. If you will be using devices of this type with InJoy IPSec, you may need to opt for Aggressive Mode instead. Note also that in noisy or low-grade physical networks environments, excessive IPSec connection re-establishment or renegotiation can occur. Under these circumstances, Aggressive Mode may provide measurably better performance.
59
60
Plan to offer Inner-IP if you need to unify a network of disparate or dynamic IP addresses under a single private sub-networks umbrella.
61
10
Step 1:
Initial VPN planning and considerations.
Step 2:
Head Office VPN Server configuration.
Step 3:
VPN Client configuration.
Step 4:
Verify VPN operation.
62
Road Warrior
(Dynamic IP) Inner-ip: 10.1.4.104
Softdev.com
Partner Office
10.1.4.10
192.168.1.10
Softdev.com
12.154.175.1 192.168.1.11
10.1.4.11
Road Warrior
(Dynamic IP) Inner-IP: 10.1.4.105
To easily monitor VPN use on a per user basis, Softdev.com opts for Extended Authentication (Xauth) for all remote hosts. All connections will be tunneled connections; the remote employees will be assigned an Inner-IP and will use IP compression as well.
63
Partner Company SA
The network administrator steps through each dialog, creating a security association for the partner companys gateway. After completing each dialog, he clicks Next to continue to the next one. Softdev.coms network administrator begins by entering an easy-toremember name and a description to the security association hes about to create.
Having entered the SA Name and the Description, he clicks Next to proceed to the Local End configuration.
64
In the Local End dialog, the network administrator selects My_IP as the local host, 10.1.4.0 as the local network, and 255.255.255.0 as the local netmask.
65
In the Remote End dialog, the network administrator enters the host address of the partner companys gateway, 12.154.175.1, as the remote host. The remote net and remote netmask are then set to 192.168.1.0 and 255.255.255.0, accordingly.
In the VPN Policy dialog, he configures for tunnel mode, without authenticated headers, using the more secure 3DES cipher and he selects this end-point can initiate IKE-negotiations.
66
Finally, in the Authentication dialog, the network administrator enters P4rtnerP4ssWD as the Pre-shared Key; the partner companys gateway must also know this word in order to connect. He also enables Xauth (server side) as an additional authentication method.
67
By entering and saving these values, the Softdev network administrator creates an Xauth login for the partner company without assigning it an InnerIP address. The security association for the partner companys gateway is now ready to be used on the VPN server. To limit the number of screen-shots, additional user accounts created throughout this chapter will be shown only as sections from the respective configuration file: ipsec\vpn-auth.cnf. Configuration File Details The Tunnel Workshop configuration steps described above resulted in the following new section in the SA configuration file: ipsec\ipsec.cnf:
PartnerConnection Description = "IPSec VPN to our partner!" Local-IP = "My_IP", Local-Net = "10.1.4.0", Local-Mask = "255.255.255.0", Remote-IP = "12.154.175.1", Remote-Net = "192.168.1.0", Remote-Mask = "255.255.255.0", ESP = 3DES, Auth-Type = Server-Xauth, Preshared-Secret = "-50488a009e099a34d42fab0394"
Note that the Pre-shared Key doesnt appear as it was entered because it has been encrypted. Also note that only values that differ from the default values found in template\ipsec.cnf are actually stored in this file.
68
The User account information is stored in the file ipsec\vpn-auth.cnf and the user account entered in the above section resulted in this new section:
SoftdevPartner Password = "-8po3AdlfmFUUArOXFprNz0" Description = "Our partner company"
Because the administrator completes the local end dialog using precisely the same information he used when creating the partner company SA, the screen shot is omitted here. In the Remote End dialog, things have changed.
69
The remote employees are Road Warriorsthey are dial-up ISP users and their single-host IP addresses are likely to change on a regular basis. Because of this, Softdev.coms network administrator selects the "Road Warrior and "No Remote Net.
70
The VPN policy for the employees is similar to the policy used for the partner company connection, with one exception: because Road Warriors IP addresses change and their connections go up and down, the VPN server cant initiate IKE negotiation. This feature is disabled (unchecked) by the network administrator. The network administrator now clicks on the Advanced button in the VPN Policy dialog, in order to access advanced VPN policy options.
71
Because the employees use slow dial-up lines, it is helpful to mitigate the overhead imposed by IPSec. This is done using IP compression, which can at times significantly increase throughput. Aggressive mode is left disabled for this connection, since the employees will be using main mode negotiation.
72
The network administrator chooses a slightly different Pre-shared Key (3mploy33P4ssWD) for the employee connections.
KPeterson
Note that each of these employees is also assigned a virtual inner IP number in the VPN servers local network, to avoid the need to manage the employees dynamic IP addresses. Configuration File Details The Tunnel Workshop configuration steps described above add the following lines to the SA configuration file ipsec\ipsec.cnf:
RemoteEmployee Description = "IPSec VPN to our employees!" Local-IP = "My_IP", Local-Net = "10.1.4.0", Local-Mask = "255.255.255.0", Remote-IP = "0.0.0.0", Reinit = No,
73
Once again, the Pre-shared Key doesnt appear as it was entered because it has been encrypted.
The partner network administrator selects My_IP as the gateways host address and enters the local network address range, 192.168.1.0 with a netmask of 255.255.255.0, as the local net. This will allow his internal workstations in the 192.168.1.x address space to transparently access workstations at the corporate headquarter and work-stations within the headquarter can transparently access the work-stations behind the partners VPN gateway. Remote End Dialog
Remote Gateway/Host Remote Net Remote Netmask softdev.com 10.1.4.0 255.255.255.0
In the Remote End dialog, the partner companys network administrator enters softdev.com as the Softdev.com VPN server. This assumes that softdev.com will correctly resolve to the appropriate public IP address of Softdev (resolving softdev.com to an IP address happens automatically at run-time). VPN Policy Dialog
74
Initiate IKE is enabled to allow both ends of the IPSec connection to initiate VPN negotiations. VPN Policy Dialog (Advanced)
ISAKMP Key Lifetime IPSec Key Lifetime IP Compression NAT Traversal Aggressive Mode SA Cleanup 3600 28800 No Auto No (unchecked) No (unchecked)
The VPN policy and advanced VPN policy options chosen by the partner companys network administrator match the options chosen by Softdev.coms network administrator for this connection. This ensures that the Softdev.com VPN server and partner company gateway will be able to connect using IPSec.
Authentication Dialog
Pre-shared Key Authentication method User ID Password P4rtnerP4ssWD Client-Xauth SoftdevPartner 2ndP4ssWD
The partner companys network administrator enters the Pre-shared Key assigned by the two companies for this connection. He selects Xauth (in client mode) as an additional authentication method, since Softdev.com requires it, and enters the user ID and password assigned by Softdev.com for this connection.
75
The partner companys security association for Softdev.coms VPN server is now complete and the connection is ready to be used!
76
SA Description
"IPSec to Softdev.com!
In the Local End dialog, the employees configure the local host as Road Warrior and the local net as No Local Net since each of them is only a single dial-up host. Remote End Dialog
Remote Gateway/Host Remote Net Remote Netmask softdev.com 10.1.4.0 255.255.255.0
The employees configure the Remote End dialog using the same values used by the partner companys network administrator: softdev.com as the host name of the Softdev.com VPN server, and Softdev.coms network information, 10.1.4.0 with a netmask of 255.255.0.0. VPN Policy Dialog
Mode Auth. Header Encryption Initiate IKE negotiations Tunnel No 3DES Yes (checked)
The VPN policy and advanced VPN policy options used by the employees match the options chosen by Softdev.coms network administrator for the Road Warrior connections, with one exception: for the employees configurations, the Initiate IKE negotiations box is checked, since these are Road Warrior client machines. Authentication Dialog User: CJanssen
Pre-shared Key: Authentication method: User ID: 3mploy33P4ssWD Client-Xauth CJanssen
77
Password:
User: KPeterson
The Pre-shared Key used by the employees is the one assigned by Softdev.com. The employees both choose to use Extended Authentication (Xauth) as clients, each one entering his own user ID and password in the related boxes. Once each of the employees has finished filling out the dialogs in the Tunnel Workshop, the Road Warrior IPSec connections are ready to go.
78
final step before taking their VPN livethey test their connections to one another, ensuring that they can ping one another in both directions and transfer sizable amounts of data without errors. 2 Once this has been done, Softdev.coms network administrator activates the IPSec configuration, by reloading the IPSec configuration. 3 The partner companys network administrator and the remote employees activate their IPSec configuration. The IPSec link between Softdev.com and its partner company is now live. The employees, too, can now connect at will; each time either of them connects to the Internet with the InJoy software running, they will have a route through a secure IPSec link to the hosts in Softdev.coms internal network.
79
Part IV
Advanced Features Guide
80
11
Key Benefits
Road Warrior support provides a number of key benefits to network administrators. Dynamic IP Address Support InJoys Road Warrior support allows you to create SAs for use with any IP address that is not known in advance, whether dynamic or static. By combining Road Warrior support with Extended Authentication, you can associate IPSec connections with particular users, rather than particular public IP addresses. Static Inner-IP Support (Virtual IP) InJoys Road Warrior support also provides Inner-IP capability, which allows you to assign connecting hosts a virtual IP address inside the local network, greatly simplifying administration tasks. Blanket Security Association Support A single Road Warrior SA can manage connections from multiple public IP addresses. This provides the ability to create one blanket SA that can be used with all client connections to a given VPN server.
81
To enable Road Warrior support using the ipsec\ipsec.cnf configuration file, set either the Local-IP or Remote-IP keyword to a value of 0.0.0.0. Recall the VPN server SA for remote employees from Section 11, for example:
RemoteEmployee Description = "IPSec VPN to our employees!" Local-IP = "My_IP", Local-Net = "10.1.4.0", Local-Mask = "255.255.255.0", Remote-IP = "0.0.0.0", << Specifies Road Warrior Reinit = No, Auth-Type = Server-Xauth, IP-Compression = Yes, Preshared-Secret = "-331188189f15db57b068ab278708"
Client-only Initiation
Because a Road Warriors public IP address is not known in advance and because many Road Warriors have intermittent physical connections, the VPN server cannot initiate Road Warrior IKE negotiations. All Road Warrior IKE negotiations must be initiated by Road Warrior clients.
Connectivity/Compatibility Limitations
In order for a Road Warrior connection to be established, the VPN server must support Road Warrior SAs. Therefore, an InJoy Road Warrior client can connect to a given VPN server only if the server in question supports Road Warriors. Note that an InJoy VPN server can accept connections from IPSec clients on dynamic IP addresses even if the client software doesnt explicitly support Road Warriors, so long as the client is careful to reflect the ISP assigned IP address at all times (i.e. the client must update its own configuration with
82
every ISP reconnect). For further details about compatibility with specific third-party vendors, please refer to the IPSec Interoperability Guide documents.
11.3.Operational Details
Before using InJoys Road Warrior support, you should familiarize yourself with a number of Road Warrior operational details.
VPN Gateway
Road Warrior
(With subnet)
To properly utilize this support, the VPN Gateway must be configured with a common Road Warrior SA that defines a Remote Network of appropriate proportions; i.e. with enough addresses to allow the remote Road Warriors to define their own subnets within this master network. Because traffic destined for a particular RW subnet will be routed only to the first IPSec run-time tunnel associated with the subnet, Road Warriors should use unique subnets. For an example of how Road Warrior clients with subnets can be configured, refer to the Road Warrior Scenario Road Warriors with Subnet.
83
Security Implications
The use of Road Warrior connections in conjunction with NAT traversal is associated with a set of additional security implications which must be considered. For details on the use of Road Warrior connections with NAT traversal, please refer to Section 13, Using IPSec behind NAT.
84
The VPN Gateway SA specifies the Remote Net as 10.0.0.0 / 255.0.0.0, while RWs clients allocate portions of that network. For example 10.0.1.0 / 255.255.255.0.
VPN Gateway
217.39.43.22
10.0.1.2
10.0.2.2
85
An IP address that is exchanged manually among the involved parties (i.e. the dynamic IP address). The second approach is acceptable when the dynamic IP address change very rarely, which is the case with certain Internet Service Providers.
86
12
12.1.Introduction to Inner-IP
Inner-IP is a feature that allows the VPN administrator to assign a virtual IP address (a Red Node IP) to any connecting IPSec client. This address: Must be assigned at connect time (using the SA configuration for the connection in question) Can be used to refer to the host instead of the hosts external public IP (or Black Node IP) address
Key Benefits
The use of Inner-IP addresses provides several key benefits to IPSec network administrators. Ease of Administration Connected IPSec hosts which have been assigned an Inner-IP can be managed using the Inner-IP. This greatly simplifies the administration tasks faced by network administratorsall addresses on the VPN can fall within a single, unified internal address range. Increased Security Because Inner-IP can be assigned on a per-user basis using Extended Authentication, security policies can also be created and enforced on a peruser basis. Because the blanket use of Inner-IP addresses creates a unified internal address range for all remote hosts, network administrators can create a simpler firewall policy - based on IP addresses. Policies involving a single address range are both less prone to error and more robust than security policies or rulesets involving multiple disparate address ranges which may pass across or through any number of networks or gateways.
87
KPeterson
Inner-IP Routing Implications Because the Inner-IP feature uses NAT to change the public IP address of a remote VPN host, it is important to consider the possible routing implications. To illustrate the most common routing pitfall, envision a head office network where all traffic destined to public IP addresses is default routed to the designated VPN Gateway PC. The VPN Gateway PC then handles the traffic according to the IPSec SA database and ensures IP packets are correctly distributed to the various remote VPN Clients. This is a very common setup and a normal routing configuration. In contrast, now envision a scenario where Inner-IP is used. Traffic from a remote VPN host is tunneled into the head office network with a local source IP address of e.g. 10.0.0.1 (the Inner-IP). When reply traffic is generated to 10.0.0.1, it may appear local and accordingly wont be routed to the head office VPN Gateway. The result could be routing havoc and the remote VPN Client would never see its reply traffic. The solution to this problem is trivial. As the IPSec network administrator, you must generally consider whether reply packets to incoming VPN traffic will appropriately be routed back to the VPN Gateway, and thereby be given the opportunity to be routed back out to the remote VPN hosts. An important notice in this regard, is to carefully plan in advance, which IP address segments that are to be used in the different VPN locations. By simply avoiding conflict in the VPN subnets and by routing all non-local traffic to the VPN Gateway, routing problems are generally avoided.
12.2.Inner-IP Limitations
There are a number of limitations to be aware of when using the Inner-IP features of the InJoy software.
88
12.3.Operational Details
Inner-IP uses Network Address Translation (NAT) on IPSec packets before transformation by AH or ESP. NAT works backward in this case when compared to traditional NAT in that addresses are being translated from public to private for routing, rather than vice-versa, in order to provide a more convenient IP address for administrative and security tasks.
Related Documents
InJoys Inner-IP implementation is based on the following IETF draft documents: draft-ietf-ipsec-isakmp-xauth-02.txt draft-ietf-ipsec-isakmp-mode-cfg-05.txt
89
address on the internal network, greatly simplifying network and security administration.
Head Office
Road Warrior
Public IP: 195.157.114.51 Virtual IP: 10.1.1.1
VPN Gateway
Road Warrior
Public IP: 217.145.220.155 Virtual IP: 10.1.1.2
Road Warrior
Public IP: 204.48.119.37 Virtual IP: 10.1.1.3
90
13
Key Benefits
InJoys NAT-T support provides two key benefits to IPSec network administrators. IPSec through NAT NAT-T allows IPSec to function through NAT gateways or hosts, removing the necessity for network reorganization of any kind before strong security can be added. Administrative Transparency NAT-T requires little configuration or monitoring on the part of the network administrator. When enabled, NAT-T will automatically detect NAT devices in the IPSec transmission path and adjust for them accordingly, making NAT-T a nearly transparent feature from use or administration perspectives.
91
In the configuration files, the absence of a NAT-Traversal keyword for a particular security association indicates that NAT-T is enabled and will function as necessary (automatically). To explicitly disable NAT-T for a particular Security Association, set the value of the NAT-Traversal keyword to No as shown below:
NAT-Traversal = No
92
4 Packets routed over the network between endpoints. 5 The NAT-T-aware receiving endpoint detects NAT-T traffic, deencapsulates it, then processes it accordingly at the application layer. NAT-T relies on the IKE port (500) for actual transmission of NAT-T encapsulated packets.
13.3.NAT-T Limitations
There are several limitations and issues to be aware of when using NAT-T on your VPN.
Reduced Security
Because Authentication Header (AH) transforms actually authenticate packet headers as well as packet payloads, and because NAT-T provides a mechanism by which packet headers can be modified in transit, AH and NAT-T do not function together; NAT-T operates only on ESP-transformed packets. Because of this authentication deficiency, the trust level between hosts using NAT-T is greatly reduced; NAT-T should not be used when the greatest level of host-based authentication is required.
The important rule of thumb in this regard is to ensure that the IP address of the NAT-T client is included in the Remote-Net on the VPN Gateway and included in the Local-Net on NAT-T client. Another variant of letting the VPN server to define original internal IP address of the NAT-T client is defining generic net/mask on the client and afterwards assigning Inner IP addresses through Extended Authentication (XAUTH). This would require specifying Inner-IP attribute in vpn-auth.cnf on the server side:
93
94
14
14.1.Introduction to IP Compression
IP compression (IPComp) is a protocol used to apply data compression to IP packet payloads. This provides network users with two main benefits: Reduced network bandwidth utilization Increased overall network throughput These benefits come at the expense of the increased CPU processing overhead required to apply common compression algorithms to a stream of network data. Two compression algorithms, Deflate and LZS, are supported by InJoy IPSec. While the Deflate algorithm is able to achieve better compression than LZS by a typical 10-20% margin, Deflate is considerably more computation-intensive, requiring two passes to compress each data set.
Standards Documents
IPComp is defined and detailed in the following Request for Comment (RFC) documents: RFC 3173IP Payload Compression Protocol (IPComp)Proposed Standard (2001) RFC 2393IP Payload Compression Protocol (IPComp)Proposed Standard (1998) RFC 2394IP Payload Compression Using DEFLATEInformational RFC 2395IP Payload Compression Using LZSInformational RFC 3051IP Payload Compression Using ITU-T V.44 Packet Method Informational
LZS licensing
The company Hi/fn, Inc. holds several patents related to the LZS compression algorithm. For this reason, potential users of LZS must purchase a valid license from Hi/fn, Inc. before deploying solutions which make use of the LZS compression method.
95
Because of this licensing requirement, shipped versions of the InJoy software do not include the LZS compression code. Contact F/X Communications if you wish to obtain a license to use LZS with the InJoy software.
Enabling IPComp
IPComp can be enabled for a particular security association using the VPN PolicyAdvanced dialog in the Tunnel Workshop. This dialog can be reached by clicking the advanced button in the VPN Policy dialog.
96
For details on using the Tunnel Workshop to configure security associations, please refer to Section Section 5, Configuration. IPComp can also be enabled in the ipsec\ipsec.cnf file by adding the IPCompression keyword to a security association, along with one of Yes, No, Deflate, LZS or Auto as a value:
IP-Compression = Deflate
97
15
98
99
If only ESP is being applied, the lengths include both encryption and authentication keys in unified strings: 24 characters (or 48 hex digits) for DES + MD5 ESP 28 characters (or 56 hex digits) for DES + SHA ESP 40 characters (or 80 hex digits) for 3DES + MD5 ESP 44 characters (or 88 hex digits) for 3DES + SHA ESP Keys must be enclosed in quotes and unbroken on a single line (i.e. without embedded carriage returns).
100
16
16.1.Pre-shared Keys
Pre-shared Key authentication is the most fundamental type of host authentication, and is supported by every IPSec implementation.
Introduction
Pre-shared Key authentication is simply the secure exchange and verification of a text secret, or password, which has been shared in advance and is known to both hosts. When each host has verified that the other host knows the secret, both hosts are considered to be authenticated to one another and the negotiation for the IPSec connection proceeds. Other authentication methods, with the exception of RSA Signatures, may be used in addition to Pre-shared Key authentication, in order to achieve more robust authentication.
Limitations
Pre-shared Key authentication is much less secure than other types of authentication used with IPSec for several reasons: Only a single, generally brief text secret is needed for authentication; such a secret is easily remembered and communicated through any number of channels. The secret is in no way related to the hosts IP address, users, or any other identifying features; any host that can provide the secret can be authenticated. In many IPSec implementations (though not in InJoy IPSec), the text secret is stored in cleartext in configuration files, easily retrievable by users under some circumstances.
101
In order for both endpoints to know the secret in advance of IPSec communication, the secret must at some point be communicated from endpoint to endpoint, either electronically or by human contact. Often, this exchange is insecure or can be intercepted by third parties. Because all Road Warriors associated with a VPN server use a single template security association, all Road Warriors must also use the same Pre-shared Key, meaning that a Road Warrior key may be known by a large number of people. Pre-Shared Keys are limited to 30 bytes in length. Because of this laundry list of security issues, the use of Pre-shared Key authentication as the primary (i.e. only) host authentication method is only recommended when authentication security is of low priority.
Configuration
The Pre-shared Key for a particular SA can be entered using the Authentication dialog in the Tunnel Workshop. This is the preferred method for entering Pre-shared Keys, since the Tunnel Workshop will automatically encrypt the key before storing it in the configuration file for security. For general information on using the Tunnel Workshop to configure authentication for SA, please refer to Section 5, Configuration. Pre-shared Keys can be configured in the ipsec\ipsec.cnf file using the Preshared-Secret keyword:
IPSecClient Description = VPN client using Pre-shared Key Local-IP = 0.0.0.0, Remote-IP = vpn.mycompany.com, ESP = 3DES, Preshared-Secret = 4pplesN0r4nges
Introduction
Xauth requires that the VPN client supply two pieces of identifying materiala username and a passwordto the VPN server in order to be authenticated. This allows multiple users to be associated to a single host, each one supplying unique authentication material in order to connect.
102
Xauth also allows user-based authentication from a pool of Road Warriors. By assigning Inner-IP addresses to such connections, it also provides the ability to create user-specific firewall rules and perform other types of security filtering based on internal IP addresses.
Head Office
Road Warrior
UserID: Peter Password: poh456
Road Warrior
UserID: Julie Password: nof102
Road Warrior
UserID: Benjamin Password: ktl274
Limitations
The Pluto IKE Server implements only version 2 of the IETF draft standard. Only the Inner-IP capability of Configuration Mode is supported. Aspects of Configuration Mode not supported include: Domain Name Service (DNS) assignment WINS resolution assignment Note also that support for Xauth among vendors is somewhat limited because of Xauths status as a draft-only standard.
Configuration
The Xauth authentication method for either client-side Xauth or server-side Xauth can be selected in the Authentication dialog in the Tunnel Workshop. If client-side Xauth is selected, the Authentication dialog also accepts the Xauth username and password information for the security association.
103
This Authentication dialog is the preferred method for entering client-side Xauth username and password information, since the Tunnel Workshop will automatically encrypt the password before storing it for security.
For general information on starting and using the Tunnel Workshop to configure Xauth for security associations, please refer to Section 5, Configuration. Xauth can also be configured directly in the ipsec\ipsec.cnf file using the Auth-Type keyword and specifying Client-Xauth for client-side Xauth or Server-Xauth for server-side Xauth, respectively. Username and password pairs for client-side Xauth are stored in the ipsec\ipsec.cnf configuration file as well:
IPSecClient Description = Road Warrior Xauth VPN client Local-IP = 0.0.0.0, Remote-IP = vpn.mycompany.com, ESP = 3DES, Auth-Type = Client-Xauth, User-Id = User, Password = P4ssword, Preshared-Secret = -331188189f15db57b068ab278708
For server-side Xauth, username and password pairs do not appear in the ipsec\ipsec.cnf SA. Instead, enter valid Xauth username and password pairs in the ipsec\vpn-auth.cnf file using the following format:
User Password = P4ssword, Inner-IP=inner.ip.address.here
104
In each entry, replace User with the username and P4ssword with the password for the user in question. If applicable, supply an Inner-IP address for the user using the Inner-IP keyword, or use empty quotes () to indicate that no Inner-IP address should be assigned. If the User-ID a Client-Xauth security association is set to prompt, the user of the host will be prompted to supply this information at connect time.
This is the recommended configuration in high-security situations, since it removes the need to store User-ID or password information in text files. Note: the User-ID and password prompting is a feature specific to InJoy and it will not work with third-party IPSec solutions. Encrypting Xauth Passwords for Storage Though Xauth passwords can be stored in ipsec\ipsec.cnf or ipsec\vpnauth.cnf in cleartext, as is shown in the example above, it is strongly recommended that you encrypt Xauth passwords after saving them in configuration files. This can be done using the ipsec utility program, supplying -password as an option, followed by the username, the desired password, and the name of the configuration file as arguments: ipsec.exe -password User P4ssword vpn-auth.cnf The command will replace the associated cleartext password in the configuration file with an encrypted version of the same password for more secure storage. To generate a password to be shown on the screen, use these arguments: ipsec.exe -password P4ssword
Introduction
In order to authenticate itself using RSA DSS, a host must be able to decrypt (using its private encryption key) a message which has been encrypted (using its public encryption key) and then sent by the other endpoint.
105
In order for a connection to be negotiated, both hosts must be able to authenticate themselves to the other endpoint, meaning that each host must have the other hosts public key. This authentication technique is more secure than Pre-shared Key or Xauth authentication methods because the secret information a host must use to authenticate itself (its private encryption key) never needs to be communicated to any other host or individual. Unlike the secrets used in Pre-shared Keys or Xauth, a hosts private encryption key is indeed a secretit is known only to the host itself. A hosts public encryption key, on the other hand, can be circulated to any other necessary endpoint without needing to rely on the propriety of the endpoint for maintaining security. Because of its flexible key-based architecture, RSA DSS authentication is better able to support multiple network identities than other authentication methods.
Limitations
A few IPSec vendors may not support RSA DSS authentication.
Configuration
Configuration for the use of RSA DSS for authentication between two hosts involves the following steps: 1 Generating public and private keys for each host. 2 Exchanging public keys between hosts. 3 Inserting each remote hosts public key into the SA in ipsec\ipsec.cnf. 4 Inserting each hosts private key into the IKE Servers PLUTO.SECRETS file. Because these steps are somewhat involved, they are documented in detail in the following sections. Generating Key Pairs On each host, a public and private RSA key pair must be generated. This is done using the rsasigkey command, which accepts the number of signature bits as an argument. A full discussion of RSA DSS technology is beyond the scope of this document; 1024 represents a good starting value for keys of this type. To generate a 1024-bit signature and save it to a file called rsakey.txt, issue the following command: rsasigkey.exe 1024 > rsakey.txt This file will contain a number of comment lines and a large amount of data, and will be formatted as follows:
106
# RSA 1024 bits localhost Tue Mar 4 12:24:34 2003 # for signatures only, UNSAFE FOR ENCRYPTION #pubkey=0sAq0JftKCCixNBok62JPKDp+zIR/R9SqmQlmpBi #IN KEY 0x4200 4 1 AQ0JftKCCIxNBok62JPKDp+zIR/R9Sq # (0x4200 = auth-only host-level, 4 = IPSec, 1 = RSA) Modulus: 0x897ed282088c4d06893ad893ca0e9fb3211fd1f PublicExponent: 0x03 # everything after this point is secret PrivateExponent: 0x16ea786b016cb78116df2418a1ad1a9d Prime1: 0xeb68c0fbc15ac4aad9f12aa635a0faa2f5afb26073 Prime2: 0x958599132dc8fba2ad1695db77a7d041d280dedf Exponent1: 0x9cf080a7d63c831c914b751c423c0a7174e75 Exponent2: 0x63ae660cc930a7c1c8b9b93cfa6fe02be1ab3f Coefficient: 0x6f977d547341741b37ccc285e47aac46081cdc
Each of the lines which ends in an ellipsis () above will actually be quite long in the generated signature file(s) you create using rsasigkey. Everything after the equal sign on the line that begins with #pubkey= is the hosts public key. The part of the public used by InJoy IPSec is marked green in the above figure. All nine lines beginning with the line that starts with Modulus: is the hosts private key. These lines are marked red. Exchanging Keys Once you have generated a public key for each of the hosts involved, you can exchange those public keys using normal means (including email) because it is only the private key which must remain secure for authentication. Given two hosts, Host A and Host B, host A must sent its public key to Host B, and Host B must sent its public key to Host A, so that these public keys can be inserted into each hosts ipsec\ipsec.cnf file. Security Association and Public Key Configuration You can configure an SA to use RSA DSS by selecting RSA-Keys authentication in the Authentication Dialog in the Tunnel Workshop.
You can also enter the remote hosts public key in the Authentication Advanced dialog, opened by clicking on the Advanced button in the Authentication dialog.
107
For general information on starting and using the Tunnel Workshop please refer to Section 5, Configuration. To enable RSA DSS and insert a remote hosts RSA public key directly into a security association in the ipsec\ipsec.cnf file, set Auth-Type to RSA-Keys, then use the Remote-Public-Key keyword for the public key, taking care to enclose the entire key in quotes. For example:
IPSecClient Description = Road Warrior RSA VPN client Local-IP = 0.0.0.0, Remote-IP = vpn.mycompany.com, ESP = 3DES, Auth-Type = RSA-Keys, Remote-Public-Key = <insert key here>,
Private Key Configuration After you have entered the remote host public keys into the ipsec\ipsec.cnf file, you must enter the local private keys on each host into the Pluto.secrets file, using the following format (notice indentation): host [host]: RSA { <insert key here> }
The word host should be replaced by any number of host identities, each of which can be listed either by IP address, by domain name or by e-mail address. These are the identities (see next section) to which this RSA private key will apply. Domain names must be prefixed by an @ (at) symbol, allowing them to be matched as text against the fully qualified domain name of the host. A particular user can be specified as well, using the e-mail address ([email protected]) format. Plain domain names without the @ symbol will not be resolved to IP addresses and will be treated as erroneous text. For example, for a pair of hosts with 10.1.1.1 and vpn.softdev.com identities, one possible entry would read: 10.1.1.1 @vpn.softdev.com: RSA { <key appears here> } Note that a single host may have a number of private keys matching a number of disparate identities. RSA DSS and Identities During IKE negotiation, each endpoint has two identitiesthe local identity (the label under which a host identifies itself) and the remote identity (the way it is perceived by the remote host). When RSA DSS authentication takes place, each endpoint searches its list of private keys for a key that matches
108
both of these identities. If found, it is this private key which will be used for authentication. The default values for both the local and remote identities are the IP address of the host in question. However, the InJoy software includes management tools for authentication based on multiple identities. Two security association keywords, Local-ID and Remote-ID are used to explicitly specify the ID of the local host, or the ID of the remote host, respectively, if an identity other than a host IP address is desired. Local-ID of the IPSec Client must match the Remote-ID of the IPSec Server (and vice verse). For example, consider the following security associations. On the local host:
IPSecClient Description = Road Warrior RSA VPN client Local-IP = 192.168.0.2, Remote-IP = 192.168.0.1, Auth-Type = RSA-Keys, Remote-Public-Key = <insert key here>, Remote-ID = @server.ournet.com,
For authentication to occur between these two hosts, the following must both be true: Because no identity has been specified for the host 192.168.0.2, a private key of IPSecClient must be saved in this hosts PLUTO.SECRETS file under the host identities 192.168.0.2 and @server.ournet.com. This key must be a match for the public key stored in the IPSecServer security association on the host 192.168.0.1. A private key of IPSecServer must be saved in the PLUTO.SECRETS file on the host 192.168.0.1 under the same identities (192.168.0.2 and @server.ournet.com). This key must be a match for the public key stored in the IPSecClient security association on the other endpoint. By working easily with multiple identities, RSA DSS adds unmatched flexibility to host-based network authentication while at the same time remaining both robust and secure.
16.4.Group Authentication
Group authentication works together with Xauth authentication, providing additional layer of security and great configuration possibilities for VPN Servers.
109
Introduction
Group authentication implements the technique known as two-factor authentication, where the user's VPN Client contains pre-filled group name and password and user is prompted user name and password each time before connecting to VPN Server. Group authentication is often used on VPN Servers to uniquely determine the group of users that the traffic has originated from and apply relevant access level and rights.
Limitations
Group authentication is supported in client mode only.
Configuration
To make use of Group authentication, you need to know the following information (examples are listed in parenthesis): Group name (sup3rgr0up) Group password (gr0uppwd) User name (sup3ru5er) User password (u5erpwd) The exact configuration depends on the type of the VPN Server, but the common guidelines are listed here (which fully apply to Cisco VPN3000 equipment): 1 The authorization, authentication and identification part of the SA must be as follows:
Auth-Type = Unused, Authorization = XauthV6_Cli, Identification = IdKeyId, Authentication = PSK,
2 Put group name and group password into Local-ID and Preshared-Secret fields, respectively:
Local-ID = "sup3rgr0up", Preshared-Secret = "gr0uppwd"
3 Put user name and user password into User-ID and Password fields, respectively:
User-Id = "sup3ru5er", Password = "u5erpwd",
110
16.5.X.509 Certificates
The purpose of this section is to provide a basic introduction to X.509 (RFC 2459) authentication, along with working examples. It should be noted that X.509 is a flexible feature that can be deployed in an endless number of combinations, most of which are beyond the scope of this document.
Introduction
A digital certificate is a package that contains a set of attributes (e.g. issuer name, lifetime, etc) and a public key. Certificates are created and digitally signed by a CA (Certificate Authority) typically a software application that encrypts the certificate. X.509 uses essentially the same encryption scheme as raw RSA keys, however with additional containers (the actual certificate files). When you have a public key of a CA, you can use it to validate the digital signature (the identity) of the certificate owner. In order to use a certificate as a valid digital signature, a user needs to have both a public and a private key. The certificate only contains the public key. The public key however cannot be used to create a digital signature. This is the reason why anyone is allowed to know the certificate and why the certificate is public. Each certificate (read: public key) has an accompanying private key, which is generated at the Certificate Signing Request (i.e. when the certificate is first issued by the CA). The private key is used in conjunction with the public key to establish a secure environment during IKE negotiations. Only the user who owns the certificate must know the private key.
111
The representation of an X.509 certificate is a file (text or binary), and it can be encoded in many different ways: PEM, base64, pkcs12, etc. The X.509 files allow a certificate trust-inheritance scheme, where one certificate is used to sign another. Also, the certificate files themselves contain useful auxiliary information (e.g. company name, company department, and the user's e-mail address), which helps to strengthen the overall security. The X.509 trust-inheritance scheme begins with a topmost self-signed certificate the Certificate Authority (a root certificate that is implicitly considered valid). To handle certificates which get compromised or stolen, a technique exists of declaring a certificate invalid. The technique is generally referred to as the Certificate Revocation List (CRL), on which any given certificate can be revoked by the administrator.
X.509 in IPSec
X.509 support enables IPSec to handle certificate authentication, similar to RSA-Key authentication. With X.509 public key is stored in the certificate, while with RSA authentication the public key is stored directly in the IPSec configuration file. The X.509 certificate is sent via the IKE protocol during Phase 1 negotiation, allowing IPSec to use the public key of the certificate to validate the users digital signature. In IPSec, X.509 can be used with certificates stored in PEM (encoded by base64) or DER (binary) formats only (IPSec auto-senses the type). Also, passphrases for private keys are not prompted for, but instead stored in configuration files. An implication of X.509 in IPSec is its impact on the network MTU during the first part of IKE negotiations. The Maximum datagram size (a.k.a. MTU) of the Ethernet protocol is 1500 bytes, and since the IKE server employs UDP for exchanging certificates, the administrator has to ensure that the size of individual certificates do not grow unacceptably big and thus exceed the Ethernet packet limit (of 1500 bytes). One method of making sure that a certificate stays within the realistically manageable size is to not use big key lengths (e.g. more than ~6000 bits). Long keys are likely to result in lost packets and failed authentication, if no general MTU handling procedure for IPSec is in place. X.509 in IPSec introduces no additional requirements. However, if you generate certificates on your own, respective third-party software is required, such as OpenSSL.
Deployment Steps
The first step in deploying X.509 is to set up a CA server to generate and sign the certificates. The CA server software will typically offer command line tools or publish a website where users can make certificate requests. A
112
certificate request contains data, such as the user name, department, etc. The administrator of the CA server can accept or refuse the certificate request. In many cases, the users making online certificate requests will additionally be authenticated with a phone call or similar. As a second step, the IPSec administrator should decide which other IPSec authentication methods X.509 should be combined with. For example, X.509 can be combined with X-Auth or X-Auth v6. Note, Pre-shared Secrets (PSK), RSA Signatures and X.509 are mutually exclusive. As a third step in deploying X.509, the administrator should consider how certificates are managed. I.e. how the process of generation, distribution and revocation is streamlined for the business. X.509 is a flexible feature, so the above steps are very basic guidelines. For larger installations it is highly recommended that X.509 is studied in full and that capable third party software is installed for key management. In the following sections, the OpenSSL software is used on the command line to generate and sign certificates.
3 Put the end-point's private key into the ipsec/ipsec.d/private/ directory and point IPSec to use it by adding the following line to the pluto.sec file: : RSA libra.key
113
Where libra.key is a file that contains the end-point's private key. As needed, update the CRL file in the ipsec/ipsec.d/crls/ directory to deny authentication attempts with revoked certificates.
Generating Certificates
In this example, setting up the tunnel with X.509 authentication includes: Obtaining the OpenSSL software for generating the certificates Generating the certificates Editing configuration files to use the certificates. First, obtain a copy of OpenSSL at http://www.openssl.org/ and then set it up it according to installation instructions included in the package. Now you are ready to create the self-signed root Certificate Authority (CA), which will be used to both sign client certificates and authenticate them:
openssl req -new -newkey rsa:1024 -nodes -keyout ca.key -x509 -days 730 -out ca.crt
Where: req Is a request to create a new certificate -new Means create a Certificate Signing Request (CSR) -newkey rsa:1024 Means to create a new private key of 1024 bit length. You can customize the key length, but Pluto accepts keys no larger than 8192 bits -nodes Means not to encrypt the private key -keyout ca.key Means save the private key into ca.key -x509 Means that itstead of doing a CSR, it creates a self-signed certificate -days 730 Certificate validity is 730 days (2 years). You can customize this value, but don't set too small value, since you will be signing client certificates using this CA -out ca.crt Save the certificate into ca.crt OpenSSL will ask you some details about the certificate:
Generating a 1024 bit RSA private key ......++++++ ...........++++++ writing new private key to 'ca.key' ----You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank.
114
----Country Name (2 letter code) [GB]:RU State or Province Name (full name) [Berkshire]:Astrakhan Locality Name (eg, city) [Newbury]:Astrakhan Organization Name (eg, company) [My Company Ltd]:FX Communications Organizational Unit Name (eg, section) []:Software Development Common Name (eg, your name or your server's hostname) []:ca-server Email Address []:[email protected]
Don't use special characters when entering details, e.g. don't use the / (slash) character, as it will conflict with the Distinguished Name (DN) syntax. As a result of running this command, ca.key and ca.crt will appear. Copy ca.crt into ipsec/ipsec.d/cacerts at both tunnel endpoints. As a step two, create client certificates. First, create openssl.conf with the following contents:
[ ca ] default_ca = CA_CLIENT # When signing certificates, use CA_CLIENT section # [ CA_CLIENT ] dir = ./certdb # Directory which will hold certificate database maintained by # OpenSSL # certs = $dir/certs # Certificates directory # new_certs_dir = $dir/newcerts # New certificates directory # database = $dir/index.txt # Database of signed certificates # serial = $dir/serial # File containing serial number of last issued certificate # certificate = ./ca.crt # CA file # private_key = ./ca.key # Private key of the CA # default_days = 365 # Validity period of client certificate to be issued # default_crl_days = 7 # CRL validity period # default_md = md5 # Hash function algorithm # policy = policy_anything # Name of the certificate policy section #
115
[ policy_anything ] countryName = optional # Country code - optional # stateOrProvinceName = optional localityName = optional organizationName = optional organizationalUnitName = optional commonName = supplied # Common Name (typically hostname) is mandatory # emailAddress = optional
The last two commands generate an empty cert_db/index.txt and cert_db/serial with just "01" inside them (without quotes). Next, do a Certificate Signing Request for the client certificate. OpenSSL parameters are same as for the CA's CSR, however, the -x509 parameter is now omitted.
openssl req -new -newkey rsa:1024 -nodes -keyout libra.key -out libra.csr
Generating a 1024 bit RSA private key .....................++++++ ...................................................................++++++ writing new private key to 'libra.key' ----You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----Country Name (2 letter code) [GB]:RU State or Province Name (full name) [Berkshire]:Astrakhan Locality Name (eg, city) [Newbury]:Astrakhan Organization Name (eg, company) [My Company Ltd]:FX Communications Organizational Unit Name (eg, section) []:Software Development Common Name (eg, your name or your server's hostname) []:libra Email Address []:[email protected] Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
libra.key will hold the private key, and libra.csr is the CSR which will be signed by the CA and result in a certificate file later.
116
Now, libra.crt and libra.key are what will be needed to establish a tunnel using X.509 authentication. Repeat these 2 steps creating the CSR and signing it - for each endpoint of the tunnel. The above showed how the client certificate was created, so, for the server, another certificate is created:
openssl req -new -newkey rsa:1024 -nodes -keyout libresse.key -out libresse.csr openssl ca -config openssl.conf -in libresse.csr -out libresse.crt -batch
As a final step, copy libra.crt to ipsec/ipsec.d/certs and copy libra.key to ipsec/ipsec.d/private. Do the same on the server with libresse.crt and libresse.key.
Configuring IPSec
To configure IPSec to use certificates, point it to the certificate file:
Test-Cert Local-IP = "my_ip", Remote-IP = "10.11.31.2", ReInit = No, Auth-Type = Unused, Authentication = X509, Identification = DERASN1, Authorization = None, Local-Certificate = "libra.crt",
The relevant attributes here are: Auth-Type Unused means that the Authentication, Identification and Authorization attributes are used to govern how the tunnel is established. Authentication - X509 states that X.509 certificates will be used. Identification - Distinguished Name (DER ASN.1 DN) will be used to identify end-points. Authorization - No additional authorization will be used. Can be modified to be XAUTH or any other supported type.
117
Local-Certificate The file that contains the certificate of the endpoint, in binary DER or base64 PEM format (the type is sensed automatically by IPSec). This certificate must reside in the ipsec/ipsec.d/certs directory. Now point IPSec to the private key of the endpoint, by adding the following line to pluto.sec:
: RSA libra.key
After you set up the opposite endpoint in the same manner (except for the Reinit parameter), the tunnel is ready to be established.
Put the resulting ca.crl into the directory ipsec/ipsec.d/crls. To revoke a certificate, use:
openssl ca -config openssl.conf -revoke libra.crt
118
Part V
Deployment Examples
119
17
120
Host A 217.126.17.44
Host B 211.56.33.12
Formatting constrains in the above examples cause the ESP keys to be wrapped around and take up two lines each. As you deploy these examples, please make sure to undo this effect, by putting both the configuration attribute and its value on the same physical line. The Remote-IP addresses used in the examples must be updated to reflect the actual IP addresses of your network configuration.
121
Pay particular attention to the way that the manual keying values on Host B are mirror images to those on Host AHost As ESP-Receive-SPI is Host Bs ESP-Transmit-SPI, and so on. This is necessary for manual keying to function properly. For more details on using manual keying, please refer to Section 15, Using Manual Keying.
Host A 217.126.17.44
Host B 211.56.33.12
All of the configuration details shown below can also be entered using the Tunnel Workshop. For details on using the Tunnel Workshop, please refer to Section 5, Configuration.
122
In addition to making the IPSec connection much more secure, the presence of the Pluto IKE server has helped to simplify the entries in ipsec\ipsec.cnf considerably, when compared to the previous scenario.
123
San Jose
10.1.0.5 10.1.0.10 10.4.0.1 10.4.0.10
10.2.0.5
10.2.0.10
10.3.0.5
10.3.0.10
London
Tokyo
Naturally, each office is running the InJoy software and the Pluto IKE Server for the creation of this VPN. For this configuration to work, a greater number of SAs need to be created. It can help to think of each IPSec connection as a pipe; two network segments must be connected by such a pipe in order to communicate. As was the case in the previous scenario, all of the configuration details shown below can also be entered using the Tunnel Workshop. For details on using the Tunnel Workshop, please refer to Section 5, Configuration. To be able to establish two or more IPSec tunnels to the same remote host, you must manually enable the Nested-SA-Bundles option in ipsec\options.cnf at both involved IPSec end-points:
Options Trace-AH = No, Trace-ESP = No, Trace-Tunnel = No, Trace-Frag = No, Trace-Packets = No, Dump-Packets = No, Log-Level = Info, Start-IKE-Server = Daemon, Nested-SA-Bundles = Yes,
124
The Nested-SA-Bundles ensures that Gateway traffic matching multiple SA is properly encrypted. Also notice, the order of SAs must be exactly the same on both sides.
To_London_SA_2
To_Tokyo_SA_1
To_Tokyo_SA_2
Notice that there are two security associations for each of the other offices. This is because San Jose hosts two networks, 10.1.0.0 and 10.4.0.0; each of these must have its own SA.
125
To_San_Jose_SA_2
Description = "10.2.0.0 <-> 10.4.0.0" Local-IP = "My_IP", Local-Net = "10.2.0.0", Local-Mask = "255.255.0.0", Remote-IP = "24.248.36.1", Remote-Net = "10.4.0.0", Remote-Mask = "255.255.0.0", AH = Yes, ESP = Yes, Preshared-Secret = "-3c0f9d1782099c5a" Description = "10.2.0.0 <-> 10.3.0.0" Local-IP = "My_IP", Local-Net = "10.2.0.0", Local-Mask = "255.255.0.0", Remote-IP = "136.74.82.167", Remote-Net = "10.3.0.0", Remote-Mask = "255.255.0.0", AH = Yes, ESP = Yes, Preshared-Secret = "-3c0f9d1782099c5a"
To_Tokyo_SA
Notice that there are two security associations for San Jose. This is because San Jose hosts two networks, 10.1.0.0 and 10.4.0.0; each of these must have its own security association.
126
Remote-Mask = "255.255.0.0", AH = Yes, ESP = Yes, Preshared-Secret = "-3c0f9d1782099c5a" To_San_Jose_SA_2 Description = "10.3.0.0 <-> 10.4.0.0" Local-IP = "My_IP", Local-Net = "10.3.0.0", Local-Mask = "255.255.0.0", Remote-IP = "24.248.36.1", Remote-Net = "10.4.0.0", Remote-Mask = "255.255.0.0", AH = Yes, ESP = Yes, Preshared-Secret = "-3c0f9d1782099c5a" Description = "10.3.0.0 <-> 10.2.0.0" Local-IP = "My_IP", Local-Net = "10.3.0.0", Local-Mask = "255.255.0.0", Remote-IP = "12.254.84.24", Remote-Net = "10.2.0.0", Remote-Mask = "255.255.0.0", AH = Yes, ESP = Yes, Preshared-Secret = "-3c0f9d1782099c5a"
To_London_SA
As was the case in London, in Tokyo there are also two security associations for San Jose in order to be able to reach both of San Joses networks, 10.1.0.0 and 10.4.0.0.
127
The scenario in this section only demonstrates the configuration process for using RSA DSS with IPSec in action. For information on how RSA DSS works, its advantages and disadvantages, and fundamental documentation for using RSA DSS with the InJoy software, please refer to Section 16.3, RSA Digital Signatures.
These lines were added to the security associations Tokyo_SA_1 and Tokyo_SA_2 in the same file:
Auth-Type = RSA-Keys,
128
Remote-Public-Key = 0sAQOSumCFc1oEpXStk0fTlpVLp+,
At the same time, the network administrator in San Jose added the following entry to the San Jose offices pluto.secrets file:
24.248.36.1 12.254.84.24 136.74.82.167: RSA { Modulus: 0x6ee64975cb3ab97b33e1a8579ee06112b3bffb15 PublicExponent: 0x03 # everything after this point is secret PrivateExponent: 0x127bb6e8f734743f335046b9452565831d Prime1: 0xb1031cccba461879486d390749a6cc1ccdf182ea56 Prime2: 0xa062d66e386ff4710910f09a578c9acaf260463912 Exponent1: 0x7602133326d965a63048d0af866f32bddea101f Exponent2: 0x6aec8ef4259ff84b5b60a066e5086731f6ead97 Coefficient: 0x0cf5830d402fc7205aec4c039199838e7fe88eb }
These lines were added to the security association Tokyo_SA in the same file:
Auth-Type = RSA-Keys, Remote-Public-Key = 0sAQ0SumCFc1oEpXStk0fTlpVLp+X,
At the same time, the network administrator in London added the following entry to the London offices pluto.secrets file:
12.254.84.24 24.248.36.1 136.74.82.167: RSA { Modulus: 0x92ba6085735a04a574ad9347d396954ba7e5c6d PublicExponent: 0x03 # everything after this point is secret PrivateExponent: 0x1874656b9339ab70e8c7998bf89918e1f Prime1: 0xf05c167e391498298718c6f3c74271431ecdf9c36c Prime2: 0x9c469297186637e6a3df188cd659ff669b3db4935 Exponent1: 0xa03d6454260dbac65a1084a284d6f62cbf33fbd Exponent2: 0x682f0c65baeecfef17ea105de43bff99bcd3cdb7 Coefficient: 0x0f0721c77a99c19e800919f5b6ed709e3af7b1c }
129
These lines were added to the security association London_SA in the same file:
Auth-Type = RSA-Keys, Remote-Public-Key = 0sAQNwwO6ObsiU5JbHjwYYnkSk5,
At the same time, the network administrator in Tokyo added the following entry to the Tokyo offices pluto.secrets file:
136.74.82.167 24.248.36.1 12.254.84.24: RSA { Modulus: 0x92ba6085735a04a574ad9347d396954ba7e5c6 PublicExponent: 0x03 # everything after this point is secret PrivateExponent: 0x1874656b9339ab70e8c7988bf89918e1f Prime1: 0xf05c167e391498298718c6f3c74271431ecdf9c36c Prime2: 0x9c469297186637e6a3df188cd659ff669b3db4935e Exponent1: 0xa03d6454260dbac65a1084a284d6f62cbf33fbd Exponent2: 0x682f0c64baeecfef17ea105de43bff99bcd3cdb7 Coefficient: 0x0f0721c77a99c19e800919f5b6ed709e3af7b1c }
130
Vancouver VPN Gateway is configured with small key material lifetimes, to overcome the problem of potentially dead tunnels, when the NAT device IP address is suddenly changed. Recall from previous scenarios that San Joses public IP address is 24.248.36.1 and that San Jose has a Local-IP address of 10.1.0.1.
San Joses private key, of course, is already stored in its pluto.secrets file:
24.248.36.1: RSA { Modulus: 0x6ee64975cb3ab97b33e1a8579ee06112b3bffb15 PublicExponent: 0x03 # everything after this point is secret PrivateExponent: 0x127bb6e8f734743f335046b9452565831d Prime1: 0xb1031cccba461879486d390749a6cc1ccdf182ea56 Prime2: 0xa062d66e386ff4710910f09a578c9acaf260463912 Exponent1: 0x7602133326d965a63048d0af866f32bddea101f Exponent2: 0x6aec8ef4259ff84b5b60a066e5086731f6ead97 Coefficient: 0x0cf5830d402fc7205aec4c039199838e7fe88eb }
131
The network administrator in Vancouver adds the Vancouver gateways private key to the pluto.secrets file:
192.168.1.1 24.248.36.1: RSA { Modulus: 0x0x7e7784db98c38094cab48a116a220735d5f1aa PublicExponent: 0x03 # everything after this point is secret PrivateExponent: 0x1513eb79eecb4018cc736c583c5b0133a Prime1: 0xb76c3e5249f03aa86fa95aefadc69575c1cf244b52 Prime2: 0xb081f0b5a29b7375f30bd47938b023bedbe253df0 Exponent1: 0x7a48298c314ad1c59fc63c9fc92f0e4e8134c2dc Exponent2: 0x75abf5ce6c67a24ea207e2fb7b2017d49296e29 Coefficient: 0x3666dee6ef03e25026a601a06897696e4dd344 }
132
Part VI
References
133
18
Introduction
Synopsis
ipsec COMMAND
Description
The init command re-initializes the Pluto IKE Server and triggers key negotiations as if Pluto had just been started. If Pluto was started before the InJoy host application, InJoy IPSec will initialize Pluto automatically (the default), but if Pluto was restarted after the host application you need to invoke the ipsec tool with the init parameter. The reconnect command causes the configuration files to be re-read and tunnels to be renegotiated. This is useful if you have recently updated one or more security associations and want connections to use the new security policies immediately. This command is similar to the command sync ipsec. The stat command causes the ipsec utility to display the current table of security associations. The -disconnect command allows you to terminate a particular VPN tunnel using the name of the SA as an argument - as it appears in the SA configuration. The keyword all can be specified to terminate all tunnels. The -password command allows you to create a new encrypted password suitable for use in the vpn-auth.cnf file, by supplying a username and password as arguments. You may also choose to do this directly in the GUI.
134
For additional details on using the ipsec utility program, invoke it from the command line, with the -? option.
Synopsis
Rsasigkey [ --verbose ] nbits
Description
The --verbose option makes rsasigkey give a running commentary on the screen. By default, it works in silence until it is ready to generate output. The nbits specifies the number of bits in the generated keys. That is, two primes each of exactly nbits/2 bits. nbits must be a multiple of 16. Note that key generation may be a lengthy process and for example a 1024bit key on a 2GHz Pentium takes roughly 20 seconds. A 2048-bit key on the same system would take several minutes.
Example
To use the rsasigkey utility program to generate a 1024-bit signature and save it to a file called rsakey.txt, issue the following command: rsasigkey 1024 > rsakey.txt
135
19
Test Engine Verification
IRE Safenet/SoftPK WinNT Client - http://www.ire.com (F/X approved) Nortel Connectivity Extranet Switch (with ID_KEY_ID based authentication and inner IP address) - http://www.nortelnetworks.com (F/X approved) Cisco PIX and Cisco IOS (with extended authentication and IP address configuration) - http://www.cisco.com (F/X approved) Cisco VPN5008, SW 5.2.21.001 Cisco VPN62xx (F/X approved) Microsoft Windows 2000 built-in IPSec http://www.microsoft.com/windows2000 (F/X approved) Microsoft Windows XP built-in IPSec http://www.microsoft.com/windowsxp (F/X approved) Linux IPSec [FreeS/WAN] http://www.freeswan.org (F/X approved) Raptor Firewall 5 for Windows NT Xedia Access Point/QVPN Borderware 6.0 and Freegate 1.3 beta TimeStep Permit/Gate (2520) OpenBSD IPSec
136
137
20
o 1-DES CBC (RFC 2405) o 3-DES CBC o AES (128, 192 and 256 key lengths) o BlowFish o NULL-ESP
Key Exchange:
o ISAKMP/Oakley (RFC 2412) o Extended Authentication within ISAKMP/Oakley (XAUTH) (draft-ietfipsec-isakmp-xauth-04.txt, draft-ietf-ipsec-isakmp-xauth-06.txt)
138
o Perfect Forward Secrecy (PFS) o RSA Digital Signatures Authenticating o X.509 Digital Certificates
Other VPN-related features:
o Firewall compatibility o Road Warrior support (dynamic IP addresses) o Road Warrior subnet support (network behind RW's) o Logging o Alert support
139
21
Description
SA-Status
If SA-Status = Disabled, the SA description is ignored. The default value is Enabled. If Mode = Transport, IPSec transformations are applied only to the IP packet payload. The original IP packet header is not modified. The AH or ESP header is inserted right after the IP header. This mode can be used only for Host to Host links. Transport mode cannot be used in combination with the NAT Traversal feature (as that would be insecure). If Mode = Tunnel, the original (encapsulated) datagram becomes the payload for a new IP header. This mode must be used if at least one endpoint is an IPSec gateway. This is the only mode allowed for NAT Traversal.
Mode
Local-IP
- IP address - "0.0.0.0"
Local IPSec host/gateway IP address. Traditionally this is the public IP address of the local IPSec end-point. If Local-IP = "0.0.0.0", the local side is a Road Warrior. Road Warrior specifies that the local IP address is assigned dynamically. For more information,
140
please refer to section 11, Using Road Warrior Support. If Local-IP specifies the IP address of a PC that uses NAT Traversal, the internal IP address must be specified (e.g. 10.0.0.1). In addition, this IP address must belong to the Local-Net IP address range. If this is not possible, an alternative is to use the Inner-IP to specify a virtual IP address that actually does fit the Local-Net IP address range. For more information, please refer to Section 13, Using IPSec behind NAT. Local-Net - net address If the local IPSec endpoint acts as an IPSec gateway, it is possible, using the Local-Net and Local-Mask attributes, to specify an intranet for which all traffic will be processed according to the SA. Netmask for Local-Net. Remote host or IPSec gateway IP address. Traditionally this is the public IP address of the remote IPSec end-point. If Remote-IP = "0.0.0.0", the remote end is a Road Warrior. Such an SA would be used for all remote dynamic-IP IPSec end-points. Note that IKE negotiations remote Road Warriors are authenticated using the same preshared secret. For more information, please refer to section 11, Using Road Warrior Support. When NAT Traversal is used, it is recommended to have Remote-IP set as 0.0.0.0. Alternatively, the Remote-IP may be specified as the public IP address of the NAT device - not the internal address of NAT-T client. Consequently, there currently is no way to have two or more NAT-T clients connected from behind the same NAT device. Remote-IP-2 - IP address - DNS name Fail-over IP address, used when IKE negotiations with Remote-IP failed or timed out. Leave field empty to disable fail-over.
Local-Mask Remote-IP
141
Remote-Net
- net address
If the remote IPSec end-point acts as an IPSec gateway, it is possible to specify the intranet for which all traffic will be processed according to the SA. When NAT Traversal is used, the Remote-Net / Remote-Mask IP address range must include the IP address of the NAT-T client. For more information, please refer to Section 13, Using IPSec behind NAT.
Remote-Mask AH
Netmask for the Remote-Net. This is the IPSec Authentication Header (AH) transform. You may specify MD5, SHA1, NULL-Auth or none. If you set this to Yes, MD5 will be used as the preferred value. AH should be disabled when NAT Traversal is used or when IPSec is attempted port-mapped. This is because the use of AH security prevents the changes that a NAT device must be able to apply. NULL-Auth value tells IPSec to not use ESP Authentication i.e. only encrypt without introducing additional 12-byte authentication payload.
ESP
This is the IPSec ESP transform. You may specify AES, AES-192, AES256, BF, 3DES, DES, NULL-ESP or none. If you set this to Yes, 3DES will be used as preferred value. It is recommended NOT to use simple DES in high security setups. Even though 1 time DES does give an advantage in speed, it is vulnerable to cracking attempts of modern (powerful) computers. NULL-ESP means that no actual encryption will be performed on datagrams, i.e. tunneled data will be sent in the clear.
Reinit
- Yes - No
If Reinit = Yes, IKE negotiates to establish new SAs when the host application is (re-)started or (re-)
142
connected. For example, with the InJoy Dialer that is when a new connection to the ISP is established or when the ipsec utility has been run with reconnect option. It is normal and highly recommended to synchronize between endpoints at this point, except in the scenario specified below. Reinit = No specifies that IKE negotiations won't be started until traffic between endpoints will appear. This is the normal approach when Remote-IP = "0.0.0.0" (Road Warrior case), as the real IP address is not known and negotiations accordingly need to be started by the Road Warrior. Exclude-Local-IP - Yes - No If Exclude-Local-IP = Yes, the local gateway will be excluded from the SA bundle. All traffic that has the local gateway as source or destination will NOT be processed by IPSec. Instead, only the local subnet will be covered by the SA bundle. This option is for compatibility with other vendors' IPSec implementations (e.g. SafeNet/Soft-PK). Please refer to the separate interoperability guides for more details. Exclude-Local-IP = No is a default value. Exclude-Remote-IP - Yes - No If Exclude-Remote-IP = Yes, the remote gateway will be excluded from the SA bundle. All traffic that has the remote gateway as source or destination will NOT be processed by IPSec. Only the remote subnet will be covered by the SA. This option is for compatibility with other IPSec vendors. Exclude-Remote-IP = No is a default value. ISAKMP-Lifetime - seconds ISAKMP SA key material lifetime. The ISAKMP SA is renegotiated at the given time interval. The default value is 3600 (1 hour). Not all VPN gateways will accept negotiation of this feature. When NAT Traversal is used, it is recommended to specify a relatively small lifetime (e.g. in the 60-120
143
range). A small lifetime helps reduce problems related to the NAT device changing its public IP address. Different values for the ISAKMP-Lifetime and IPSec-Lifetime are recommended. IPSec-Lifetime - seconds IPSec key material lifetime. The IPSec SA is renegotiated at the given time interval. The default value is 28800 (8 hours). Not all VPN gateways will accept negotiation of this feature. The NAT Traversal guidelines specified for the ISAKMP-Lifetime also applies to the IPSec-Lifetime. Inner-IP - Inner (Red Node) IP address The Inner-IP attribute is used in an SA to specify a private (virtual) IP address for tunneled traffic. Intended for use on the IPSec client side, the Inner-IP provides translation of the public ISPassigned IP address (Black Node IP) to a private (static) IP address (e.g. 10.1.1.1). NAT is used for the implementation of Inner-IP and the feature is fully transparent with standard (non callback) TCP and UDP connections. Inner-IP support is also compatible with the Nortel Connectivity Switch (version 2.6 or newer) and Cisco PIX/IOS VPN gateways. With Nortel, the Inner-IP attribute must be manually preset, while with Cisco, the "config mode" feature can auto-assign the Inner IP address to the InJoy Client. Refer to the interoperability guides for examples. Auth-Type IP-Address Client-IdKeyId Client-Xauth Server-Xauth RSA-Keys Unused Auth-Type defines how IPSec end-points identify themselves during IKE negotiations. The default method is to use IP address. In this case authentication is based only on the pre-shared secret and IP addresses of the IPSec end-points. If Auth-Type = Client-IdKeyId, the User-Id value is used as ID_KEY_ID in aggressive mode authentication. This
144
method is used when the remote side is a Nortel Extranet Switch. Refer to the interoperability guide for examples. You should provide User-Id and Password as well in this case. If Auth-Type = Client-Xauth, then your side is configured as a client for an Extended Authentication server. You should provide User-Id and Password as well in this case. Auth-Type = Server-Xauth defines that your side is an X-authentication server that authenticate clients based on their User-Id and Password. In this mode it is also possible to configure the clients with predefined parameters, such as a static Inner IP address. Auth-Type = RSA-Keys defines that both sides authenticate themselves by the use of RSA Digital Signatures. RSAKeys require a local Private key in pluto.secrets and a correct remote Public key in the Remote-Public-Key attribute. Auth-Type = Unused means that AuthType will not be used to identify authentication, and instead, Authentication, Identification and Authorization attributes will be used. User-Id - text string - prompt Used as a user name for authentication with Cisco Pix, Cisco IOS and InJoy XAUTH enabled servers. Set User-Id to prompt to have IPSec prompt the user for a login at each connect, rather than storing the password on the harddisk. Also used as ID_KEY_ID when AuthType = Client-IdKeyId for compatibility (with e.g. the Nortel IPSec Gateways). Password - text string Used in combination with User-Id for authentication with ID_KEY_ID or XAUTH enabled servers.
145
- unique integer
Used only in combination with Manual Keying. Security Parameter Indices of the remote IPSec end-point. Only specified by the IPSec administrator when Manual Keying is used (i.e. no IKE Server). For more information about these fields, please refer to Section 15, Using Manual Keying.
AH-Key Remote-AH-Key
- key string
Used only in combination with Manual Keying. AH Keys for the local and remote side, respectively. MD5 or SHA1 key in hexadecimal representation. 16 bytes (32 characters) for MD5. 20 bytes (40 characters) for SHA1. For more information about these fields, please refer to Section 15, Using Manual Keying.
ESP-Key Remote-ESP-Key
- key string
Used only in combination with Manual Keying. If AH is used, ESP-Key includes either a DES (8 bytes or 16 hex characters) or 3DES (24 bytes or 48 hex characters) key. If AH = no, the ESP-Key contains either a DES or 3DES key, followed by either an MD5 or SHA1 key. For that reason, these keys can consist of 24, 28, 40 or 44 bytes - which is equal to 48, 56, 80 and 88 hex characters, respectively. For more information about these fields, please refer to Section 15, Using Manual Keying.
Preshared-Secret
- text string
Pre-shared secret is used to preauthenticate IPSec end-points before any other authentication. Pre-shared secrets must be shared by contacting end-points on beforehand
146
(manually). If RSA DSS authentication is used (Auth-Type of RSA-Key), the PresharedSecret is not used by IPSec. If manual keying is used, the Preshared-Secret is also not used. Aggressive-Oakley text string of enc;hash;auth;gr oup enc: DES | 3DES | AES | AES-192 | AES-256 | BF hash: SHA1 | MD5 auth: PK group: DH1 | DH2 | DH5 Initial-Retry-Delay Fast Medium Slow VerySlow Specifies the Oakley transform to be used in Aggressive Mode. By default, the Pluto IKE Server uses the 3DES;SHA1;PK;DH5 transforms. For example, the IBM AIX IPSec accepts DH Groups 1 and 2 only. AggressiveOakley key for AIX could be: 3DES;SHA1;PK;DH2.
Defines the initial retry delay for the initial IKE Main Mode packets. The faster the value, the smaller the packet resend interval. Defines the ID of the local side. The ID is an identification payload used by the IKE servers to uniquely identify each other. The ID can be: @FQDN: Fully Qualified Domain Name (@example.com); user@FQDN: e-mail address ([email protected]); An IP address (which if the Local-ID is left blank is automatically inserted into this field). If the Local-ID is explicitly set to an IP address, it causes an error.
Local-ID
Remote-ID
- @FQDN - user@FQDN - empty text string of enc;hash;auth;gr oup sequences separated by whitespace
Similar to Local-ID.
Transform-Order
Specifies the order in which Oakley transforms appear in the IKE Server proposal. For advanced users only.
147
enc: DES | 3DES | AES | AES-192 | AES-256 | BF hash: SHA1 | MD5 auth: PK group: DH1 | DH2 | DH5 PFS Yes No Whitespaceseparated list of networks with wildcards PSK Tokencard RSA-Keys X509 IP-Address User-FQDN Host-FQDN DERASN1 IdKeyId Turns on Perfect Forward Secrecy for Phase II negotiations. Read above for more information about PFS. Specifies which networks to skip when processing the traffic.
Direct-Nets
Authentication
Specifies which method to use when verifying authenticity of the remote endpoint. Default: PSK.
Identification
Identification type to be used when authenticating peers, i.e. this is a selector used for choosing authentication material from the policy database. IP-Address will use IP addresses of the tunnel endpoints to identify them. User-FQDN and Host-FQDN are users email and users host name, respectively. Refer to Local-ID attribute description for more details. DERASN1 is identification type used for X509 authentication and is the only type possible for X509. IdKeyId is special type for interoperating proprietary implementations of IKE server (like OpenPGP). Default: IP-Address.
Authorization
Specifies which method will be used for additional verification of user identity. None no additional authorization will be performed.
148
Xauth_Cli and Xauth_Src client and server mode of XAUTH, respectively. XauthV6_Cli and XauthV6_Src client and server mode of XAUTH v6, respectively. For XAUTH type of authorization, client and server must not have same types of it, e.g. both must not have Xauth_Cli. Default: None. Local-Certificate Path to certificate file Specifies this endpoints certificate file. The file must reside under ipsec/ipsec.d/certs directory and be in PEM or DER format (the IKE server auto-senses the format). NAT-Traversal allows IPSec end-points to function behind a NAT device. NAT-Traversal = No explicitly disables this feature. This is useful only when it is known beyond doubt that no NAT processing will occur between IPSec endpoints. NAT-Traversal = Auto allows the IKE Server to detect the presence of a NAT device between IPSec endpoints and automatically apply relevant procedures (for instance UDP encapsulation of IPSec traffic). If one of the IPSec end-points doesnt support NAT Traversal, the NAT-T capable IKE Server auto-disables the feature.
NAT-Traversal
Auto No
Default Values
The default values of any IPSec SA, are specified in the file template\ipsec.cfg: ; TEMPLATE FILE ; ; Provides default values for the user crafted configuration records. ; Any value may be selectively overwritten in the product config files.
149
TEMPLATE Description = "<Secure Tunnel>", SA-Status = Enabled, Exclude-Local-IP = No, Exclude-Remote-IP = No, Mode = Tunnel, Reinit = Yes, Auth-Type = IP-Address, AH = No, ESP = Yes, IP-Compression = No, ISAKMP-Lifetime = 28800, IPSec-Lifetime = 3600, Local-IP = "", Local-Net = "", Local-Mask = "", Remote-IP = "", Remote-IP-2 = "", Remote-Net = "", Remote-Mask = "", Inner-IP = "", User-Id = "", Password = "", ESP-Key = "", AH-Key = "", Remote-ESP-Key = "", Remote-AH-Key = "", ESP-Receive-SPI = 0, ESP-Transmit-SPI = 0, AH-Receive-SPI = 0, AH-Transmit-SPI = 0, Aggressive = No, Cisco-Delete = No, Preshared-Secret = "<secret>", Aggressive-Oakley = "3DES;SHA1;PK;DH5", Initial-Retry-Delay = Medium, Remote-Public-Key = "", Local-ID = "", Remote-ID = "", NAT-Traversal = Auto, Authentication = PSK, Identification = IP-Address, Authorization = None, Vendor-ID = No, Remote-CA = "", PFS = 0, Keying-Tries = 3, IPv6 = No,
150
IKE-Flags = None, Direct-Nets = "", Transform-Order = "", Local-Certificate = "", Remote-Certificate = "",
Dump-Packets Log-Level
Start-IKEServer
- Daemon - Yes - No
With this option, IPSec allows autostarting of the Pluto IKE server at start-up. Daemon: Starts Pluto as an invisible process (sometimes also referred to as a detached or backgrounded process); Yes: Starts Pluto as a visible process in a command prompt. Note that it
151
may be started minimized on some Operating Systems. No: Assumes Pluto is started manually before IPSec. IKE-ServerParameters - text string List of command line parameters to pass to the Pluto IKE Server (when auto-started). See also Start-IKEServer. Controls SA bundle nesting used only in very complex, multi-level tunnels. By default Nested-SA-Bundles is disabled. Limits the maximum size of the logs\ipsec.log and the ipsec\pluto.log log files. When the log files hit their maximum file size, they are deleted. The file size must be entered in Kilobytes (e.g. 10000 = 10MB). Path-MTUDiscovery Local-MTU Yes No - MTU value Specifies whether built-in Path MTU Discovery is activated. Specifies MTU value to be used for forwarding datagrams to local internal network (specified by Local-Net in ipsec.cnf). Same as Local-MTU, but for remote internal network. Lookup-Period specifies the time interval for periodic DNS resolving of Remote-IP host names. If IPSec detects a change in the Remote-IP domain name, IPSec re-establishes the tunnel, using the new IP address.
Nested-SABundles
- Yes - No
Log-Limit
- Kbytes
Remote-MTU Lookup-Period
Default Values
The default values of the common IPSec options are specified in the file template\options.cnf: ; TEMPLATE FILE ; ; Provides default values for the user crafted configuration records. ; Any value may be selectively overwritten in the product config files.
152
Trace-Tunnel = No, Trace-Frag = No, Trace-Packets = No, Trace-Internal = 0, Dump-Packets = No, Trace-IPCOMP = No, Log-Level = Internal-Error, Start-IKE-Server = No, IKE-Server-Parameters = "", IKE-Server-Name = "pluto", Nested-SA-Bundles = No, Log-Limit = 10240, Lookup-Period = 300, IPSec-Flags = 0, Hardware-Acceleration = No, Path-MTU-Discovery = No, Local-MTU = 1500, Remote-MTU = 1500,
153