<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Nick,</div>
<div>I think you are THE openswan problem solver!!!</div>
<div>Thanks again,</div>
<div>Luca</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Friday, October 03, 2014 at 6:11 PM<br/>
<b>From:</b> "Nick Howitt" <nick@howitts.co.uk><br/>
<b>To:</b> "Luca Arzeni" <l.arzeni@iname.com>, users <users@lists.openswan.org><br/>
<b>Subject:</b> Re: [Openswan Users] ipsec: is there any post connection hooks</div>
<div name="quoted-content">
<div style="background-color: rgb(255,255,255);">Look for _updown in /usr/libexec/ipsec. These are the deafult scripts. Also look at "man ipsec__updown". I think you'll need to add to these scripts rather than add a local script which runs afterwards.<br/>
<br/>
You can specify your own updown script in ipsec.conf, but you will need to copy a lot of the built-in script to maintain functionality.<br/>
<br/>
Nick<br/>
<div class="moz-cite-prefix">On 03/10/2014 17:01, Luca Arzeni wrote:</div>
<blockquote>
<pre>Hi,
after a that an ipsec connection has been successfully established, I need to run some iptables command to setup some routes needed to use the connection from my app.
Ideally, I would also like to remove these routes after the connection is closed.
I managed to put them in a shell command, that wraps up my ipsec invocation, but I was wandering if there is a better/reccommended way to run these script.
Is there any post connection hook in openswan?
Are there any best practise to run these commands?
Thanks,
Luca
_______________________________________________
<a class="moz-txt-link-abbreviated" href="Users@lists.openswan.org" target="_parent">Users@lists.openswan.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openswan.org/mailman/listinfo/users" target="_blank">https://lists.openswan.org/mailman/listinfo/users</a>
Micropayments: <a class="moz-txt-link-freetext" href="https://flattr.com/thing/38387/IPsec-for-Linux-made-easy" target="_blank">https://flattr.com/thing/38387/IPsec-for-Linux-made-easy</a>
Building and Integrating Virtual Private Networks with Openswan:
<a class="moz-txt-link-freetext" href="http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155" target="_blank">http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155</a>
</pre>
</blockquote>
</div>
</div>
</div>
</div>
</div></div></body></html>