Hi, Juli,<div><br></div><div>I've created the server and client conf files, and both the server side and the client side wanproxy seem to be running. You mentioned that I can send some random files over http to the client and wanproxy will forward it to the "intranet:80".  I am not sure how should I do this, plus, should there be some process (eg: apache webserver) running on the intranet and listening on port 80 before I can send some random file to it? Could you please be more specific about how I may test to see if wanproxy is working correctly? </div>
<div><br></div><div>Thank you. <br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 11:53 AM, 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">Boxiang,<br>
<br>
That looks exactly right to me.  Is it working for you in practice?<br>
<br>
Thanks,<br>
Juli.<br>
<div class="HOEnZb"><div class="h5"><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 conf<br>
> files that I drew to show what I meant in the previous email. So all 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) 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>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I am still having some doubts understanding the first example (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 client<br>
>> > machine, on which we have client.conf and run wanproxy -c client.conf.<br>
>> > In<br>
>> > the client.conf, it listens on if0.host on port if0.port, then 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 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 -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 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" 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>
</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>
</div>