<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Thank you Iheanyi.  Look at Diego's configs posted earlier today for a similar setup or perhaps try having redsocks on a separate machine just as a test?  Good luck and thanks for being willing to report back.</div>
<div><br>On 2013-08-20, at 16:27, Iheanyi Obasi <<a href="mailto:iobasi@hotmail.com">iobasi@hotmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Yes there is certainly a possibility of a loop on the downstream end. I will have to do some more tinkering to eventually pinpoint the culprit. For now a firewall rule for WANProxy’s traffic is inevitable.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I will update on my findings for everyone’s benefit.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Juli Mallett [<a href="mailto:juli@clockworksquid.com">mailto:juli@clockworksquid.com</a>] <br>
<b>Sent:</b> Tuesday, August 20, 2013 9:14 PM<br><b>To:</b> iobasi<br><b>Cc:</b> <a href="mailto:wanproxy@lists.wanproxy.org">wanproxy@lists.wanproxy.org</a><br><b>Subject:</b> Re: iperf test with wanproxy</span></p><p class="MsoNormal">
 </p><div><p class="MsoNormal">Any chance that there's some kind of loop in redsocks?  I wonder if you can somehow exclude WANProxy's traffic from going through redsocks?</p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">
 </p><div><p class="MsoNormal">On Tue, Aug 20, 2013 at 1:10 PM, Iheanyi Obasi <<a href="mailto:iobasi@hotmail.com" target="_blank">iobasi@hotmail.com</a>> wrote:</p><div><div><p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks for the tip Juli.</span></p>
<p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">So I have tried to be more thorough this time around and I can say one thing – the iperf doesn’t work well on a SOCKS connection. When the connection is initiated the SOCKS proxy keeps sending data to the iperf server without returning output to the iperf client. I’m not sure why it behaves this way but I will give it some more investigation when I have more time.</span></p>
<p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The tests you asked me to carry out all turned out positive, from the upstream server, I can curl urls through the SOCKS port on the upstream server (not via 3302 but via 3301). I can also use the upstream SOCKS proxy from my local computer.</span></p>
<p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">A look at packet captures on the downstream proxy showed the bizarre behaviour during iperf tests so I guess I’ll have to look for another way to measure throughput with my socks proxies. Any tips will be appreciated.</span></p>
<p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks again.</span></p>
<p class="MsoNormal" style><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal" style><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Juli Mallett [mailto:<a href="mailto:juli@clockworksquid.com" target="_blank">juli@clockworksquid.com</a>] <br>
<b>Sent:</b> Tuesday, August 20, 2013 8:56 AM<br><b>To:</b> <a href="mailto:iobasi@hotmail.com" target="_blank">iobasi@hotmail.com</a><br><b>Cc:</b> <a href="mailto:wanproxy@lists.wanproxy.org" target="_blank">wanproxy@lists.wanproxy.org</a><br>
<b>Subject:</b> Re: iperf test with wanproxy</span></p><div><p class="MsoNormal" style> </p><div><div><p class="MsoNormal" style>First, as for simplifying, you can use references to other fields in your config, which might simplify things, e.g. "set if2.port $peer0.port" or similar.</p>
</div><div><p class="MsoNormal" style> </p></div><p class="MsoNormal" style>Since you've already disabled the codecs (which means you won't get any optimization, but is useful for testing), I'd suggest you go step-by-step verifying that things work as expected.</p>
<div><p class="MsoNormal" style> </p></div><div><p class="MsoNormal" style>So first, log in to 4.4.4.4, and use something to try making a socks connection there via port 3302, e.g. curl with --socks5 or whatever.</p></div>
<div><p class="MsoNormal" style> </p></div><div><p class="MsoNormal" style>Then try using <a href="http://4.4.4.4:3301" target="_blank">4.4.4.4:3301</a> as a socks proxy from your local system that's running WANProxy.  See if you can even reach it with netcat or telnet if that doesn't work for some reason.</p>
</div><div><p class="MsoNormal" style> </p></div><div><p class="MsoNormal" style>If that works, then I'd guess there's some problem with redsocks — does it do any logging or could you turn any on?  My first guess would be that it's failing to authenticate properly since WANProxy doesn't support authentication.</p>
</div><div><p class="MsoNormal" style> </p></div><div><p class="MsoNormal" style>You may try passing -v to each WANProxy instance, and then see if WANProxy logs anything.</p></div><div><p class="MsoNormal" style> </p></div>
<div><p class="MsoNormal" style>Likewise, you could use tcpdump on each system to see what traffic is being generated.  You seem pretty comfortable with networking, but if you need help with that let me and/or the list know.</p>
</div><div><p class="MsoNormal" style> </p></div><div><p class="MsoNormal" style>Thanks,</p></div><div><p class="MsoNormal" style>Juli.</p></div></div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"> </p><div>
<div><p class="MsoNormal" style>On Mon, Aug 19, 2013 at 11:48 PM, Iheanyi Obasi <<a href="mailto:iobasi@hotmail.com" target="_blank">iobasi@hotmail.com</a>> wrote:</p></div><div><div><div><div><p class="MsoNormal" style>
Hello,</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>This a great project.  However, I have this strange thing that happens with wanproxy. I can redirect my TCP sessions through it. However, when I initiate an iperf test, it reaches the other end and then immediately resets the connection. So all I end up getting for my SYN request is a RST ACK. I am wondering if there is something wrong with my setup so I’m posting it for someone to please raise a flag here. My topology looks like this</p>
<p class="MsoNormal" style> </p><p class="MsoNormal" style>LAN ---> SOCKS ---> WANPROXY CLIENT ---> WANPROXY SERVER (WITH SOCKS) ----> INTERNET (IPERF SERVER)</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>
I use the socks proxy to get many TCP ports through the proxy. I would appreciate information about another way of doing this. So that’s the topology, here are the wanproxy configs</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>
CLIENT SOCKS PROXY</p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">redsocks {</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">     local_ip = 0.0.0.0;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">     local_port = 5001;</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">     ip = 127.0.0.1;</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">     port = 3300;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">}</span></p><p class="MsoNormal" style> </p><p class="MsoNormal" style>CLIENT CONFIG</p><p class="MsoNormal" style>
 </p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">create interface if0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set if0.family IPv4</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set if0.host "127.0.0.1"</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set if0.port "3300"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">activate if0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">create peer peer0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set peer0.family IPv4</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set peer0.host "4.4.4.4"</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set peer0.port "3301"</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">activate peer0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">create proxy proxy0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set proxy0.type TCP-TCP</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set proxy0.interface if0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set proxy0.interface_codec None</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set proxy0.peer peer0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">set proxy0.peer_codec None</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New"">activate proxy0</span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New""> </span></p>
