The z/OS UNIX ipsec command syntax

Use the z/OS® UNIX ipsec command to display and modify IP security information and defensive filter information on the host z/OS system. With the -z option or the -x primary option specified, the ipsec command displays and modifies IP security information for NSS IPSec clients using the IPSec network management service.

Restriction: When you use the ipsec command to interface with the NSS IPSec network management service, you must issue the ipsec command on the same host z/OS system on which the NSS server is running.

To display and modify IP security information, the ipsec command interacts with both the IKE daemon and a TCP/IP communications stack. One or more stacks can be running concurrently on the host z/OS system. While there is at most one IKE daemon, its data is managed on a per stack basis. The ipsec command reports IKED NSS IPSec client information using the -w primary option for multiple stacks. It reports NSS server information using the -x primary option for multiple NSS IPSec clients. For the other ipsec command primary options, the ipsec command is always specified for a single stack (using the -p option) or NSS IPSec client (using the -z option). If the -p option and the -z option are not specified, the command is directed to the default stack on the local system. The default stack refers to the default TCP/IP address space that is specified on the TCPIPJOBNAME statement in the resolver configuration data set.

To display and modify defensive filter information, the ipsec command interacts with both the Defense Manager daemon (DMD) and a TCP/IP communications stack. One or more stacks can be running concurrently on the host z/OS system. Only one DMD can be running on the system. Direct the ipsec command -F primary option to the DMD by specifying the -G (global scope) option. If the -G option is not specified, the ipsec command -F option is directed to a single stack. This can be the stack that is specified with the -p option or the default stack. The default stack is the default TCP/IP address space that is specified on the TCPIPJOBNAME statement in the resolver configuration data set.

Restriction: You cannot display and manage defensive filters for an NSS IPSec client using the -z option.

The actual configuration of IP security entities is managed through Policy Agent policy file specifications. In the policy file definition, network resources and collections of network resources receive names that assist in the management process. Use ipsec command options -n, -g, and -l to identify resources by their policy specification name.

Defensive filters are not configured in Policy Agent policy files. You can add defensive filters to the TCP/IP stack in response to a detected intrusion with the ipsec command defensive filter add command. The defensive filter's name is assigned on the add action. Use the ipsec command option -N to identify a defensive filter by its name.

Rule: All policy names and defensive filter names are case sensitive.

Tip: Use spaces or commas as valid delimiters to separate ipsec command parameter values.

Additionally, as tunnels are initiated and established, they also receive a system-assigned name, known as a tunnel ID. System-assigned tunnel IDs take the form of an integer prefixed with a single letter that identifies the tunnel type. The prefix can be M (manual), K (Internet Key Exchange), or Y (dynamic). The integer is based on a 32-bit counter that is incremented at each assignment and wraps at 4,294,967,295. Remember that tunnel IDs are arbitrary and transitory strings. Manual tunnel IDs are assigned when a manual tunnel is installed in the stack by the Policy Agent. A change in the manual tunnel policy definition results in assignment of a new manual tunnel ID. Dynamic and IKE tunnel IDs are assigned when a tunnel is established. They remain consistent for the life of the stack and the life of the IKE daemon. Use the -a option to identify resources by their tunnel ID.

In addition to the brief help (ipsec -?), a man page describes the command syntax and options in detail (man ipsec). The ipsec command options are discussed in the following sections.

Format:

