config setup
    uniqueids=never # allow multiple connections per user
    charondebug="ike {{ strongswan_log_level }}, knl {{ strongswan_log_level }}, cfg {{ strongswan_log_level }}, net {{ strongswan_log_level }}, esp {{ strongswan_log_level }}, dmn {{ strongswan_log_level }},  mgr {{ strongswan_log_level }}"

conn %default
    fragmentation=yes
    rekey=no
    dpdaction=clear
    keyexchange=ikev2
    compress=yes
    dpddelay=35s

{% if algo_windows %}
    ike={{ ciphers.compat.ike }}
    esp={{ ciphers.compat.esp }}
{% else %}
    ike={{ ciphers.defaults.ike }}
    esp={{ ciphers.defaults.esp }}
{% endif %}

    left=%any
    leftauth=pubkey
    leftid={{ IP_subject_alt_name }}
    leftcert={{ IP_subject_alt_name }}.crt
    leftsendcert=always
    leftsubnet=0.0.0.0/0,::/0

    right=%any
    rightauth=pubkey
    rightsourceip={{ vpn_network }},{{ vpn_network_ipv6 }}
{% if algo_local_dns or dns_encryption %}
    rightdns={{ local_service_ip }}
{% else %}
    rightdns={% for host in dns_servers.ipv4 %}{{ host }}{% if not loop.last %},{% endif %}{% endfor %}{% if ipv6_support %},{% for host in dns_servers.ipv6 %}{{ host }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
{% endif %}

conn ikev2-pubkey
    auto=add