<p class="MsoNormal" style>SERVER CONFIG</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>create interface if0</p><p class="MsoNormal" style>set if0.family IP</p><p class="MsoNormal" style>set if0.host "4.4.4.4"</p>
<p class="MsoNormal" style>set if0.port "3301"</p><p class="MsoNormal" style>activate if0</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>create peer peer0</p><p class="MsoNormal" style>set peer0.family IPv4</p>
<p class="MsoNormal" style>set peer0.host "localhost"</p><p class="MsoNormal" style>set peer0.port "3302"</p><p class="MsoNormal" style>activate peer0</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>
create proxy proxy0</p><p class="MsoNormal" style>set proxy0.type TCP-TCP</p><p class="MsoNormal" style>set proxy0.interface if0</p><p class="MsoNormal" style>set proxy0.interface_codec None</p><p class="MsoNormal" style>
set proxy0.peer peer0</p><p class="MsoNormal" style>set proxy0.peer_codec None</p><p class="MsoNormal" style>activate proxy0</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>create interface if2</p><p class="MsoNormal" style>
set if2.family IPv4</p><p class="MsoNormal" style>set if2.host "localhost"</p><p class="MsoNormal" style>set if2.port "3302"</p><p class="MsoNormal" style>activate if2</p><p class="MsoNormal" style> </p>
<p class="MsoNormal" style>create proxy-socks proxy-socks0</p><p class="MsoNormal" style>set proxy-socks0.interface if2</p><p class="MsoNormal" style>activate proxy-socks0</p><p class="MsoNormal" style> </p><p class="MsoNormal" style>
It feels like overkill to me so suggestions to simplify are welcome. Thank you.</p></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"> </p><div><p class="MsoNormal">_______________________________________________<br>
wanproxy mailing list<br><a href="mailto:wanproxy@lists.wanproxy.org" target="_blank">wanproxy@lists.wanproxy.org</a><br><a href="http://lists.wanproxy.org/listinfo.cgi/wanproxy-wanproxy.org" target="_blank">http://lists.wanproxy.org/listinfo.cgi/wanproxy-wanproxy.org</a></p>
</div></div><p class="MsoNormal" style> </p></div></div></div></div><p class="MsoNormal"> </p></div></div></div></blockquote></body></html>