HOWTO: Configure ISAKMP between OpenBSD and Checkpoint FW-1


  1. Presumptions


  2. Prerequisites




  3. Configuration of isakmpd.policy

    Create /etc/isakmpd/isakmpd.policy


    Keynote-version: 2
    Authorizer: "POLICY"
    Conditions: app_domain == "IPsec policy" &&
                    esp_present == "yes" &&
                    esp_enc_alg != "null" -> "true";
    



  4. Configuration of isakmpd.conf

    Because of the way isakmpd for OpenBSD handles networks, you'll need to "create" a connection section for each network. I use a naming convention of VPN-local_tunnel-remote_tunnel-remote_network.

    Example:
    VPN-myhost-theirhost-10.0.0.0/255.255.255.0

    You'll also need to create network sections for each network.
    I use a naming convention of network_name-network_with_mask

    Example:
    mynetwork-192.168.0.0/255.255.255.0

    Note: the section names can be in any format, they just have to be unique and I'd recommend not using spaces for those you create.

    For the remainder of this HOWTO the following networks will be used as examples:
    OPENBSD_INSIDE_NETWORKS = 192.168.0.0/255.255.255.0
    CHECKPOINT_INSIDE_NETWORKS = 10.0.0.0/255.255.255.0 and 172.16.0.0/255.255.0.0

    This creates the following connection secions:
    VPN-myhost-theirhost-10.0.0.0/255.255.255.0
    VPN-myhost-theirhost-172.16.0.0/255.255.255.0


    and the following network sections:
    mynetwork-192.168.0.0/255.255.0.0
    theirnetwork-10.0.0.0/255.255.255.0
    theirnetwork-172.16.0.0/255.255.255.0


    Now to create /etc/isakmpd/isakmpd.conf

    or click this link to generate one dynamically...


    [General]
    Retransmits=		5
    Exchange-max-time=	120
    Listen-on=		[OPENBSD_WAN_IP]
    
    [Phase 1]
    [CHECKPOINT_WAN_IP]=	openbsd-checkpoint
    
    [openbsd-checkpoint]
    Phase=			1
    Transport=		udp
    Local-address=		[OPENBSD_WAN_IP]
    Address=		[CHECKPOINT_WAN_IP]
    Configuration=		Default-main-mode
    Authentication=		[CHECKPOINT_SECRET]
    
    [Phase 2]
    Connections=		VPN-myhost-theirhost-10.0.0.0/255.255.255.0, VPN-myhost-theirhost-172.16.0.0/255.255.255.0
    
    [VPN-myhost-theirhost-10.0.0.0/255.255.255.0]
    Phase=			2
    ISAKMP-peer=		openbsd-checkpoint
    Configuration=		Default-quick-mode
    Local-ID=		mynetwork-192.168.0.0/255.255.255.0
    Remote-ID=		theirnetwork-10.0.0.0/255.255.255.0
    
    [VPN-myhost-theirhost-172.16.0.0/255.255.255.0]
    Phase=			2
    ISAKMP-peer=		openbsd-checkpoint
    Configuration=		Default-quick-mode
    Local-ID=		mynetwork-192.168.0.0/255.255.255.0
    Remote-ID=		theirnetwork-172.16.0.0/255.255.255.0
    
    [mynetwork-192.168.0.0/255.255.255.0]
    ID-type=		IPV4_ADDR_SUBNET
    Network=		192.168.0.0
    Netmask=		255.255.255.0
    
    [theirnetwork-10.0.0.0/255.255.255.0]
    ID-type=		IPV4_ADDR_SUBNET
    Network=		10.0.0.0
    Netmask=		255.255.255.0
    
    [theirnetwork-172.16.0.0/255.255.255.0]
    ID-type=		IPV4_ADDR_SUBNET
    Network=		172.16.0.0
    Netmask=		255.255.0.0
    
    [Default-main-mode]
    DOI=			IPSEC
    EXCHANGE_TYPE=		ID_PROT
    Transforms=		3DES-SHA
    #	The above 3DES-SHA is based on [CHECKPOINT_KEY_ENC] and [CHECKPOINT_HASH]  see the manpage for isakmpd.conf for other alternatives. 
    
    [Default-quick-mode]
    DOI=			IPSEC
    EXCHANGE_TYPE=		QUICK_MODE
    Suites=			QM-ESP-3DES-SHA-SUITE
    



  5. Adding routes

    You now need to change the routes on your OpenBSD host so that traffic destined for the remote VPN, will use the VPN rather than your default gateway.
    The format of the command is as follows:

    route add -net remote_network -netmask dotted-netmask [OPENBSD_LAN_IP]

    Example:
    # route add -net 10.0.0.0/24 192.168.0.1
    Note: you'll want to add these new static routes to your startup scripts. Easiest is /etc/rc.local, recommended is /etc/rc.conf using the rc.conf format for static_routes.


  6. Important Notes