Windows Dev Center

Negotiation Discovery Transport Mode in Boundary Mode

The Negotiation Discovery Transport Mode in Boundary Mode IPsec policy scenario requests IPsec transport mode protection for all matching traffic. If the IKE/AuthIP negotiation fails, both inbound and outbound connections are allowed to fallback to clear-text .

This IPsec policy is typically used on machines that are accessed by both IPsec capable and non-IPsec capable machines.

An example of a potential Negotiation Discovery Transport Mode scenario is "Secure all unicast data traffic, except ICMP, using IPsec transport mode and enable negotiation discovery in boundary mode."

To implement this example programmatically, use the following WFP configuration.

Bb736267.wedge(en-us,VS.85).gifAt FWPM_LAYER_IKEEXT_V{4|6} setup MM negotiation policy

  1. Add one or both of the following MM policy provider contexts.

    • For IKE, a policy provider context of type FWPM_IPSEC_IKE_MM_CONTEXT.
    • For AuthIP, a policy provider context of type FWPM_IPSEC_AUTHIP_MM_CONTEXT.
    Note  A common keying module will be negotiated and the corresponding MM policy will be applied. AuthIP is the preferred keying module if both IKE and AuthIP are supported.
  2. For each of the contexts added in step 1, add a filter with the following properties.
    Filter propertyValue
    Filtering conditionsEmpty. All traffic will match the filter.
    providerContextKeyGUID of the MM provider context added in step 1.

     

Bb736267.wedge(en-us,VS.85).gifAt FWPM_LAYER_IPSEC_V{4|6} setup QM and EM negotiation policy

  1. Add one or both of the following QM transport mode policy provider contexts and set the IPSEC_POLICY_FLAG_ND_BOUNDARY flag.

    • For IKE, a policy provider context of type FWPM_IPSEC_IKE_QM_TRANSPORT_CONTEXT.
    • For AuthIP, a policy provider context of type FWPM_IPSEC_AUTHIP_QM_TRANSPORT_CONTEXT. This context can optionally contain the AuthIP Extended Mode (EM) negotiation policy.
    Note  A common keying module will be negotiated and the corresponding QM policy will be applied. AuthIP is the preferred keying module if both IKE and AuthIP are supported.
  2. For each of the contexts added in step 1, add a filter with the following properties.
    Filter propertyValue
    Filtering conditionsEmpty. All traffic will match the filter.
    providerContextKeyGUID of the QM provider context added in step 1.

     

Bb736267.wedge(en-us,VS.85).gifAt FWPM_LAYER_INBOUND_TRANSPORT_V{4|6} setup inbound per-packet filtering rules

  1. Add a filter with the following properties.
    Filter propertyValue
    FWPM_CONDITION_IP_LOCAL_ADDRESS_TYPE filtering conditionNlatUnicast
    action.typeFWP_ACTION_CALLOUT_TERMINATING
    action.calloutKeyFWPM_CALLOUT_IPSEC_INBOUND_TRANSPORT_V{4|6}
    rawContext FWPM_CONTEXT_IPSEC_INBOUND_PERSIST_CONNECTION_SECURITY

     

  2. Exempt ICMP traffic from IPsec by adding a filter with the following properties.
    Filter propertyValue
    FWPM_CONDITION_IP_LOCAL_ADDRESS_TYPE filtering condition NlatUnicast
    FWPM_CONDITION_IP_PROTOCOL filtering conditionIPPROTO_ICMP{V6}

    These constants are defined in winsock2.h.

    action.typeFWP_ACTION_PERMIT
    weight FWPM_WEIGHT_RANGE_IKE_EXEMPTIONS

     

Bb736267.wedge(en-us,VS.85).gifAt FWPM_LAYER_OUTBOUND_TRANSPORT_V{4|6} setup outbound per-packet filtering rules

  1. Add a filter with the following properties.
    Filter propertyValue
    FWPM_CONDITION_IP_LOCAL_ADDRESS_TYPE filtering condition NlatUnicast
    action.typeFWP_ACTION_CALLOUT_TERMINATING
    action.calloutKeyFWPM_CALLOUT_IPSEC_OUTBOUND_TRANSPORT_V{4|6}
    rawContext FWPM_CONTEXT_IPSEC_OUTBOUND_NEGOTIATE_DISCOVER

     

  2. Exempt ICMP traffic from IPsec by adding a filter with the following properties.
    Filter propertyValue
    FWPM_CONDITION_IP_LOCAL_ADDRESS_TYPE filtering condition NlatUnicast
    FWPM_CONDITION_IP_PROTOCOL filtering conditionIPPROTO_ICMP{V6}

    These constants are defined in winsock2.h.

    action.typeFWP_ACTION_PERMIT
    weightFWPM_WEIGHT_RANGE_IKE_EXEMPTIONS

     

Note  As opposed to Negotiation Discovery Transport Mode, for Negotiation Discovery Transport Mode in Boundary Mode policy there is no need to add a filter at the FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V{4|6} layers because this policy allows inbound unprotected clear-text connections.

Related topics

Sample code: Using Transport Mode
ALE Layers
Built-in Callout Identifiers
Filtering Conditions
Filtering Layer Identifiers
FWPM_ACTION0
FWPM_PROVIDER_CONTEXT_TYPE

 

 

Community Additions

ADD
Show:
© 2015 Microsoft