Performing UDP tunneling through an SSH connection

The original source is:-

http://wiki.networksecuritytoolkit.org/nstwiki/index.php/Tunnelling_UDP_Traffic_Through_An_SSH_Connection

http://www.qcnetwork.com/vince/doc/divers/udp_over_ssh_tunnel.html

on client:

[root@client tmp]# /usr/bin/ssh -L 9999:localhost:9999 root@192.168.0.51;

on server:

[root@server ~]# /usr/bin/mkfifo “/tmp/fifo”;

[root@server ~]# /bin/ls -al “/tmp/fifo”; prw-r–r– 1 root root 0 Mar 22 19:37 /tmp/fifo

[root@server ~]# /usr/bin/nc -l 9999 < “/tmp/fifo” | /usr/bin/nc -u 192.168.0.51 53 > “/tmp/fifo”;
on client:
[root@client tmp]# /usr/bin/mkfifo “/tmp/fifo”;

[root@client tmp]# /bin/ls -al “/tmp/fifo”;
prw-r–r– 1 root root 0 Mar 22 19:37 /tmp/fifo
[root@client tmp]# /usr/bin/nc -l -u 53  < “/tmp/fifo” | /usr/bin/nc 127.0.0.1 9999 > “/tmp/fifo”;
[root@client tmp]# dig desktop1.bipinpatel.com @127.0.0.1
Advertisements

About bpn4it

Feel Free in Linux. Bipin Patel bpn4it@gmail.com Ahmadabad, Gujarat, India
This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s