Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX IPSec version A.02.00 Administrator's Guide: HP-UX 11i version 1 and HP-UX 11i version 2 > Chapter 3 Configuring HP-UX IPSec

Step 2: Configuring Tunnel IPSec Policies

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Complete this step only if you are using IPSec tunnels. If you are not using IPSec tunnels, continue to “Step 3: Configuring IKE Policies”.

Tunnel IPSec policies specify HP-UX IPSec behavior for IP packets tunneled by the local system. In an IPSec tunnel, a tunnel endpoint system encapsulates the original packet in a new IPSec packet with an AH or ESP header. The other tunnel endpoint system processes the AH or ESP header, decapsulates the packet, and sends the packet to the destination address in the original packet header.

An HP-UX system can be the end host in a host-to-host tunnel topology, or the end host in a host-to-gateway tunnel topology.

If the system is an HP-UX Mobile IPv6 Home Agent, it can also act as a gateway, but only when forwarding packets between a Mobile IPv6 client and its Correspondent Node. See Chapter 7 “HP-UX IPSec and HP-UX Mobile IPv6” if you are configuring HP-UX IPSec for Mobile IPv6.

Tunnel IPSec policies are referenced in host or gateway IPSec policies. HP-UX IPSec first selects a host or gateway IPSec policy to use for a packet. If the IPSec policy specifies a tunnel policy, HP-UX IPSec uses the information in the tunnel IPSec policy to establish an IPSec tunnel with the tunnel destination.

If the local system is a tunnel endpoint, you must configure tunnel IPSec policies. HP recommends that you use an ipsec_config batch file to configure tunnel IPSec policies.

ipsec_config add tunnel Syntax

If you are not using manual keys, you can use the following ipsec_config add tunnel syntax in most installations:

ipsec_config add tunnel tunnel_policy_name
-tsource tunnel_address -tdestination tunnel_address
[-source ip_addr[/prefix][/port_number|service_name]]]
[-destination ip_addr[/prefix][/port_number|service_name]]]
[-protocol protocol_id] [-action transform_list]

HP recommends that you use an ipsec_config batch file to configure HP-UX IPSec. To specify an add tunnel operation for an ipsec_config batch file, use the above syntax without the ipsec_config command name:

add tunnel tunnel_policy_name -tsource tunnel_address
-tdestination tunnel_address
[-source ip_addr[/prefix][/port_number|service_name]]]
[-destination ip_addr[/prefix][/port_number|service_name]]]
[-protocol protocol_id] [-action transform_list]

The full ipsec_config add tunnel syntax specification also allows you to specify the following arguments:

  • nocommit (verify the syntax but do not commit the information to the database)

  • profile (alternate profile file)

  • in and out (inbound and outbound SA information for manual keys)

Refer to the ipsec_config(1M) manpage for full syntax information.

tunnel_policy_name

The tunnel_policy_name is the user-defined name for the tunnel IPSec policy. This name must be unique for each tunnel IPSec policy and is case-sensitive.

Acceptable Values: 1 - 63 characters. Each character must be an ASCII alphanumeric character, hyphen (-), or underscore (_).

-tsource and -tdestination tunnel_address

The tunnel_address is the IP address for the tunnel endpoint. The -tsource tunnel_address is the local tunnel endpoint; the -tdestination tunnel_address is the remote tunnel endpoint.

Acceptable Values: An IPv4 address in dotted-decimal notation or an IPv6 address in colon-hexadecimal notation. The IP address type (IPv4 or IPv6) must be the same for the tunnel source and destination address. HP-UX IPSec does not support unspecified IPv6 addresses. However, you can use the double-colon (::) notation within a specified IPv6 address to denote a number of zeros (0) within an address. The address must be a unicast address.

Default: None.

-source and -destination ip_addr[/prefix[/port_number|service_name]]

