Firewall administrators attempting to implement Internet Protocol security (IPSec) in tunnel mode with Microsoft® Internet Security and Acceleration (ISA) Server 2000 were unsuccessful due to an incompatibility between the network address translation (NAT) driver of ISA Server and IPSec. (This same problem was also encountered when using NAT within Routing and Remote Access). This interrupted IPSec only in tunnel mode. Using Layer Two Tunneling Protocol (L2TP) was the suggested solution because L2TP uses a transport mode policy and does not encounter this problem.

With ISA Server 2004, the NAT interaction incompatibility has been removed, and IPSec tunnel mode is now possible. Note that in both Microsoft Windows Server™ 2003 and Windows® 2000 Server, there is still an incompatibility with Routing and Remote Access NAT.

For additional information about this scenario, refer to the following articles:

This guide avoids using the term "IPSec tunnel" to refer to the encapsulation between the two networks. Referring to an IPSec tunnel may cause confusion because the term is used when referring to any type of IPSec protection—either transport mode or tunnel mode. More properly, and to avoid confusion, this guide uses the term "IPSec tunnel mode policy" when referencing the configuration.

This section briefly describes how IPSec works in tunnel mode. For a diagram of the network topology, see Figure 4 later in this document.

In this example, traffic is transmitted from the client on the Astaro Security Linux system Internal network, traverses the IPSec tunnel mode policy, and is then received on the ISA Server network. When using Encapsulating Security Payload (ESP), traffic is typically encrypted using Data Encryption Standard (DES) or Triple DES (3DES) and authenticated with SHA1 or MD5. However, you can specify to use Null (no) Encryption so that the packets can be seen. An IPSec tunnel mode policy with Encryption is configured initially, and then Null Encryption is specified, so that the packet structure with ESP can be seen as it traverses the network.

Figure 1 shows a client, 172.25.25.10, pinging a server, 172.25.1.10, which is located across the IPSec tunnel mode policy. This is what the packet looks like before IPSec protection. The data in the right side of the bottom pane, abcdefghijklmnop..., is the payload that a Windows client uses for Internet Control Message Protocol (ICMP).

Figure 1 Capture taken from the network card on 172.25.25.10

Figure 2 shows the results when the search is protected by IPSec in tunnel mode with ESP encrypted with 3DES. In this image, in Source Address and Destination Address, the original client source address and server destination address are replaced. The source is now the external address of the ISA Server 2004 system, 192.168.100.25, and the destination is the Astaro Security Linux system, 192.168.100.1. The client source IP address, destination IP address, and the data, abcdefghijklmnop..., below the IP header are encrypted, so you cannot decipher the packet structure further.

Figure 2 Capture taken from the external interface of ISA Server (192.168.100.25)

Figure 3 shows the results of the PING when using ESP with null encryption and MD5 for authentication. The figure shows the IPSec IP header (highlighted with a solid black line) that was added, which contains the tunnel mode policy endpoints as the source and destination, the ESP header, the original IP header (highlighted in the black dash line), and the ICMP payload. Also, you can read the data in the bottom pane, abcdefghijklmnop..., even though it is within ESP.

Figure 3 Capture taken from the external interface of ISA Server (192.168.100.25) using Null Encryption

