alphaliang / udptunnel

Automatically exported from code.google.com/p/udptunnel
GNU General Public License v3.0
0 stars 0 forks source link

Support PASSIVE mode (like FTP) #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There should be a way to support passive mode where the SERVER starts the 
connection to the client.
Scenario: RSYNC server not reachable behind a NAT; RSYNC client reachable. The 
UDP proxy would server side would make a request to the proxy client side so 
that the UDP channel opens. A that point the client can communicate normally 
with the server.

Original issue reported on code.google.com by enzinol@gmail.com on 23 Sep 2010 at 5:48

GoogleCodeExporter commented 9 years ago
I don't think this would be a good feature here because udptunnel is supposed 
to be a simple tunneling program, following a basic client-server model. FTP 
has the passive mode because of the separate channel used for transferring data.

One option is using port forwarding on the NAT'ing device. If the NAT'ing 
device doesn't support port forwarding or you don't have access to change it, a 
project called "pwnat" (http://samy.pl/pwnat/), which also uses this udptunnel 
project, will get around that.

Another option is to swap where the udpclient and udpserver are run from, and 
make a reverse SSH tunnel between the two machines through the UDP tunnel. 
Example:

HostA is rsync client machine, HostB is rsync server machine.
HostA# udptunnel -s 3333
HostB# udptunnel -c 2222 HostA 3333 127.0.0.1 22
HostB# ssh -p 2222 -R 873:127.0.0.1:873 user@127.0.0.1
HostA# rsync /path 127.0.0.1

However, this just gave me the idea of adding the feature for reverse tunnel, 
like the ssh -R option, which I think would be useful.

Original comment by dmeek...@gmail.com on 7 Nov 2010 at 12:42