<div dir="ltr"><div><br></div><div>Hello,<br><br>I am trying to configure a VPN IPSec server and client using Libreswan according to [0].<br><br>For the VPN server, I am using RHEL 8.5 with the following Libreswan version:<br><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">$ ipsec --version</font></div><div><font face="monospace">Linux Libreswan 4.4 (netkey) on 4.18.0-348.12.2.el8_5.x86_64</font></div></blockquote><div><br>For the VPN client, I am using the following:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">Red Hat Enterprise Linux CoreOS release 4.8</font></div><div><font face="monospace">$ uname -r</font></div><div><font face="monospace">4.18.0-305.10.2.el8_4.x86_64</font></div><div><font face="monospace">$ ipsec --version</font></div><div><font face="monospace">Linux Libreswan 4.4 (netkey) on 4.18.0-305.10.2.el8_4.x86_64</font></div></blockquote><div><br>Since CoreOS is immutable, I am using Libreswan via a privileged network=host container.<br><br>My specific questions are related to how the left/rightsubnet(s) works. <br><br>1) Am I correct in my understanding that the rightsubnet (and rightsubnets) on the VPN client is for policies to determine which layer 3 traffic on the VPN client will be sent through the IPSec tunnel?<br><br>1a) If this assumption is correct, are there any relationships between leftsubnet(s) (on the VPN server or client) and VPN client rightsubnet(s)? I ask because sometimes I get TS_UNACCEPTABLE on the VPN client when establishing the IPSec tunnel, and I cant really figure out what causes it, but it seems to be due to some invalide combination of the left/right subnets.<br><br>2) What role does the leftsubnet (and leftsubnets) play in the VPN client configuration? The leftsubnet was already specified on the server side, why does it need to be repeated in the client side configuration? What if it is different in the client configuration?<br><br>3) In the [0] document, I see that it sets the subnet to 0, like this: "leftsubnet=<a href="http://0.0.0.0/0">0.0.0.0/0</a>". What exactly does this mean? I may be mistaken, but I thought I read in one of the documents that it means "all traffic". But, based on my testing, it seems to mean "no traffic".<br><br>Here are the client/server configurations Im using:<br><br><font face="monospace">conn vpn_server_tunnel<br>    left=10.10.3.8<br>    leftid=@vpn_server_fqdn<br>    leftsubnet=<a href="http://10.10.3.0/24">10.10.3.0/24</a><br>    leftrsasigkey=%cert<br>    leftcert=vpn_server_fqdn<br>    leftsendcert=always<br><br>    # Clients<br>    right=%any<br>    rightrsasigkey=%cert<br>    rightid=%fromcert<br>    rightca=%same<br>    # Not using DHCP for clients<br><br>    dpddelay=30<br>    dpdtimeout=120<br>    dpdaction=clear<br>    auto=add<br>    ikev2=insist<br>    rekey=no<br>    fragmentation=yes<br>    ike=aes256-sha2<br>    esp=aes256-sha2_512-dh14<br>    authby=rsa-sha2_512<br>    ikelifetime=86400s<br>    salifetime=3600s<br><br>conn vpn_client_tunnel<br>    left=10.10.3.8<br>    leftid=@vpn_server_fqdn<br>    leftsubnet=<a href="http://10.10.3.0/24">10.10.3.0/24</a><br>    leftrsasigkey=%cert<br>    leftmodecfgclient=yes<br><br>    # For now the client/server are in the same subnet, but that will change<br>    right=10.10.3.5<br>    rightrsasigkey=%cert<br>    rightid=%fromcert<br>    rightsubnet=<a href="http://10.10.3.0/24">10.10.3.0/24</a><br>    rightcert=vpn_client_fqdn<br><br>    ikev2=insist<br>    rekey=yes<br>    fragmentation=yes<br>    mobike=yes<br>    auto=start<br>    ike=aes256-sha2<br>    esp=aes256-sha2_512-dh14<br>    authby=rsa-sha2_512<br>    ikelifetime=86400s<br>    salifetime=3600s<br></font><br><br>[0] <a href="https://libreswan.org/wiki/VPN_server_for_remote_clients_using_IKEv2">https://libreswan.org/wiki/VPN_server_for_remote_clients_using_IKEv2</a><br><br>Regards,</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Brady Johnson</b><div><a href="mailto:brady.johnson@redhat.com" target="_blank">brady.johnson@redhat.com</a><br></div><div><div><br></div><div></div></div></div></div></div></div>