<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Martin,</p>
    <p>What you need is an exec+connect section:</p>
    <div><tt>[ppp]</tt><tt><br>
      </tt></div>
    <tt>
    </tt>
    <div><tt>client = yes</tt><tt><br>
      </tt></div>
    <div><tt>pty = yes</tt></div>
    <div><tt>retry = yes<br>
      </tt></div>
    <tt>
    </tt>
    <div><tt>exec = /usr/sbin/pppd</tt></div>
    <div><tt>execargs = pppd <your parameters><br>
      </tt></div>
    <tt>connect = STUNNEL-SERVER-IP:723</tt><tt><br>
    </tt><tt>
    </tt>
    <div><tt>CAfile = /etc/stunnel/ca.crt</tt><tt><br>
      </tt></div>
    <tt>
    </tt>
    <div><tt>cert = /etc/stunnel/client.crt</tt><tt><br>
      </tt></div>
    <tt>
    </tt>
    <div><tt>key = /etc/stunnel/client.key</tt><tt><br>
      </tt></div>
    <tt>
    </tt>
    <div><tt>verifyChain = yes</tt><tt><br>
      </tt></div>
    <tt>
    </tt>
    <div><tt>checkHost = </tt><tt><a rel="noreferrer nofollow noopener"
          href="http://hostna.me" target="_blank">hostna.me</a></tt></div>
    <div><br>
    </div>
    <div>See the manual for documentation of the new options (pty,
      retry, exec, execargs).</div>
    <div><br>
    </div>
    <div>Best regards,</div>
    <div>    Mike</div>
    <div><br>
    </div>
    <div class="moz-cite-prefix">On 17.04.2019 18:43, Martin Got wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:IO9sAr_PNUQEELZysFXky8x1mpPO_r7bBlHI0NlEneJclRliVaLsqaWu3kYM_M76RuLDqshMMmS3AVon3aThA0xtlS6yUFHtCY3aIRZ0fX4=@protonmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div>How to use 'stunnel' in client mode to accept connections on
        pty from local programs like 'ppp' instead of 'accept=IP:PORT'?<br>
      </div>
      <div><br>
      </div>
      <div>'pty = yes' seems work in server mode only, so when I removed</div>
      <div>'accept = <a target="_blank" href="http://127.0.0.1:1723"
          rel="noreferrer nofollow noopener" moz-do-not-send="true">127.0.0.1:1723</a>'
        from 'stunnel' client config I'm getting the error:<br>
      </div>
      <div><br>
      </div>
      <div>
        <div>[!] Service [ppp]: Each service must define two endpoints
          on stunnel-5.44<br>
        </div>
        <div>
          <div><br>
          </div>
          <div>I need to call 'stunnel' client from 'pppd' and
            communicate with 'stunnel' using pty if it was possible by
            using a command:<br>
          </div>
        </div>
      </div>
      <div><br>
      </div>
      <div>pppd /dev/ptyp3 10.0.1.2: local debug noauth passive noccp
        novj novjccomp nopcomp noaccomp name ppp-client connect 'stunnel
        /etc/stunnel/stunnel-client.conf'<br>
      </div>
      <div><br>
      </div>
      <div>Both 'pppd' and 'stunnel' started by executing the command
        above, but 'pppd' can't communicate to 'stunnel' server using
        pty.<br>
      </div>
      <div><br>
      </div>
      <div>Please advice.<br>
      </div>
      <div><br>
      </div>
      <div>[ppp]<br>
      </div>
      <div>client = yes<br>
      </div>
      <div>accept = <a rel="noreferrer nofollow noopener"
          href="http://127.0.0.1:1723" target="_blank"
          moz-do-not-send="true">127.0.0.1:1723 </a><br>
      </div>
      <div>^^^^^^^^^^^^^^^^^^^^^^^<br>
      </div>
      <div>connect = STUNNEL-SERVER-IP:723<br>
      </div>
      <div>CAfile = /etc/stunnel/ca.crt<br>
      </div>
      <div>cert = /etc/stunnel/client.crt<br>
      </div>
      <div>key = /etc/stunnel/client.key<br>
      </div>
      <div>verifyChain = yes<br>
      </div>
      <div>checkHost = <a rel="noreferrer nofollow noopener"
          href="http://hostna.me" target="_blank" moz-do-not-send="true">hostna.me</a><br>
      </div>
      <div>;checkIP = 1.2.3.4<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
stunnel-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:stunnel-users@stunnel.org">stunnel-users@stunnel.org</a>
<a class="moz-txt-link-freetext" href="https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users">https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users</a>
</pre>
    </blockquote>
  </body>
</html>