This FAQ answers commonly asked questions about Internet Protocol security (IPsec) support in the Microsoft Windows family of operating systems. Click a question to view its answer. To view all the answers at one time, select the View all answers check box.
Internet Protocol security (IPsec) is a framework of open standards for ensuring private, secure communications over Internet Protocol (IP) networks, through the use of cryptographic security services. The Internet Engineering Task Force (IETF) IPsec working group defines the IPsec standards. IPsec is the long-term direction for secure networking. It provides aggressive protection against private network and Internet attacks through end-to-end security. The only computers that must know about IPsec protection are the sender and receiver in the communication. IPsec provides the ability to protect communication between workgroups, local area network computers, domain clients and servers, branch offices (which might be physically remote), extranets, and roving clients.
The Windows Vista, Windows Server 2008, Windows XP, Windows Server 2003, and Windows 2000 implementations of IPsec are IETF standards-based.
IPsec documentation is included with Windows XP(click Start, then click HelpandSupport) and Windows Server 2003 (click Start, then click Help and Support). There are also IPsec sections of the Windows Server 2003 Deployment Guideand the Windows Server 2003 Technical Reference.
For a list of all the resources for IPsec in Windows, see the IPsec Web site .
Windows Vista and Windows Server 2008 include the following improvements to IPsec:
For more information, see the “IPsec Improvements” section of New Networking Features in Windows Server 2008 and Windows Vista.
The following IETF standards define IPsec:
Firewalls are designed to monitor incoming and outgoing traffic to determine whether the traffic is allowed. The Windows implementation of IPsec can also perform this function. However, IPsec can also ensure that the incoming and outgoing traffic is secure (protected with cryptography). For example, with the correct IPsec policy settings, you can require that all communications between domain controllers be secured.
Another key difference between IPsec for Windows and firewalls is the following:
The following usage scenarios are currently recommended:
Because IPsec works at the IP layer of the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol stack, you do not have to modify existing applications to use IPsec. All TCP/IP applications can use IPsec, whereas only SSL-enabled TCP/IP applications can use SSL. IPsec is an excellent solution to securing the traffic of legacy applications.
Other points of contrast between IPsec and SSL are the following:
With IPsec for Windows policy settings, you can block or permit incoming and outgoing traffic based on:
In contrast, with Windows Firewall you can only specify exceptions (incoming traffic that is permitted) based on source IPv4 address ranges expressed as subnets and destination TCP and UDP ports.
However, with Windows Firewall, you can do the following:
An IPsec Policy is a group of settings that specify IPsec behavior with regard to the types of traffic that are permitted, blocked, or secured. An IPsec policy consists of:
After IPsec policies are created, an individual IPsec policy can be assigned (activated) at the domain, site, organizational unit, and local level.
Each IPsec rule contains the following configuration items:
The rules for a policy are displayed in reverse alphabetical order based on the name of the filter list selected for each rule. There is no method for specifying an order in which to apply the rules in a policy. IPsec for Windows automatically creates an IPsec filter list and orders the list based on the most specific to the least specific filter list. For example, a filter that specified individual IP addresses would be applied before a filter that specified all addresses on a subnet.
IPsec policy is configured with the IPsec Policy Management snap-in for the Microsoft Management Console (MMC) on all versions of Windows that support IPsec. This snap-in can be used to configure both local computer and domain-based policy. This snap-in is also available from the Group Policy snap-in in Computer Configuration\Windows Settings\Security Settings.The command line tool that you can use to configure IPsec policy depends on the version of Windows:
An IP filter defines a specific set of IP traffic. The configuration parameters of an IP filter are the following:
The default response rule, which can be used for all policies, has the IP filter list of <Dynamic> and the filter action of Default Response when the list of rules is viewed with the IP Security Policies snap-in. The default response rule cannot be deleted, but it can be deactivated. It is activated by default for all policies.
The default response rule is used to ensure that the computer responds to requests for secure communication. If an active policy does not have a rule defined for a computer that is requesting secure communication, then the default response rule is applied and security is negotiated. For example, when Computer A communicates securely with Computer B, and Computer B does not have an inbound filter defined for Computer A, the default response rule is used.
When enabled on a client computer, the default response rule allows the client to start communicating in the clear to a server with the Accept unsecured communication, but always respond using IPsec option enabled. The server will respond with a negotiation request that, if successful, protects the rest of the traffic. Security methods and authentication methods can be configured for the default response rule. The filter list of <Dynamic> indicates that the filter list is not configured, but that filters are created automatically based on the receipt of IKE negotiation packets. The filter action of Default Response indicates that the action of the filter (Permit, Block, or Negotiate Security) cannot be configured. Negotiate Security will be used. However, you can configure:
For examples of sets of IPsec rules for various IPsec deployment scenarios, see the following resources:
The netsh ipsec dump command was never implemented for two main reasons:
The default exemptions for IPsec is specified by the NoDefaultExempt registry value (located at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IPSEC), which has the following possible settings:
You can change the value of the NoDefaultExempt registry key in Window Server 2003 with the netsh ipsec dynamic set config ipsecexempt value={ 0 | 1 | 2 | 3} command.For more information, see IPsec default exemptions are removed in Windows Server 2003.
You can view the IPsec filter list with the IP Security Monitor snap-in provided with Windows XP and Windows Server 2003. To add the IP Security Monitor snap-in, do the following:
To view the IPsec filter list, you need to open the Main Mode and Quick Mode folders in the console tree. In the Main Mode folder, click Specific Filters to view the filters in the IPsec filter list that require security., In the Quick Mode folder, click Specific Filters to view all of the filters in the IPsec filter list. For more information about the IPsec filter list, see IPsec Filter Ordering.
With the Windows Server 2003 family, if you use either Kerberos V5 or certificate authentication, you can set restrictions on which computers are allowed to connect. This functionality allows you to use IPsec to allow or deny any of the following access to a server running Windows Server 2003:
When you enable certificate to account mapping in IPsec, the IKE protocol associates (maps) a computer certificate to a computer account in an Active Directory domain or forest, and then retrieves an access token, which includes the list of the user rights that are assigned to the computer. You can restrict access by configuring Group Policy security settings and assigning either the Access this computer from the network user right or the Deny access to this computer from the network user right to individual or multiple computers, as needed. For more information about certificate to account mapping for IPsec, see Authentication methods.
You can either add the servers that the visiting computers need to access to the boundary zone, or you can use certificates for IPsec authentication to the specific servers and install computer certificates on the visiting computers. If the visiting computers are running Windows 2000 with Service Pack 3 or earlier, or versions of Windows prior to Windows 2000, you must add the servers that the visiting computers need to access to the boundary zone.
For more information, see the Interoperability Considerations for IPsec Server and Domain Isolation white paper.
IPsec requires the following attributes for certificates used in IPsec authentication:
For additional information, see the "IKE Main Mode and Quick Mode Negotiation" section of How IPsec Works.
Results vary because there are many factors affecting the performance of IPsec such as processor speed and the types of network adapters. In Microsoft testing, the following results were achieved on an Intel Pentium III-based computer, running at 993 MHz, and with 384 MB of RAM:
250
15.79762
200
19.27202
150
19.38969
100
17.99813
50
18.7118
0
5.49884
The most time and processor-intensive part of an IPsec-secured connection is the main mode negotiation, from which the master key is derived.
The Oakley log records all IKE (ISAKMP) main mode and quick mode negotiations. To enable Oakley logging, do the following:
The Oakley log is stored in the systemroot\Debug folder. A new Oakley.log file is created each time the IPsec policy agent is started and the previous version of the Oakley.log file is saved as Oakley.log.sav.
You can use the Windows XP Event Viewer snap-in to view the following IPsec-related events:
You can remove static local IPsec policy settings with the following:
The negotiation of a secured IPsec session has two distinct phases: main mode and quick mode. The main mode negotiation creates a bidirectional main mode SA (also known as an ISAKMP SA), which is a secure channel through which the quick mode negotiation and all future IKE traffic takes place.Main mode negotiation accomplishes the following:
Configure your router-based firewall to allow the following: