Help with udptunnel

Hi everyone,

I'm trying to setup an UDP over TCP tunnel with the udptunnel package. First, let me show you my current setup:

My goal is to first learn how udptunnel works and then later set up a PXE environment using these tunnels. But in this case I just need to understand how udptunnel works.

To begin with, I'm trying a simple approach, using TFTP, and trying to redirect UDP port 2002 to UDP port 69 of FREEBNT.

The documentation I found about udptunnel is little. I found this link https://www.cs.columbia.edu/~lennox/udptunnel/ which is down now but I found it in archive.org. Following this documentation, I tried to guess a little bit what is each parameter/value/etc. But I didn't succeed.
Let me show you how I did this time:

I installed udptunnel package and kmod-udptunnel4 in both FREEBNTUNNEL and TPLINK.

Then I created an SSH tunnel like this:

root@FREEBNTUNNEL:~# ssh -l root -p 22 -i /root/.ssh/KeyB_priv -L *:30330:127.0.0.1:30330 192.168.1.8

then, I executed these 2 commands in TP_LINK (first) and FREEBNTUNNEL (second):

root@TPLINK:~# udptunnel -s 30330 192.168.1.2/69
root@FREEBNTUNNEL:~# udptunnel -c 127.0.0.1/30330 192.168.1.30/2002

or

root@FREEBNTUNNEL:~# udptunnel -c 127.0.0.1/30330 127.0.0.1/2002

Then, from my computer TACENS, I tried to GET a TFTP file from the tunnel. For this I opened TFTPD64 and used the TFTP client section, and pointed to 192.168.1.30 port 2002. (I used the port 2002 not to interfere with the TFTP server of FREEBNTUNNEL which is usually active).

I made sure that the same thing was working (directly, without the tunnel), pointing to 192.168.1.2 port 69, and all other settings were the same. And it actually works.

Then, can anybody tell what is my error in this, or any clue about how to solve this thing?

Thanks in advance

Take a look:

Hi @AndrewZ ,

Thanks,
I have examined the post you linked, tried to understand the command structure, but I didn't succeed in my example.

What I did is, first obviously the tunnel, then in the server side:

root@TPLINK:~# udptunnel -s 0.0.0.0:30330 192.168.1.2:69
0.0.0.0:30330: invalid port number
root@TPLINK:~# udptunnel -s 30330 192.168.1.2:69

and in client side:

root@FREEBNTUNNEL:~# udptunnel -c 2002 127.0.0.1:30330
setup_tcp_client: connect: Operation timed out
root@FREEBNTUNNEL:~#

Do you have any idea on why I'm not succeeding yet?

And do you have a link to any udptunnel documentation for the OpenWRT's version of the command?

Thanks

Hi again,
I came up with the idea of trying it simpler; I didn't do the tunnel this time, and tried attacking the TCP port of TPLINK directly. These are the commands:

root@TPLINK:~# udptunnel -s 30330 192.168.1.2:69

and then client side:

root@FREEBNTUNNEL:~# udptunnel -c 2002 192.168.1.8:30330
setup_tcp_client: connect: Operation timed out
root@FREEBNTUNNEL:~#

Then I tried to TFTP to server 192.168.1.30:2002 but didn't succeed.
Thanks

That was 3 years ago... As far as I remember, I had to use that version because the version provided by OpenWrt did not meet my needs.

Ok thanks anyway