I’m setting up an IKEv2 VPN using Libreswan 3.25, and I’m encountering an issue where I can successfully connect to the VPN, but my laptop’s IP address is not being updated to reflect the VPN connection.
Here’s my current connection configuration in /etc/ipsec.d/test.conf
:
conn test
left=%defaultroute
leftsubnet=172.31.30.94/32
leftid=18.217.218.254
right=%any
rightaddresspool=192.168.0.1-192.168.0.254
modecfgdns=8.8.8.8,8.8.4.4
authby=secret
ikev2=insist
ike=aes256-sha2_256-modp2048,aes256-sha1-modp1024
esp=aes256-sha2_256,aes256-sha1
modecfgpull=yes
leftxauthserver=yes
rightxauthclient=yes
leftmodecfgserver=yes
rightmodecfgclient=yes
xauthby=file
dpddelay=30
dpdtimeout=120
dpdaction=clear
auto=add
rekey=no
fragmentation=yes
forceencaps=yes
When I connect to this VPN:
- The connection appears to establish successfully.
- However, my laptop’s IP address does not change.
- I’m unable to access resources that should be available through the VPN.
- I am able to ping 172.31.30.94 successfully
I’ve tried changing leftsubnet
to 0.0.0.0/0
, but this resulted in a total loss of internet connectivity.
What am I missing in my configuration to ensure that:
- All my client’s traffic is routed via the VPN?
I do not want to upgrade my libreswan version, due to other VPN connection running
Any insights or suggestions would be greatly appreciated!
Tags: libreswan, vpn, ikev2, networking, linux