Read syntax diagramSkip visual syntax diagramipsecPrimary Option Global Option
Primary Option
Read syntax diagramSkip visual syntax diagram -fIP Filter OptionStackname Option -FDefensive Filter OptionTarget Option -mManual Tunnel OptionStackname Option -kIKE Tunnel OptionStackname Option -yDynamic Tunnel OptionStackname Option -iInterface OptionStackname Option -tIP Traffic Test OptionStackname Option -oNATT Port Translation OptionStackname Option -wIKED Network Security Option -xNetwork Security Server Option -z  nsclienttname -?
Global Option
Read syntax diagramSkip visual syntax diagram -d  3 debuglevel
Stackname Option
Read syntax diagramSkip visual syntax diagram -p stackname -z nsclientname
Target Option
Read syntax diagramSkip visual syntax diagram -p stackname -G
IP Filter Option
Read syntax diagramSkip visual syntax diagramdisplay -r detail -rshortdetailwide -c current -ccurrentpolicyprofileFilter Seldefaultreload
Filter Selection
Read syntax diagramSkip visual syntax diagram  -aY nnM nn -nIpFilterRuleName -NDefensiveFilterName -gIpFilterGroupName -h
Defensive Filter Option
Read syntax diagramSkip visual syntax diagramdisplay -r detail -rshortdetailwide -NDefensiveFilterNameaddDefensive Filter Spec -NDefensiveFilterNameupdateDefensive Filter Update Spec -NDefensiveFilterNamedelete-NallDefensiveFilterName
Defensive Filter Specification
Read syntax diagramSkip visual syntax diagram srcipallsrcipipaddressipaddress/prefixLengthall destipalldestipipaddressipaddress/prefixLengthall protallprottcp6PortSpecificationudp17PortSpecificationicmp1IcmpSpecificationicmpv658IcmpSpecificationigmpospfopaquenalldirinbounddiroutboundinboundroutinglocalroutinglocalroutedFragmentSpecificationeithermodeblockmodeblocksimulatelogyeslogyesnologlimitvalue_of_DMD_configuration_DefaultLogLimit_parameterloglimit0nlifetime30lifetimelifetime
PortSpecification
Read syntax diagramSkip visual syntax diagram srcportallsrcportnnmall destportalldestportnnmall
IcmpSpecification
Read syntax diagramSkip visual syntax diagram typealltypenall codeallcodenall
FragmentSpecification
Read syntax diagramSkip visual syntax diagram fragmentsonlynofragmentsonlynoyes
Defensive Filter Update Specification
Read syntax diagramSkip visual syntax diagram modeblocksimulate lifetimelifetime logyesno loglimit0n
Manual Tunnel Option
Read syntax diagramSkip visual syntax diagramdisplay -r detail -rshortdetailwideMan Tunnel SelactivateMan Tunnel SeldeactivateMan Tunnel Sel -a all
Man Tunnel Selection
Read syntax diagramSkip visual syntax diagram -a,M nn -n, IpManVpnActionName
IKE Tunnel Option
Read syntax diagramSkip visual syntax diagramdisplay -r detail -rshortdetailwide -c current -ccurrentallIKE Tunnel Sel -edeactivateIKE tunnel Sel2 -a  allrefreshIKE Tunnel Sel2
IKE Tunnel Selection
Read syntax diagramSkip visual syntax diagram -a,K nn -n, KeyExchangeRuleName
IKE Tunnel Selection2
Read syntax diagramSkip visual syntax diagram -a,K nn
Dynamic Tunnel Option
Read syntax diagramSkip visual syntax diagramdisplay -r detail -rshortdetailwide -c current -ccurrentall -bDyn Tunnel Sel -sactivate -l,LocalDynVpnRuleNamedeactivateDyn Tunnel Sel2 -a allrefreshDyn Tunnel Sel2
Dyn Tunnel Selection
Read syntax diagramSkip visual syntax diagram -a ,Y nn -n ,IpDynVpnActionName -l ,LocalDynVpnRuleName
Dyn Tunnel Selection2
Read syntax diagramSkip visual syntax diagram -a ,Y nn -l ,LocalDynVpnRuleName
Interface Option
Read syntax diagramSkip visual syntax diagram display  -r detail -rshortdetailwide
IP Traffic Test Option
Read syntax diagramSkip visual syntax diagramSrcIpAddrDestIpAddr tcp  SrcPort  DestPortudp  SrcPort  DestPorticmpicmpv6igmpipipahespospfn outin  SecurityClassout  -r detail -rshortdetailwide
NATT Port Translation Option
Read syntax diagramSkip visual syntax diagramdisplay  -r detail -r shortdetailwide  -q rmtIpAddr -u ,rmtPort
IKED Network Security Option
Read syntax diagramSkip visual syntax diagramdisplay  -r detail -r shortdetailwide
Network Security Server Option
Read syntax diagramSkip visual syntax diagramdisplay  -r detail -r shortdetailwide