<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Normally, only the “ipsec” command is in a system sbin directory. All sub commands, like “ipsec pluto” or “ipsec auto” are in the libexec/ipsec directory. Those starting with an underscore are deemed “internal only” and should not be called by humans.<br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On May 23, 2020, at 21:29, Balaji Thoguluva <tbbalaji@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Please ignore my question in my previous email. I found that it is in /usr/local/sbin.</div><div><br></div><div>Thanks,</div><div>Balaji</div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Sat, May 23, 2020 at 1:23 PM Balaji Thoguluva <<a href="mailto:tbbalaji@gmail.com">tbbalaji@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr"><div>Hi Paul,</div><div><br></div><div>Thanks for the continued support.</div><div><br></div><div>I have integrated Libreswan source code with my Linux-based project and integrated binaries of the Libreswan's dependencies and I am able to build the project. </div><div><br></div><div>Can I access the ipsec executable in the built Linux project? If so, where does the ipsec executable typically reside? I could not find it under /usr/sbin, /usr/libexec/ipsec.</div><div><br></div><div>Any suggestions.</div><div><br></div><div>Thanks,</div><div>Balaji  </div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Mon, May 18, 2020 at 3:05 PM Paul Wouters <<a href="mailto:paul@nohats.ca" target="_blank">paul@nohats.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">On Mon, 18 May 2020, Balaji Thoguluva wrote:<br>
<br>
> I have some general security-policies that just allow the traffic to pass through the system (i.e., no IPsec is applied to those traffic). Say for example, allow all traffic<br>
> of of certain source and destination IP and source and destination port as 5060 (SIP traffic) not processed by IPsec. <br>
> <br>
> In that case, how do I convey this security-policy behavior to Libreswan via the script? What parameters need to be configured? Should I create a separate connection section?<br>
<br>
I would still recommend you do not do this. Double encryption isn't the<br>
worst these days. Excluding will allow people to see things even if not<br>
encrypted. For example, TLS still leaks SNI in cleartext.<br>
<br>
That said, you can simply create the exceptions by doing:<br>
<br>
Individual conn solutions:<br>
<br>
conn skip-tls-out<br>
        left=%defaultroute<br>
        right=0.0.0.0<br>
        leftprotoport=tcp/0<br>
        rightprotoport=tcp/443<br>
        authby=never<br>
        auto=route<br>
<br>
You would do something similar but flipped for incoming TLS. If there is<br>
a mismatch of these between hosts, all communication will fail because<br>
whoever does not have the "cleartext hole" will drop the received clear<br>
text traffic.<br>
<br>
Mesh solution:<br>
<br>
When using mesh encryption (Oportunistic IPsec), you can also specify<br>
the nodes for specific "clear" using protocols and ports. In general,<br>
longest prefix first wins with these type of rule matchines<br>
<br>
# /etc/ipsec.d/policies/private<br>
<a href="http://10.0.0.0/8" target="_blank" rel="noreferrer">10.0.0.0/8</a><br>
<br>
# /etc/ipsec.d/policies/clear<br>
<a href="http://10.0.0.0/24" target="_blank" rel="noreferrer">10.0.0.0/24</a>  tcp  0  443<br>
<a href="http://1.0.0.0/0" target="_blank" rel="noreferrer">1.0.0.0/0</a>    tcp  443  0<br>
<br>
<br>
Paul<br>
</blockquote></div>
</blockquote></div>
</div></blockquote></body></html>