<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[OpenVPN exits without restarting with exit-notify]]></title><description><![CDATA[<p dir="auto">OpenVPN Server/Client configuration, Option "exit-notify". Configured as site2site shared-key:</p>
<blockquote>
<p dir="auto">Send an explicit exit notification to connected clients/peers when restarting or shutting down, so they may immediately disconnect rather than waiting for a timeout. In SSL/TLS Server modes, clients may be directed to reconnect or use the next server. In Peer-to-Peer Shared Key or with a /30 Tunnel Network, this value controls how many times this instance will attempt to send the exit notification.</p>
</blockquote>
<p dir="auto">As the client configuration default is "retry 1x" the following is happening in our lab:</p>
<ul>
<li>
<p dir="auto">client gets restarted due to config change or manual restart/stopping action</p>
</li>
<li>
<p dir="auto">server side <strong>immediatly</strong> is stopped! It will not disconnect the client/peer side but instead completely exit the server!</p>
<pre><code>Jun 7 22:03:44	openvpn	12752	SIGTERM[soft,remote-exit] received, process exiting
Jun 7 22:03:44	openvpn	12752	/usr/local/sbin/ovpn-linkdown ovpns1 1500 1572 172.27.254.253 172.27.254.254 init
Jun 7 22:03:44	openvpn	12752	Closing TUN/TAP interface
</code></pre>
</li>
<li>
<p dir="auto">server will NOT come back, service remains stopped</p>
</li>
<li>
<p dir="auto">client is trying to connect and tunnel will not come back online</p>
</li>
</ul>
<p dir="auto">Same behavior can be seen vice versa. If Server is configured with exit notify, it notifies the client peer instance of its restart and the client terminates the OpenVPN instance. It will not come back thus the tunnel remains down until one restarts the client, too.</p>
<p dir="auto">Only workaround: disable exit notify on both ends to avoid any side effects from happening while restarting the service. As I read the OpenVPN reference manual it seems to me it shouldn't exit/terminate the peer instance (or the clients) but just use the information to immediatly disconnect the corresponding client internally instead of waiting for the ping-timeout to happen. So currently setting the option will essentially break tunnels or RAS servers as a client can "notify" a server running on pfsense and simply terminate it that way.</p>
<p dir="auto">EDIT: After a quick test, a RAS server configuration with a client that has <code>explicit-exit-notify [n]</code> doesn't kill the server but it also does not disconnect the client. If you reconnect the client, you have a second client listed with a new IP so the server isn't told, that client1 has disconnected and should be removed correctly.</p>
<p dir="auto">This seems also the case since 2.5.0 and the option first appearing but we didn't notice until setting up a tunnel in our lab now and testing.</p>
<p dir="auto">Cheers</p>
]]></description><link>https://forum.netgate.com/topic/164257/openvpn-exits-without-restarting-with-exit-notify</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 22:58:13 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/164257.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Jun 2021 20:13:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Fri, 09 Jul 2021 15:26:53 GMT]]></title><description><![CDATA[<p dir="auto">OpenVPN doesn't know "site-to-site" vs "remote access". It just knows point-to-point and point-to-multipoint ("server/client" mode). pfSense masks all that in terms users are more familiar with by changing the GUI options to make it more like what our users have expected and requested over time.</p>
<p dir="auto">Under the hood, a Remote Access VPN and Site-to-Site SSL/TLS VPN (with a tunnel network larger than a /30) operate in the same way using the client/server mode of OpenVPN.</p>
<p dir="auto">Exit notify only makes sense for UDP, since TCP will already know when a connection closes.</p>
<p dir="auto">If you re-read the OpenVPN man page with all that in mind, it makes more sense.</p>
]]></description><link>https://forum.netgate.com/post/991487</link><guid isPermaLink="true">https://forum.netgate.com/post/991487</guid><dc:creator><![CDATA[jimp]]></dc:creator><pubDate>Fri, 09 Jul 2021 15:26:53 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Fri, 09 Jul 2021 15:13:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jimp">@<bdi>jimp</bdi></a> That would surely be possible, but as I read the OpenVPN docs that setting should be safe to use for site 2 site either, shouldn't it? Perhaps I'm reading it wrong :)</p>
]]></description><link>https://forum.netgate.com/post/991486</link><guid isPermaLink="true">https://forum.netgate.com/post/991486</guid><dc:creator><![CDATA[JeGr]]></dc:creator><pubDate>Fri, 09 Jul 2021 15:13:42 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Fri, 09 Jul 2021 15:02:47 GMT]]></title><description><![CDATA[<p dir="auto">OK so it's not RAS vs Site-to-Site but SSL/TLS vs Shared Key behavior difference. Well, to be more accurate, Shared Key and SSL/TLS with a /30 subnet both behave similarly as they use OpenVPN's "point-to-point" mode rather than a client/server model.</p>
<p dir="auto">I wouldn't call it a bug, but perhaps we could prevent the setting from being used when a client or server instance is set to Shared Key or SSL/TLS with a /30 tunnel network. This has come up before, see <a href="https://redmine.pfsense.org/issues/6718" target="_blank" rel="noopener noreferrer nofollow ugc">https://redmine.pfsense.org/issues/6718</a> for example.</p>
]]></description><link>https://forum.netgate.com/post/991483</link><guid isPermaLink="true">https://forum.netgate.com/post/991483</guid><dc:creator><![CDATA[jimp]]></dc:creator><pubDate>Fri, 09 Jul 2021 15:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Fri, 09 Jul 2021 14:48:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jimp">@<bdi>jimp</bdi></a> It's a shared key. Quick and simple setup to test on 2 VPS instances</p>
]]></description><link>https://forum.netgate.com/post/991480</link><guid isPermaLink="true">https://forum.netgate.com/post/991480</guid><dc:creator><![CDATA[JeGr]]></dc:creator><pubDate>Fri, 09 Jul 2021 14:48:30 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Fri, 09 Jul 2021 14:35:48 GMT]]></title><description><![CDATA[<p dir="auto">Is that an SSL/TLS site-to-site or shared key?</p>
]]></description><link>https://forum.netgate.com/post/991476</link><guid isPermaLink="true">https://forum.netgate.com/post/991476</guid><dc:creator><![CDATA[jimp]]></dc:creator><pubDate>Fri, 09 Jul 2021 14:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Fri, 09 Jul 2021 13:50:35 GMT]]></title><description><![CDATA[<p dir="auto">Sadly, in 2.5.2 final that error/bug (IMHO) is still active.</p>
<p dir="auto">-&gt; RAS Style setup:</p>
<ul>
<li>
<p dir="auto">exit notify set to 1,2,...5 - all tested on server/client side configs do exactly what they are supposed to. Client gets notified of server restart and reconnects almost instantly to the restarted server. THAT'S GREAT! This minimizes downtimes of clients after a server restart. Great!</p>
</li>
<li>
<p dir="auto">exit notify on a S2S tunnel setup on both nodes will bring the opposite node DOWN!</p>
</li>
</ul>
<p dir="auto">Logs:</p>
<pre><code>Jul 9 15:40:56	openvpn	58850	SIGTERM received, sending exit notification to peer
Jul 9 15:40:57	openvpn	58850	Closing TUN/TAP interface
Jul 9 15:40:57	openvpn	58850	/usr/local/sbin/ovpn-linkdown ovpnc1 1500 1572 172.27.254.254 172.27.254.253 init
Jul 9 15:40:57	openvpn	58850	SIGTERM[soft,exit-with-notification] received, process exiting
</code></pre>
<p dir="auto">So if one side restarts the client because of a WAN failure or a reconfig issue, the remote side exits the server/client process and <strong>does NOT restart</strong>! The process is stopped and killed!</p>
<p dir="auto">Any tunnel configured with explicit-exit-notify is therefor a "DoS" waiting to happen when the other side restarts the connection and "notifies" the other side.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jimp">@<bdi>jimp</bdi></a> it may be my misunderstanding but the OpenVPN docs don't specify such behavior and as it works fine on RAS style connections, I'm wondering why the S2S style setup just exits and kills the process?</p>
]]></description><link>https://forum.netgate.com/post/991458</link><guid isPermaLink="true">https://forum.netgate.com/post/991458</guid><dc:creator><![CDATA[JeGr]]></dc:creator><pubDate>Fri, 09 Jul 2021 13:50:35 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Sun, 13 Jun 2021 07:17:32 GMT]]></title><description><![CDATA[<p dir="auto">My problem had nothing to do with exit-notify. Still I don't know the cause, but could be specific to the vpn-provider.</p>
]]></description><link>https://forum.netgate.com/post/987538</link><guid isPermaLink="true">https://forum.netgate.com/post/987538</guid><dc:creator><![CDATA[Bob.Dig]]></dc:creator><pubDate>Sun, 13 Jun 2021 07:17:32 GMT</pubDate></item><item><title><![CDATA[Reply to OpenVPN exits without restarting with exit-notify on Sat, 12 Jun 2021 07:48:14 GMT]]></title><description><![CDATA[<p dir="auto">I don't know if this is related, but I noticed for some time now, that my OVPN-Clients on pfSense don't come back after a nightly reboot done by cron, although they are even sometimes shown as "online". I am on 2.5.1-RELEASE.</p>
<p dir="auto">Before, they often had the problem, that some of them "shared" the same IP by the VPN-Server from the VPN-Provider, so I had to manually restart them, that they can diverge. But for quite some time now, they all don't work after a nightly reboot via cron (/usr/bin/nice -n20 /etc/rc.reboot).</p>
<p dir="auto">Now I will have a look if disabling "exit-notify" will make any change.</p>
]]></description><link>https://forum.netgate.com/post/987414</link><guid isPermaLink="true">https://forum.netgate.com/post/987414</guid><dc:creator><![CDATA[Bob.Dig]]></dc:creator><pubDate>Sat, 12 Jun 2021 07:48:14 GMT</pubDate></item></channel></rss>