[stunnel-users] Stunnel 5.44 server side 'exec = pppd' runs second child 'pppd' process after reconnection. Bug?

Peter Pentchev roam at ringlet.net
Tue May 14 10:15:26 CEST 2019


On Mon, May 13, 2019 at 03:03:55PM -0700, Eric Eberhard wrote:
> [Martin Got wrote:]
> > I'm trying to make stunnel wrapped ppp connection to achieve bidirectional data transfer over stunnel like shown below.
> >  
> > Stunnel client   --connect-->    Stunnel server
> > pppd client       --connect-->    pppd server
> > 10.0.1.2             <--data-->     10.0.1.1
> >  
> > OpenBSD 6.4amd64 with Stunnel 5.44 server works till stunnel retries 'exec = pppd' section once stunnel client is reconnected. Also 'exec = pppd' section retries after a short network related communication lag also. Previous 'pppd' child instance haven't killed by stunnel 5.44 before new instance started.
> >  
> > So second 'pppd' process started and runs simultaneously with the first 'pppd' and link down. Restarting Stunnel server can clear child 'pppd' processes. So newly reestablished 'pppd' link between 10.0.1.1 <--> 10.0.1.2 endpoints works till next interconnection.
> >  
> > Does stunnel server have an option to start only one instance in 'exec' section or what should be done to fix this?
> >  
> > Any suggestions highly appreciated.
> 
> Yes.  Use inetd (or equivalent).  Making an independent server work is
> difficult due to the problems like you are having.  Inetd is in many O/S
> included and essential, others available.  It always works.  Always.
> Yes, there is a tiny amount of overhead for making connections.  On an
> ancient AIX IBM I manage 2-4 million XML documents exchanged per day
> with no problems, all with inetd.  Try it – save yourself some misery.
> Or maybe it won’t help at all except to add information :) 

(format recovered; top-posting hard to follow)

Hi Eric,

Over the past couple of years I've seen you suggesting that people use
inetd + stunnel in inetd mode instead of stunnel to accept connections.
In some situations, like this one, it is not at all relevant to the
problem at hand - even if the original poster would use inetd to accept
an incoming TCP connection and then run stunnel in inetd mode, this
would *still* be a new instance of stunnel that will run a new instance
of pppd with exactly the same problems as described in the message that
you replied to. Even more so, if stunnel is started in inetd mode, it
has absolutely no idea whether there are any other instances of
stunnel+pppd already running, so it might be said that in this case
using inetd would make the situation worse.

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} pp at storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20190514/f0987703/attachment.sig>


More information about the stunnel-users mailing list