Web example: Configuring an IPsec tunnel for IPv4 subnets

Network configuration

As shown in Figure 1, establish an IPsec tunnel between Device A and Device B to protect data flows between the subnets of Host A and Host B. Configure the tunnel as follows:

Figure 1 Network diagram

 

Software versions used

This configuration example was created and verified on E8371 of the F5000-AI160 device.

Restrictions and guidelines

 

If a wider ACL rule is used by the SA initiator, the negotiation request might be rejected because the matching traffic is beyond the scope of the responder.

For the modifications to take effect on existing IPsec SAs, you must reset the IPsec SAs.

Procedure

Configuring Device A

  1. Assign IP addresses to interfaces and add the interfaces to security zones:

# On the top navigation bar, click Network.

# From the navigation pane, select Interface Configuration > Interfaces.

# Click the Edit icon for GE 1/0/13.

# In the dialog box that opens, configure the interface:

  1. Select the Untrust security zone.

  1. Click the IPv4 Address tab. Enter the IP address and mask length of the interface. In this example, use 220.0.0.100/24.

  1. Use the default settings for other parameters.

  1. Click OK.

# Add GE 1/0/12 to the Trust security zone and set its IP address to 192.100.0.1/24 in the same way you configure GE 1/0/13.

  1. Configure settings for routing:

This example configures static routes.

# On the top navigation bar, click Network.

# From the navigation pane, select Routing > Static Routing.

# On the IPv4 Static Routing tab, click Create.

# In the dialog box that opens, configure a static route to reach 220.0.10.100:

  1. Set the destination IP address to 220.0.10.100.

  1. Set the mask length to 24.

  1. Set the next hop address to 220.0.0.2.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the IPv4 Static Routing tab, click Create.

# In the dialog box that opens, configure a static route to reach 192.200.0.2:

  1. Set the destination IP address to 192.200.0.2.

  1. Set the mask length to 24.

  1. Set the next hop address to 220.0.0.2.

  1. Use the default settings for other parameters.

  1. Click OK.

  1. Configure security policies:

# On the top navigation bar, click Policies.

# From the navigation pane, select Security Policies > Security Policies.

# Click Create, and then click Create a policy.

# Configure a security policy named trust-untrust to permit specific traffic from the Trust to Untrust security zones:

  1. Set the security policy name to trust-untrust.

  1. Select source zone Trust.

  1. Select destination zone Untrust.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 192.100.0.0/24.

  1. Enter destination IPv4 address 192.200.0.0/24.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the Security Policies page, click Create.

# Configure a security policy named untrust-trust to permit specific traffic from the Untrust to Trust security zones:

  1. Set the security policy name to untrust-trust.

  1. Select source zone Untrust.

  1. Select destination zone Trust.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 192.200.0.0/24.

  1. Enter destination IPv4 address 192.100.0.0/24.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the Security Policies page, click Create.

# Configure a security policy named local-untrust to permit specific traffic from the Local to Untrust security zones:

  1. Set the security policy name to local-untrust.

  1. Select source zone Local.

  1. Select destination zone Untrust.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 220.0.0.100.

  1. Enter destination IPv4 address 220.0.10.100.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the Security Policies page, click Create.

# Configure a security policy named untrust-local to permit specific traffic from the Untrust to Local security zones:

  1. Set the security policy name to untrust-local.

  1. Select source zone Untrust.

  1. Select destination zone Local.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 220.0.10.100.

  1. Enter destination IPv4 address 220.0.0.100.

  1. Use the default settings for other parameters.

  1. Click OK.

  1. Create an IKE proposal:

# On the top navigation bar, click Network.

# From the navigation pane, select VPN > IPsec > IKE Proposals.

# Click Create.

# Click OK.

Figure 2 Creating an IKE proposal

 

  1. Configure the IPsec policy:

# On the top navigation bar, click Network.

# From the navigation pane, select VPN > IPsec > IPsec Policies.

# Click Create.

# Configure the basic settings as follows:

Figure 3 Basic settings

 

# Configure the IKE profile settings as follows:

Figure 4 IKE profile settings

 

# Configure the data flow filter rules as follows:

# Click OK.

Figure 5 Creating a data flow filter rule

 

# Set the IPsec SA triggering mode to Traffic-based.

# Configure the IPsec advanced settings as follows:

# Click OK.

Configuring Device B

  1. Assign IP addresses to interfaces and add the interfaces to security zones:

# On the top navigation bar, click Network.

# From the navigation pane, select Interface Configuration > Interfaces.

