Example #1
0
    # Specify the location of the server key file on the vRouter
    vpn.set_ipsec_site_to_site_peer_auth_srv_key_file(peer_node, srv_key_file)

    # Specify the password for the server key file
    srv_key_pswd = 'testpassword'
    vpn.set_ipsec_site_to_site_peer_auth_srv_key_pswd(peer_node, srv_key_pswd)

    # Specify the default ESP group for all tunnels
    esp_group_name = 'ESP-1W'
    vpn.set_ipsec_site_to_site_peer_default_esp_group(peer_node,
                                                      esp_group_name)

    # Specify the IKE group
    ike_group_name = 'IKE-1W'
    vpn.set_ipsec_site_to_site_peer_ike_group(peer_node, ike_group_name)

    # Identify the IP address on the vRouter to be used for this connection
    local_address = '192.0.2.1'
    vpn.set_ipsec_site_to_site_peer_local_address(peer_node, local_address)

    # Create a tunnel configuration and provide local and remote subnets
    # for this tunnel
    tunnel = 1
    local_prefix = '192.168.40.0/24'
    remote_prefix = '192.168.60.0/24'
    vpn.set_ipsec_site_to_site_peer_tunnel_local_prefix(
        peer_node, tunnel, local_prefix)
    vpn.set_ipsec_site_to_site_peer_tunnel_remote_prefix(
        peer_node, tunnel, remote_prefix)
Example #2
0
    # Specify the location of the server key file on the vRouter
    vpn.set_ipsec_site_to_site_peer_auth_srv_key_file(peer_node, srv_key_file)

    # Specify the password for the server key file
    srv_key_pswd = 'testpassword'
    vpn.set_ipsec_site_to_site_peer_auth_srv_key_pswd(peer_node, srv_key_pswd)

    # Specify the default ESP group for all tunnels
    esp_group_name = 'ESP-1W'
    vpn.set_ipsec_site_to_site_peer_default_esp_group(peer_node,
                                                      esp_group_name)

    # Specify the IKE group
    ike_group_name = 'IKE-1W'
    vpn.set_ipsec_site_to_site_peer_ike_group(peer_node, ike_group_name)

    # Identify the IP address on the vRouter to be used for this connection
    local_address = '192.0.2.1'
    vpn.set_ipsec_site_to_site_peer_local_address(peer_node, local_address)

    # Create a tunnel configuration and provide local and remote subnets
    # for this tunnel
    tunnel = 1
    local_prefix = '192.168.40.0/24'
    remote_prefix = '192.168.60.0/24'
    vpn.set_ipsec_site_to_site_peer_tunnel_local_prefix(peer_node, tunnel,
                                                        local_prefix)
    vpn.set_ipsec_site_to_site_peer_tunnel_remote_prefix(peer_node, tunnel,
                                                         remote_prefix)