I am using the DHCP plugin with dnsmasq.
$ cat /etc/dnsmasq.d/01-dhcp-loopback.conf
interface=lo
dhcp-range=10.0.2.10,10.0.2.254,255.255.255.0
port=0
$ cat /etc/ipsec.conf
config setup
charondebug="ike -1, knl -1, cfg -1"
uniqueids=never
conn ikev2
auto=add
compress=no
type=tunnel
keyexchange=ikev2
fragmentation=yes
forceencaps=yes
ike=aes256gcm16-prfsha512-ecp384!
esp=aes256gcm16-ecp384!
dpdaction=clear
dpddelay=300s
rekey=no
left=%any
leftid=my-vpn.com
leftcert=vpn-server.crt
leftsendcert=always
leftsubnet=0.0.0.0/0
right=%any
rightid=%any
rightauth=eap-tls
rightdns=1.1.1.1,1.0.0.1
rightsourceip=%dhcp
rightsendcert=never
eap_identity=%identity
Edit
I was able to fix the issue adding the following to /etc/network/interfaces
.
auto eth0:1
iface eth0:1 inet static
address 10.0.2.1/24
That being said, I would love to know if this is the right way to solve the issue.