IPSec accomplishes this in two steps. The first step is called Main Mode and the second step is called Quick Mode. (There is another mode that replaces Main Mode called Aggressive Mode, but this is not included in any Windows operating system.) Comprehensive explanations of what Main Mode and Quick Mode accomplish are beyond the scope of this document, but are explained in detail in the Windows Server 2003 Resource Kit (http://go.microsoft.com/fwlink/?LinkId=32054).

Main Mode is responsible for authenticating both sides of the IPSec tunnel mode policy (either using certificates or a preshared key) and generating a Diffie-Hellman key used to secure the second portion (Quick Mode). There are additional parameters negotiated during Main Mode, but these two tasks are the primary functions.

Quick Mode is responsible for negotiating the specific protocols, and source and destination addresses that will be included in the IPSec tunnel mode policy. Additionally, Quick Mode negotiates how this traffic will be protected (using the encryption algorithms DES or 3DES and the authentication algorithms SHA1 or MD5). There are other settings negotiated, but these are the primary tasks.

Diagram

The scenario described in this document is shown in the following figure.

After the ISA Server installation is complete, perform the following steps on the ISA Server computer to set up the IPSec tunnel mode configuration:

Create a remote site network that defines the IP subnet behind the Astaro Security Linux system and IPSec settings for the IPSec tunnel mode configuration.

Create a network rule that defines how the traffic is passed to the Astaro Security Linux private network (either using NAT or routing the traffic).

Create a firewall policy access rule that defines which traffic is allowed to pass to the Astaro Security Linux network.

Create a Remote Site Network

A remote site network defines the network behind the Astaro Security Linux system, and also defines the IPSec settings for the tunnel mode configuration. The New Site-to-Site Network Wizard creates a policy of IPSec settings that are not visible in the IPSec Policy Management console. The Main Mode and Quick Mode settings are dynamically inserted into the IPSec driver by the wizard. To create a remote site network, perform the following steps.

To start the wizard, select the Virtual Private Networks (VPN) node in the ISA Server console, and then select the Remote Sites tab. On the Tasks tab, click Add Remote Site Network.

In this example, a network definition that will specify the range of IP addresses that are accessible behind the Astaro Security Linux system through the IPSec tunnel mode configuration will be created. Enter the name AstaroNet, and then click Next.

Select IP Security protocol (IPSec) tunnel mode, and then click Next.

Enter the tunnel mode endpoint addresses. The Astaro Security Linux system is the remote VPN gateway and ISA Server is the local VPN gateway. Then, click Next.

Select the type of authentication you want to perform for Main Mode negotiations. For this example, select Use pre-shared key for authentication and enter 123456789 for initial testing. Then, click Next.

Click Add to add the range of IP addresses that will be accessible through the tunnel mode configuration (the subnet that is behind the Astaro Security Linux system).

If you want traffic destined for the Astaro Security Linux system’s external interface included, specify its address. In the following example, the subnet 172.25.1.0-172.25.1.255 is defined as behind the Astaro Security Linux system. Click OK.

Click Next.

Click Finish to complete the wizard. After the wizard is finished, click Apply to make the configuration change active.

Now that this is complete, change the configuration slightly to use ESP with 3DES for encryption and MD5 for authentication. The default is to use ESP with 3DES and SHA1. To make these changes, perform the following steps.

On the Phase I tab, change the Integrity Algorithm to MD5. Perform the same action on the Phase II tab.

Click OK and then click Apply to make the change active.

After the changes are applied, you can view the IPSec settings from ISA Server or by using a command-line utility. There are two methods to view the settings from ISA Server. To use the first method to view the IPSec settings, perform the following steps.

On the Remote Sites tab, select the remote site network object you just created.

On the Tasks tab, click View Remote Site IPSec Policy. The following dialog box appears.

Or, to use another method to view the IPSec settings, perform the following steps.

On the Tasks tab, click Configure Remote Site.

Select the Connection tab, and then click IPSec Settings.

Phase I and Phase II (Main Mode and Quick Mode) settings appear.

You can also use the command-line utility NETSH to view these Main Mode and Quick Mode policies and filters:

You have now created a remote site network, and viewed the changes to the IPSec settings. Now that the remote site network has been defined, the next step is to define a relationship between the ISA Server Internal network and the Astaro private network. In the next section, you will define whether you want the traffic to use NAT or be routed to the remote network.

Create a Network Rule

To create a network rule, perform the following steps.

In the ISA Server console, select Configuration, select Networks, select the Network Rules tab, and then on the Tasks tab, click Create a New Network Rule.

For this scenario, enter the name ISANet to AstaroNet - Route, and then click Next.

On the Network Traffic Sources page, click Add and then expand the Networks node.

Select the Internal network, click Add, and then click Close.

On the Network Traffic Sources page, click Next.

On the Network Traffic Destinations page, repeat the same procedure as before, but select the network object AstaroNet.

On the Network Traffic Destinations page, click Next.

On the Network Relationship page, select Route, and then click Next.

Note:

In this example, traffic is routed between the two networks. This is because the IP subnets are different. If your scenario has two IP subnets that overlap (both local and remote subnets are 192.168.0.x), you should consider either using NAT for the traffic or redefining one of the IP subnets so that there is no overlap.

On the summary page, review the rule details and then click Finish.

After the wizard is complete, click Apply to make the configuration changes effective.

You have now created a network rule. The next step is to create an access rule.

Create an Access Rule

Now that you have defined the remote site and the network rule, you need to define which traffic will pass through the IPSec tunnel mode configuration. You control this through the firewall policy by creating an access rule specifying the traffic you want to allow. To create an access rule, perform the following steps.

Review the settings in the summary screen, and then click Finish to complete the wizard.

After the wizard is complete, click Apply to make the configuration changes effective.

Note:

You must complete the same procedure to allow traffic from the AstaroNet subnet to the ISANet subnet. Routing rules (which you created earlier in this document) are mirrored, but access rules are "one-way."

You have now created a remote site network, a network rule, and an access rule. Now that ISA Server is configured, you will configure the Astaro Security Linux system.

The ISANet definition will be added to the list of network definitions. You have now defined the network behind ISA Server (ISANet). The next step is to define the external interface of ISA Server.

In IP address, type the ISA Server external address 192.168.100.25, and in Subnet mask, type 255.255.255.255 or 32. Then click Add to have the ISA Server definition moved to the network definitions list.

You have now defined ISA Server and ISANet.

Define a Remote Key

To define a preshared key that you will use to authenticate the peers, perform the following steps.

Define IPSec Policy

To define an IPSec policy that specifies encryption or authentication algorithms and lifetimes, perform the following steps.

From the IPSec VPN menu on the left, click Policies.

Select New in the upper-right corner.

In the boxes provided, enter the following information.
In Name, type ISANet to AstaroNet Policy.
In ISAKMP(IKE) Settings, enter the following information.

In IKE mode, select Main Mode.

In Encryption Algorithm, select 3DES-CBC.

In Authentication Algorithm, select MD5 160bit.

In IKE DH Group, select DH Group 2 (MODP1024).

In SA lifetime (secs), type 28800.

In IPSec Settings, enter the following information.

In IPSec mode, select Tunnel.

In IPSec protocol, select ESP.

In Encryption Algorithm, select 3DES.

In Enforce Algorithms, select Off.

In Authentication Algorithm, select MD5 160bit.

In SA lifetime (secs), type 3600.

In PFS, select PFS Group 2 (MODP1024).

In Compression, select Off.

You have now defined IPSec policy.

Now that you have defined the network behind ISA Server (ISANet), the ISA Server external interface, the preshared key, and the IPSec policy to use, the next step is to gather these individual components into an IPSec connection.

Define IPSec Connection

To define an IPSec connection, perform the following steps.

From the IPSec VPN menu on the left, select Connections.

The following page will change dynamically as you enter information in the boxes. In the Name box, type ISANet to AstaroNet.

In Type, select Standard.

In IPSec Policy, select the policy you created earlier (ISANet to AstaroNet Policy).

In Local Endpoint, select External.

In Remote Endpoint, select the ISA Server network definition that you created earlier.

In the Local Subnet, select Internal_Network__.

In Remote Subnet, select ISANet.

On the Authentication of remote station(s) screen, in Key, select Pre-Shared Key for ISA.

Select Add, and the following screen will appear. The connection you just created is highlighted with a red indicator. Select the option button to the left of the red button to make the connection active (as indicated by the arrow).

The connection is now active as shown by the green option button.

You have now defined an IPSec connection.

Create Rules to Allow Traffic from ISANet

To create rules to allow traffic from ISANet, perform the following steps.

From the Packet Filter menu, select Rules.

The following screen appears.

You will add a simple rule to test connectivity, only allowing PING search requests from ISANet (ICMP Echo Request). In the following screen shot, the client 172.25.25.10, who is behind ISA Server, is using the PING protocol to search for a client Astaro 172.25.1.10. (For more information about this scenario, see Figure 4 earlier in this document.) There currently is no rule to allow ISANet traffic into the Internal network. To make the PING search constant, append -t to the end of the command.

On the Add Rule page, in the From (Client) box, select ISANet.

In the To (Server) box, select Internal_Network_.

In the Service box, select ping-request.

Make sure that Action is set to Allow, and then click Add.

The rule will show deactivated (red). Click the option button to the left of the red button to make it active (green).

Now that the rule is active, you can verify that the client is receiving replies.

The testing process uses different application layer and transport layer protocols to ensure that data is encrypted and decrypted correctly when it passes through the IPSec tunnel. The following data transfer tests can be used to determine the success of the IPSec tunnel mode policy:

FTP Transfer
The FTP process uses an FTP GET of a single 100 megabyte (MB) file, renames the file, and then uses an FTP PUT to transfer the new file back to the FTP server. After the two transfers are completed, a comparison is performed, using Windiff.exe from the Windows 2000 Server Resource Kit, at the FTP server to ensure the two files are identical. Both the command-line FTP.exe utility (used for Active Mode connections) and Internet Explorer (used for Passive Mode) are used as the client application. An FTP server running Windows Server 2003 is on the network behind the Check Point NG system.

TFTP Transfer
The TFTP copy process replicates the FTP tests, with the only difference being that a 20 MB file is transferred rather than the 100 MB file transferred using FTP. Because Windows Server 2003, Windows XP, and Windows 2000 Server do not include a TFTP server, a third-party TFTP server (SolarWinds TFTP Server http://www.solarwinds.com) is used as a TFTP server for the tests. A Windows XP host is the client using the command-line utility TFTP.exe.

CIFS Transfer
The CIFS copy process transfers a folder structure with three subfolders containing a total of 311 files approximately 50 MB in size between the two computers. The data is transferred from the source computer to the target computer using the Resource Kit utility ROBOCOPY.exe and by copying within Windows Explorer. The files are then copied from the target computer to the source computer into a different folder structure. The folders are then compared using Windiff.exe from the Windows 2000 Resource Kit to ensure that the data is not corrupted during transmission.