Hi, Juli,<div><br></div><div>As the first step, we just want to make sure that we setup and run wanproxy correctly .</div><div><br></div><div>Here's what it shows when client started running: </div><div><img src="cid:ii_13cf6873e1903b4f" alt="Inline image 1"><br>
</div><div><br></div><div>Here's the server when it started running:</div><div><img src="cid:ii_13cf688868e9585e" alt="Inline image 2"><br></div><div><br></div><div>I then run on the "intranet" machine</div>
<div> " root@kvmtest:~# nc -l 80 > received.file "</div><div><br></div><div>then run on the client machine:</div><div> " root@kvmtest:~# nc 127.0.0.1 3300 < send.file</div><div><br></div><div>As soon as I hit enter, I got this error from wanproxy on my client machine :</div>
<div><img src="cid:ii_13cf68c48251eb4a" alt="Inline image 3"><br></div><div><br></div><div>Our client , server, and intranet are 3 virtual machines on one physical machine , with ip address 192.168.122.10,  192.168.122.20, and 192.168.122.30. </div>
<div><br></div><div>What might have caused the error? </div><div><br></div><div>Thank you. </div><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 10:03 PM, Juli Mallett <span dir="ltr"><<a href="mailto:juli@clockworksquid.com" target="_blank">juli@clockworksquid.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Boxiang,<br>
<br>
Well, I suppose it depends how you intend to evaluate/test/deploy<br>
WANProxy.  If you are going to be using it for HTTP traffic, you<br>
should set up a webserver on 'intranet'.  Whatever webserver you would<br>
use should be fine.<br>
<br>
If you just want to see it working, start netcat (nc) listening on<br>
port 80 on intranet, piped to dd to /dev/null.  Then start netcat on<br>
the client to connect to WANProxy, with its input coming from dd from<br>
a file, or /dev/zero, or whatever is most appropriate for your test.<br>
When that's done, do the test again, and see if the results are<br>
different.  Choose a big file so that you have time to use tcpdump or<br>
netstat or ntop to watch data going over the wire.<br>
<br>
You could also have the WANProxy server connect to a service running<br>
on server.  If all of the systems are on the same LAN, you will not<br>
see any performance improvement, because server getting the content<br>
from intranet should be no different to client getting the content<br>
from intranet.<br>
<br>
What do you want to demonstrate or test about WANProxy?  To just test<br>
that it's "working", use netcat, and have the server connect to netcat<br>
running on the server as well.  That way you should be able to<br>
transfer data faster than line rate.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Feb 19, 2013 at 9:39 PM, Boxiang Pan <<a href="mailto:aquarypbx@gmail.com">aquarypbx@gmail.com</a>> wrote:<br>
> Hi, Juli,<br>
><br>
> I've created the server and client conf files, and both the server side and<br>
> the client side wanproxy seem to be running. You mentioned that I can send<br>
> some random files over http to the client and wanproxy will forward it to<br>
> the "intranet:80".  I am not sure how should I do this, plus, should there<br>
> be some process (eg: apache webserver) running on the intranet and listening<br>
> on port 80 before I can send some random file to it? Could you please be<br>
> more specific about how I may test to see if wanproxy is working correctly?<br>
><br>
> Thank you.<br>
><br>
><br>
> On Tue, Feb 19, 2013 at 11:53 AM, Juli Mallett <<a href="mailto:juli@clockworksquid.com">juli@clockworksquid.com</a>><br>
> wrote:<br>
>><br>
>> Boxiang,<br>
>><br>
>> That looks exactly right to me.  Is it working for you in practice?<br>
>><br>
>> Thanks,<br>
>> Juli.<br>
>><br>
>> On Tue, Feb 19, 2013 at 11:50 AM, Boxiang Pan <<a href="mailto:aquarypbx@gmail.com">aquarypbx@gmail.com</a>> wrote:<br>
>> > Hi, Juli,<br>
>> ><br>
>> > We will remove the ssh forwarding part then.  Here's a digram with our<br>
>> > conf<br>
>> > files that I drew to show what I meant in the previous email. So all<br>
>> > traffic<br>
>> > that goest to "<a href="http://127.0.0.1:3300" target="_blank">127.0.0.1:3300</a>" on the client machine (192.168.0.100)<br>
>> > will be<br>
>> > forward to the server (<a href="http://192.168.0.101:3301" target="_blank">192.168.0.101:3301</a>) , and then the server will<br>
>> > forward the traffic to the intranet (<a href="http://192.168.0.102:80" target="_blank">192.168.0.102:80</a>). Is this correct?<br>
>> ><br>
>> > Thank you.<br>
>> ><br>
>> ><br>
>> > On Tue, Feb 19, 2013 at 12:47 AM, Juli Mallett <<a href="mailto:juli@clockworksquid.com">juli@clockworksquid.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Your understanding sounds correct to me at a glance.  A diagram may be<br>
>> >> more helpful than text, though.<br>
>> >><br>
>> >> Your client and server should be separate machines, whether on the<br>
>> >> same LAN or with a WAN in between them.  SSH is just being used here<br>
>> >> to encrypt and authenticate the traffic between the client and server,<br>
>> >> and to forward ports on localhost so that you don't have to have ports<br>
>> >> listening where something else could connect to them.<br>
>> >><br>
>> >> If that's confusing or unnecessary for your testing, I would suggest<br>
>> >> that you remove the SSH port forwarding from the picture entirely.<br>
>> >> It's not necessary for correct operation, and seems to be more of a<br>
>> >> stumbling block than I had assumed when I used it in the example on<br>
>> >> the website.<br>
>> >><br>
>> >> Thanks,<br>
>> >> Juli.<br>
>> >><br>
>> >> On Tue, Feb 19, 2013 at 12:19 AM, Boxiang Pan <<a href="mailto:aquarypbx@gmail.com">aquarypbx@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Hi,<br>
>> >> ><br>
>> >> > I am still having some doubts understanding the first example<br>
>> >> > (proxying<br>
>> >> > over<br>
>> >> > ssh) at <a href="http://wanproxy.org/examples.shtml" target="_blank">wanproxy.org/examples.shtml</a>.<br>
>> >> ><br>
>> >> > Please correct me if I am wrong. From my understanding, we have a<br>
>> >> > client<br>
>> >> > machine, on which we have client.conf and run wanproxy -c<br>
>> >> > client.conf.<br>
>> >> > In<br>
>> >> > the client.conf, it listens on if0.host on port if0.port, then<br>
>> >> > forward<br>
>> >> > the<br>
>> >> > connection to peer0.host on peer0.port.<br>
>> >> ><br>
>> >> > Next, we have a server machine, on which we have server.conf. In<br>
>> >> > server.conf, it listens incoming connection on if0.host on if0.port (<br>
>> >> > This<br>
>> >> > implies that "peer0.host, peer0.port" in client.conf should be the<br>
>> >> > same<br>
>> >> > as<br>
>> >> > "if0.host, if0.port" in server.conf) , and forward the connection to<br>
>> >> > peer0.host ("intranet" in the example) on peer0.port. Finally, on the<br>
>> >> > server<br>
>> >> > machine, we run "ssh -L 3301:localhost:3301 username@server wanproxy<br>
>> >> > -c<br>
>> >> > server.conf " , where the username is the login name of the server<br>
>> >> > machine.<br>
>> >> > (question: what should localhost in the above command be if my client<br>
>> >> > and<br>
>> >> > server are separate machines on the same LAN?)<br>
>> >> ><br>
>> >> > Besides the server and the client, we also have a third machine<br>
>> >> > "intranet",<br>
>> >> > that listens on "peer0.port" in the server.conf ( 80 in the example).<br>
>> >> > This<br>
>> >> > machine does not need to have wanproxy installed.<br>
>> >> ><br>
>> >> > What we did here was to forward everything that goes to "if0.host ,<br>
>> >> > if0.port"  in client.conf , by the proxy at "if0.host, if0.port" in<br>
>> >> > server.conf,  to the "intranet" machine at port 80.  For example, if<br>
>> >> > I<br>
>> >> > type<br>
>> >> > "ssh <a href="mailto:user@127.0.0.1">user@127.0.0.1</a> -p 3300", it will actually connect to "intranet"<br>
>> >> > on<br>
>> >> > port<br>
>> >> > 80.<br>
>> >> ><br>
>> >> > Please correct me if I am wrong. Thank you very much.<br>
>> >> ><br>
>> >> > --<br>
>> >> > Boxiang Pan<br>
>> >> ><br>
>> >> > Department of Electrical and Computer Engineering<br>
>> >> > University of California, San Diego<br>
>> >> > Tel: <a href="tel:858-999-7655" value="+18589997655">858-999-7655</a><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> ><br>
>> > Boxiang Pan<br>
>> ><br>
>> > Department of Electrical and Computer Engineering<br>
>> > University of California, San Diego<br>
>> ><br>
>> ><br>
>> ><br>
><br>
><br>
><br>
><br>
> --<br>
> ¼ï³Õµ¾<br>
> Boxiang Pan<br>
><br>
> Department of Electrical and Computer Engineering<br>
> University of California, San Diego<br>
> Tel: <a href="tel:858-999-7655" value="+18589997655">858-999-7655</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font color="#663333"><span style="font-size:large"><font face="verdana, sans-serif">¼ï³Õµ¾</font></span></font></div><font color="#663333"><font face="verdana, sans-serif">Boxiang Pan</font><br>
<br></font><div><div><font color="#663333">Department of Electrical and Computer Engineering</font></div><div><font color="#663333">University of California, San Diego </font></div><div><font color="#663333">Tel: 858-999-7655<br>
</font><br></div><div><br></div></div>