HP-UX IPSec uses the ip_addr, prefix, and port_number or service_name] with the protocol argument to form an address identifier. When negotiating an outbound IPSec tunnel SA, HP-UX IPSec uses the source address identifier as the proxy source ID, and uses the destination address identifier as the proxy destination ID. When negotiating an inbound IPSec tunnel SA, HP-UX IPSec uses the destination address identifier as the proxy source ID and the source address identifier as the proxy destination ID. The proxy ID values must exactly match the proxy ID values on the remote system.

If you are using manual keys with an IPv6 ESP, HP-UX IPSec also uses the address identifier to verify the address fields in the original (end-to-end) packet. For an outbound tunneled packet (the local address is the source address in the tunnel packet header), HP-UX IPSec verifies the source address identifier with the source address fields in the original packet, and the destination address identifier with the destination address fields in the original packet. For an inbound tunneled packet (the local address is the destination address in the tunnel packet header), HP-UX IPSec verifies the source address identifier with the destination address fields in the original packet, and the destination address identifier with the source address fields in the original packet.

Default: If you do not specify ip_addr, prefix, and port_number or service_name, ipsec_config uses the value of the source or destination parameter in the TunnelPolicy-Defaults section of the profile file used.of the profile file used. The default value for source and destination is 0.0.0.0/0/0 (match any IPv4 address, any port).

Where:

ip_addr

The ip_addr is the proxy (end system) source or destination IP address.

Acceptable Values: An IPv4 address in dotted-decimal notation or an IPv6 address in colon-hexadecimal notation. The IP address type (IPv4 or IPv6) must be the same for the source and destination address. HP-UX IPSec does not support unspecified IPv6 addresses. However, you can use the double-colon (::) notation within a specified IPv6 address to denote a number of zeros (0) within an address. The address must be a unicast address.

prefix

The prefix is the prefix length, or the number of leading bits that must match when comparing the IP address in a packet with ip_addr.

For IPv4 addresses, a prefix length of 32 bits indicates that all the bits in both addresses must match. This prefix length is equivalent to an address mask of 255.255.255.255. Use a value less than 32 to specify a subnet address filter.

For IPv6 addresses, a prefix length of 128 bits indicates that all the bits in both addresses must match. Use a value less than 128 to specify a subnet address filter.

Range: 0 - 32 for an IPv4 address; 0 - 128 for an IPv6 address. If you are using manual keys, prefix must be 32 if ip_addr is an IPv4 address or 128 if ip_addr is an IPv6 address.

Default: 32 if ip_addr is a non-zero IPv4 address, 128 if ip_addr is a non-zero IPv6 address, or 0 (match any address) if ip_addr is an all-zeros address (0.0.0.0 or 0::0). You must specify a prefix value if you specify a port or service name as part of the address filter.

port

The port is the upper-layer protocol (TCP or UDP) port number Specify the upper-layer protocol with the protocol argument described below. The upper-layer protocol must be TCP or UDP if you specify a non-zero port number

Acceptable Values: 0 - 65535. 0 indicates all ports.

NOTE: The port value must be 0 if the corresponding host policy (the host policy that references this tunnel policy) uses a transform (the corresponding host policy action is not PASS).

Default: 0 (all ports).

service_name

The service_name is a character string that specifies a network service. The ipsec_config utility will add a policy to the configuration database with the appropriate port number and protocol, as listed below. You cannot specify service_name and protocol in the same policy.

See Table 3-1 “ipsec_config Service Names” for a list of valid service names.

-protocol protocol_id

The protocol is the value or name of the upper-layer protocol that HP-UX IPSec uses in the address filter to select an IPSec policy for a packet. You cannot specify protocol and service_name in the same policy.

Specifying ICMPV6 affects only the following ICMPv6 messages: Echo Request, Echo Reply, Mobile Prefix Solicitation, Mobile Prefix Advertisement.

To ensure proper operation of IPv6 networks, HP-UX IPSec always allows all ICMPv6 messages not listed above to pass in clear text

