I'm looking for a configuration instructions for IKEv2 VPN that uses
pre-shared keys instead of
certs (those are different methods for tunnel encryption I'd assume?).
I've followed this wonderful tutorial to get IKEv2 VPN working (with
certificate) and it works.
My question is what needs to be changed so that it would use
PSK instead? I'd assume changes in
/etc/ipsec.conf are to be made.
ipsec.conf looks like this:
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=22.214.171.124,126.96.36.199 rightsourceip=10.10.10.0/24 rightsendcert=never eap_identity=%identity
UPD: Based on my tinkering and @ChandanK answer, I've made two scripts to deploy a StrongSwan VPN server on a fresh Ubuntu 16.04 install here: https://github.com/truemetal/ikev2_vpn