config setup
    uniqueids=never 
    #charondebug="ike 2, knl 2, cfg 2, net 2, esp 2, dmn 2, mgr 2" 
conn %default
    left=%defaultroute           #服务器端标识,%any表示任意
    leftsubnet=0.0.0.0/0         #服务器端虚拟ip, 0.0.0.0/0表示通配.
    right=%any                   #客户端标识,%any表示任意
    
conn iOS_cert
    keyexchange=ikev1
    fragmentation=yes
    leftauth=pubkey
    leftcert=serverCert.pem
    rightauth=pubkey
    rightauth2=xauth
    rightsourceip=10.12.0.0/24
    auto=add
conn android_xauth_psk
    keyexchange=ikev1
    leftauth=psk
    rightauth=psk
    rightauth2=xauth
    rightsourceip=10.12.0.0/24
    auto=add
conn networkmanager-strongswan
    keyexchange=ikev2
    leftauth=pubkey
    leftcert=serverCert.pem
    rightauth=pubkey
    rightsourceip=10.12.0.0/24
    auto=add
conn ios_ikev2
    keyexchange=ikev2
    ike=aes256-sha256-modp2048,3des-sha1-modp2048,aes256-sha1-modp2048!
    esp=aes256-sha256,3des-sha1,aes256-sha1!
    rekey=no
    leftid=VPNIP
    leftsendcert=always
    leftcert=serverCert.pem
    rightauth=eap-radius
    rightsourceip=10.12.0.0/24
    rightsendcert=never
    eap_identity=%any
    dpdaction=clear
    fragmentation=yes
    auto=add
conn CiscoIPSec
	keyexchange=ikev1
	auto=add
	aggressive=yes
	compress=yes
	ike=aes256-sha1-modp1024!
	esp=aes256-sha1!
	#ike=aes128-md5-modp1024
	#esp=aes128-md5
	dpdaction=clear
	leftid=GROUPNAME  #group name
	type=tunnel
	xauth=server
	leftauth=psk
	rightauth=psk
	rightsourceip=10.12.0.0/24
	#rightauth=eap-radius
	rightauth2=xauth-eap
	leftfirewall=yes
conn windows7
    keyexchange=ikev2
    ike=aes256-sha1-modp1024!
    rekey=no
    leftauth=pubkey
    leftsubnet=0.0.0.0/0
    leftcert=serverCert.pem
    #right=%any
    rightauth=eap-radius
    #rightauth=eap-mschapv2
    rightsourceip=10.12.0.0/24
    rightsendcert=never
    eap_identity=%any
    auto=add
	
conn L2TP-PSK-NAT
    rightsubnet=vhost:%priv
    also=L2TP-PSK-noNAT

conn L2TP-PSK-noNAT
    authby=secret
    #pfs=no
    #esp=3des-sha1-96           #安卓6以上，由于加密方式的改变无法连接
	esp=aes256-sha256_96,3des-sha1,aes256-sha1!
    auto=add
    keyingtries=3
    rekey=no
    ikelifetime=8h
    keylife=1h
    type=transport
    left=%defaultroute
    leftid=%any
    leftprotoport=17/1701
    right=%any
    rightprotoport=17/%any
    dpddelay=10
    dpdtimeout=25
    dpdaction=clear