# Click the Edit icon for GE 2/0/13.

# In the dialog box that opens, configure the interface:

  1. Select the Untrust security zone.

  1. Click the IPv4 Address tab, and then enter the IP address and mask length of the interface. In this example, use 220.0.10.100/24.

  1. Use the default settings for other parameters.

  1. Click OK.

# Add GE 2/0/12 to the Trust security zone and set its IP address to 192.200.0.2/24 in the same way you configure GE 2/0/13.

  1. Configure settings for routing:

This example configures static routes.

# On the top navigation bar, click Network.

# From the navigation pane, select Routing > Static Routing.

# On the IPv4 Static Routing tab, click Create.

# In the dialog box that opens, configure a static route to reach 220.0.0.100:

  1. Set the destination IP address to 220.0.0.100.

  1. Set the mask length to 24.

  1. Set the next hop address to 220.0.10.2.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the IPv4 Static Routing tab, click Create.

# Configure a static route to reach 192.100.0.2:

  1. Set the destination IP address to 192.100.0.2.

  1. Set the mask length to 24.

  1. Set the next hop address to 220.0.10.2.

  1. Use the default settings for other parameters.

  1. Click OK.

  1. Configure security policies:

# On the top navigation bar, click Policies.

# From the navigation pane, select Security Policies > Security Policies.

# Click Create, and then click Create a policy.

# Configure a security policy named trust-untrust to permit specific traffic from the Trust to Untrust security zones:

  1. Set the security policy name to trust-untrust.

  1. Select source zone Trust.

  1. Select destination zone Untrust.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 192.200.0.0/24.

  1. Enter destination IPv4 address 192.100.0.0/24.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the Security Policies page, click Create.

# Configure a security policy named untrust-trust to permit specific traffic from the Untrust to Trust security zones:

  1. Set the security policy name to untrust-trust.

  1. Select source zone Untrust.

  1. Select destination zone Trust.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 192.100.0.0/24.

  1. Enter destination IPv4 address 192.200.0.0/24.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the Security Policies page, click Create.

# Configure a security policy named local-untrust to permit specific traffic from the Local to Untrust security zones:

  1. Set the security policy name to local-untrust.

  1. Select source zone Local.

  1. Select destination zone Untrust.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 220.0.10.100.

  1. Enter destination IPv4 address 220.0.0.100.

  1. Use the default settings for other parameters.

  1. Click OK.

# On the Security Policies page, click Create.

# Configure a security policy named untrust-local to permit specific traffic from the Untrust to Local security zones:

  1. Set the security policy name to untrust-local.

  1. Select source zone Untrust.

  1. Select destination zone Local.

  1. Select IPv4 as the type.

  1. Select action Permit.

  1. Enter source IPv4 address 220.0.0.100.

  1. Enter destination IPv4 address 220.0.10.100.

  1. Use the default settings for other parameters.

  1. Click OK.

  1. Create an IKE proposal:

# On the top navigation bar, click Network.

# From the navigation pane, select VPN > IPsec > IKE Proposals.

# Click Create.

# Click OK.

Figure 6 Creating an IKE proposal

 

  1. Configure the IPsec policy:

# On the top navigation bar, click Network.

# From the navigation pane, select VPN > IPsec > IPsec Policies.

# Click Create.

# Configure the basic settings as follows:

Figure 7 Basic settings

 

# Configure the IKE profile settings as follows:

Figure 8 IKE profile settings

 

# Configure the data flow filter rules as follows:

# Click OK.

Figure 9 Creating a data flow filter rule

 

# Set the IPsec SA triggering mode to Traffic-based.

# Configure the IPsec advanced settings as follows:

# Click OK.

Verifying the configuration

  1. Verify that Device A and Device B can communicate with each other.

  1. On Device A, display IPsec tunnel information:

# On the top navigation bar, click Network.

# From the navigation pane, select VPN > IPsec > IPsec Tunnels. The established IPsec tunnel is displayed.

# Click the Details icon for the IPsec tunnel. The Tunnel Details page displays tunnel information, SA information, and tunnel statistics.

Figure 10 Details of the IPsec tunnel on Device A

 

  1. On Device B, display IPsec tunnel information:

# On the top navigation bar, click Network.

# From the navigation pane, select VPN > IPsec > IPsec Tunnels. The established IPsec tunnel is displayed.

# Click the Details icon for the IPsec tunnel. The Tunnel Details page displays tunnel information, SA information, and tunnel statistics.

Figure 11 Details of the IPsec tunnel on Device B