我正在寻找 IKEv2 VPN 的配置说明,它使用pre-shared keys而不是certs(这些是我假设的隧道加密的不同方法?)。
我已经按照这个精彩的教程让 IKEv2 VPN 工作(使用certificate)并且它工作正常。
我的问题是需要更改什么才能使用它PSK?我假设更改/etc/ipsec.secrets并且/etc/ipsec.conf将要进行。
我的当前ipsec.conf看起来像这样:
config setup
charondebug="ike 1, knl 1, cfg 0"
uniqueids=no
conn ikev2-vpn
auto=add
compress=no
type=tunnel
keyexchange=ikev2
fragmentation=yes
forceencaps=yes
ike=aes256-sha1-modp1024,3des-sha1-modp1024!
esp=aes256-sha1,3des-sha1!
dpdaction=clear
dpddelay=300s
rekey=no
left=%any
leftid=@server_name_or_ip
leftcert=/etc/ipsec.d/certs/vpn-server-cert.pem
leftsendcert=always
leftsubnet=0.0.0.0/0
right=%any
rightid=%any
rightauth=eap-mschapv2
rightdns=8.8.8.8,8.8.4.4
rightsourceip=10.10.10.0/24
rightsendcert=never
eap_identity=%identity
Run Code Online (Sandbox Code Playgroud)
UPD:根据我的修补和@ChandanK 的回答,我制作了两个脚本来在全新的 Ubuntu 16.04 安装上部署 StrongSwan VPN 服务器:https : //github.com/truemetal/ikev2_vpn