<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">An update on that..<div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>The problem seems to go away when I bind the stunnel-client to another local address which isn't localhost.</div><div>like the ethernet adapter's address (in this case 192.168.0.6) like so:</div><div><br class="webkit-block-placeholder"></div><div>server:</div><div>-------------</div><div><div>[lobby]</div><div>accept = 20001</div><div>connect = 192.168.0.6:9001</div><div><br class="webkit-block-placeholder"></div><div><div>[lobby]</div><div>accept = 192.168.0.6:9001</div><div>connect = LOBBY-SERVER:20001</div><div><br class="webkit-block-placeholder"></div><div>Is this an expected behavior?</div><div><br class="webkit-block-placeholder"></div><div>Thanks,</div><div>Avner.</div></div><div><br class="webkit-block-placeholder"></div></div><div><br class="webkit-block-placeholder"></div><div><br><div><div><div>On Feb 1, 2008, at 10:21 PM, Avner Peled wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">Hello!<div><br></div><div>I have a game client connecting to a server using TCP over SSL.</div><div>I'm trying to setup an SSL proxy using 2 stunnels on the same server like so:</div><div> <br></div><div>Client --> Stunnel-Server:20001 (decrypt)--> Stunnel-Client:901  (encrypt)---> Server:20001</div><div><br></div><div>Using latest stunnel-4.21-r1 on Gentoo kernel 2.6.22-gentoo-r9</div> <div><br></div><div>I have a weird problem.</div><div>The first connection after starting both stunnels works fine.</div><div>Afterwards every time the client tries to connect, it gets refused once. Then it tries again and gets connected.</div> <div>Then the next time it will once again get refused once and then connect.</div><div><br></div><div>I have looked at the logs and it seems the Stunnel server (the first) gets Connection Refused from localhost:901.</div> <div>Then it tries again and gets connected.</div><div>The Stunnel client (the second) doesn't even mention the first failing local connection in the log.</div><div><br></div><div>I have provided the config files of both stunnels and a log with debug = 7 (server ip's are censored)</div> <div><br></div><div>I have also tried the following config tweaks with no luck</div><div><br></div><div><div>socket = l:TCP_NODELAY=1</div><div>socket = r:TCP_NODELAY=1</div> <div>TIMEOUTclose = 0</div><div>retry = yes</div><div><br></div><div>Any help would be appreciated.</div><div>Thanks!!</div></div><font color="#888888"><div><br></div><div><br>-- <br> Avner Peled. </div><div><a href="mailto:avnerus@gmail.com" target="_blank">avnerus@gmail.com</a></div><div><br></div></font></div> <span><client.conf></span><span><client.log></span><span><server.conf></span><span><server.log></span></blockquote></div><br></div></div></body></html>