Acceptable Values: Integer value 0 (any protocol) - 255, or one of the following protocol names:

  • TCP

  • UDP

  • ICMP

  • ICMPV6

  • IGMP

  • MH (Mobile IPv6 Mobility Headers)

  • ALL (any protocol)

The protocols ICMP and IGMP are valid with IPv4 addresses only. The protocols ICMPV6 and MH are valid with IPv6 addresses only.

NOTE: The protocol value must be ALL or 0 if the corresponding host policy (the host policy that references this tunnel policy) uses a transform (the host policy action is not PASS).

Default: ALL.

CAUTION: Discarding or requiring ICMP messages (Internet Control Message Protocol messages for IPv4; protocol value 1) to be encrypted or authenticated may cause connectivity problems. See Appendix A “Product Specifications”, “IPv4 ICMP Messages” for more information.

-action transform_list

A transform specifies the IPSec authentication and encryption applied to packets using AH (Authentication Header) and ESP (Encapsulation Security Payload) headers. A transform list specifies the transforms acceptable for packets using the policy. The HP-UX IPSec IKE daemon proposes the transform list when negotiating the transform for IPSec Security Associations (SAs) with a remote system.

The transform_list in a tunnel policy are tunnel transports applied to packets encapsulated between the tunnel endpoints.

If you are using dynamic keys, the transform list can contain:

  • A list that contains up to 2 AH transforms

  • A list that contains up to 8 ESP transforms, including Authenticated ESP transforms

  • A list that contains one nested transform (ESP nested inside of AH) transform

Use a comma to separate multiple transform specifications.

The order of transforms in the transform list is significant. The first transform is the most preferable and the last transform is the least preferable. At least one transform must match a transform configured on the remote system.

The format for each transform is:

transform_name[/lifetime_seconds[/lifetime_kbytes]]

Where:

transform_name

A transform_name is a valid AH (Authentication Header) or ESP (Encapsulation Security Payload) transform name, as specified in Table 3-2 “ipsec_config Transforms”, or a nested AH and ESP transform formed by joining an AH transform and an ESP transform with a plus sign (+). For example, AH_MD5+ESP_3DES.

TIP: AES128 is the most secure form of encryption, with performance comparable to or better than DES and 3DES. For added security, use AES in an authenticated ESP transform, such as ESP_AES128_HMAC_SHA1.

ESP transforms without authentication (such as ESP-AES128) do not provide data integrity and should not be used.

Default: The transform defined for the action parameter in the TunnelPolicy-Defaults section of the profile file used. The default action is ESP_AES128_HMAC_SHA1.

lifetime_seconds

The lifetime_seconds is the maximum lifetime for the IPSec SA, in seconds. A transform lifetime can be specified by time (seconds), and by kilobytes transmitted or received. HP-UX IPSec considers the lifetime to be exceeded if either value is exceeded.

Range: 0 (infinite), or 600 - 4294967294 seconds (approximately 497102 days).

Default: 28,800 (8 hours).

lifetime_kbytes

The lifetime_kbytes is the maximum lifetime for the IPSec SA, measured by kilobytes transmitted or received. A transform lifetime can be specified by time (seconds), and by kilobytes transmitted or received. HP-UX IPSec considers the lifetime to be exceeded if either value is exceeded.

Range: 0 (infinite), or 5120 - 4294967294 kilobytes.

Default: 0 (infinite).

CAUTION: HP recommends that you do not specify an infinite value for lifetime_seconds (0) with a finite value for lifetime_kbytes.

Tunnel IPSec Policy Configuration Example

The local system (10.1.1.1) is using a host-to-host tunnel with system 10.2.2.2. The following batch file entry configures the tunnel to use authenticated ESP, with AES128 encryption and HMAC SHA-1 authentication.

ipsec_config add tunnel my_host_host_tunnel \
-tsource 10.1.1.1 -tdestination 10.2.2.2 \
-source 10.1.1.1 -destination 10.2.2.2 \
-action ESP_AES128_HMAC_SHA1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.