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