<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    In your before setting, your client should have  been to connect to
    your test server:<br>
    <br>
    [jdbc]<br>
    client = yes<br>
    accept = 127.0.0.1:2404<br>
    connect=my_server_name:2404<br>
    <br>
    In your after setting, the accept and connect ports cannot be the
    same port.<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 4/9/2015 10:51 AM, daninho dj wrote:<br>
    </div>
    <blockquote
cite="mid:CAFZpXbCt3Ud0gD3BzuKrYrnA=wuV0bXkTnZvNL1=GG44Rv=4oQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Jose,
        <div><br>
        </div>
        <div>Thanks for mail. The problem is that when I change the
          accept port on the server, stunnel doesn't start:</div>
        <div><br>
        </div>
        <div><b>Before:</b></div>
        <div><br>
        </div>
        <div><u>Server:</u></div>
        <div><br>
        </div>
        <div>
          <div>[test]</div>
          <div>accept = 2404</div>
          <div>connect = 2406</div>
        </div>
        <div><br>
        </div>
        <div><u>Client:</u></div>
        <div><br>
        </div>
        <div>
          <div>[jdbc]</div>
          <div>client = yes</div>
          <div>accept = <a moz-do-not-send="true"
              href="http://127.0.0.1:2404">127.0.0.1:2404</a></div>
          <div>connect = <i>my_server_name</i>:2406</div>
        </div>
        <div><br>
        </div>
        <div><b>After:</b></div>
        <div><br>
        </div>
        <div>I edited the stunnel.conf on the server:</div>
        <div><br>
        </div>
        <div>
          <div>[test]</div>
          <div>accept = 2406</div>
          <div>connect = 2406</div>
        </div>
        <div><br>
        </div>
        <div>Then trying to start the service:</div>
        <div><br>
        </div>
        <div>
          <div><b>/etc/init.d/stunnel start</b></div>
          <div><b>Starting stunnel (SSL tunnel) startproc:  exit status
              of parent of /usr/sbin/stunnel: 1</b></div>
          <div><b>  please see /var/log/rc.stunnel.log for details      
                                                                       
                                                          <font
                color="#ff0000">failed</font></b></div>
        </div>
        <div><br>
        </div>
        <div>/var/log/rc.stunnel.log is empty but in the log specified
          in the stunnel.conf I have the following:<br>
        </div>
        <div><br>
        </div>
        <div>
          <div>tail -10 /var/log/stunnel/stunnel.log</div>
          <div>2015.04.09 16:42:36 LOG5[22524:139805264570112]:
            Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP</div>
          <div>2015.04.09 16:42:36 LOG6[22524:139805264570112]: file
            ulimit = 262144 (can be changed with 'ulimit -n')</div>
          <div>2015.04.09 16:42:36 LOG6[22524:139805264570112]: poll()
            used - no FD_SETSIZE limit for file descriptors</div>
          <div>2015.04.09 16:42:36 LOG5[22524:139805264570112]: 128000
            clients allowed</div>
          <div>2015.04.09 16:42:36 LOG7[22524:139805264570112]: FD 10 in
            non-blocking mode</div>
          <div>2015.04.09 16:42:36 LOG7[22524:139805264570112]: FD 11 in
            non-blocking mode</div>
          <div>2015.04.09 16:42:36 LOG7[22524:139805264570112]: FD 12 in
            non-blocking mode</div>
          <div>2015.04.09 16:42:36 LOG7[22524:139805264570112]:
            SO_REUSEADDR option set on accept socket</div>
          <div>2015.04.09 16:42:36 LOG3[22524:139805264570112]: Error
            binding test to <a moz-do-not-send="true"
              href="http://0.0.0.0:2406">0.0.0.0:2406</a></div>
          <div>2015.04.09 16:42:36 LOG3[22524:139805264570112]: bind:
            Address already in use (98)</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Same thing happens when I try to change the ports on the
          client. Any idea how this problem can be solved? </div>
        <div><br>
        </div>
        <div>Thanks and regards,</div>
        <div>Daninho</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Apr 9, 2015 at 4:12 PM, <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:josealf@rocketmail.com" target="_blank">josealf@rocketmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
            The accept port on the server Config must be the same as the
            connect port on the client config.<br>
            The connect port on the server must be the port used by the
            application/service you try to secure, usually bound to the
            loopback interfase, as you probably don't want to allow
            unsecure connections.<br>
            On the client the accept port is the port your client
            application will connect to.<br>
            <br>
            Hope this helps to clarify a bit.<br>
            <br>
            Regards<br>
            <br>
            -----Original Message-----<br>
            From: daninho dj <<a moz-do-not-send="true"
              href="mailto:daninho.dj@gmail.com">daninho.dj@gmail.com</a>><br>
            Sender: "stunnel-users" <<a moz-do-not-send="true"
              href="mailto:stunnel-users-bounces@stunnel.org">stunnel-users-bounces@stunnel.org</a>><br>
            Date: Thu, 9 Apr 2015 14:28:25<br>
            To: <<a moz-do-not-send="true"
              href="mailto:stunnel-users@stunnel.org">stunnel-users@stunnel.org</a>><br>
            Subject: [stunnel-users] Session is active but I cannot
            connect<br>
            <br>
            _______________________________________________<br>
            stunnel-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:stunnel-users@stunnel.org">stunnel-users@stunnel.org</a><br>
            <a moz-do-not-send="true"
              href="https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users"
              target="_blank">https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature"><a moz-do-not-send="true"
            href="http://daninhodj.com" target="_blank">daninho</a></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Carter Browne
<a class="moz-txt-link-abbreviated" href="mailto:cbrowne@cbcs-usa.com">cbrowne@cbcs-usa.com</a></pre>
  </body>
</html>