A simple shell pipe would only communicate left process' standard output to right process' standard input.
The fifo is necessary to have two-way communications between the two channels. If you want to do DNS forwarding like me, you can take the first nameserver's IP you will find in /etc/nf.īut first, we need to create a fifo. On the server, we open a listener on the TCP port 6667 which will forward data to UDP port 53 of a specified IP. Setup the TCP to UDP forward on the server This will allow TCP connections on the port number 6667 of your local machine to be forwarded to the port number 6667 on through the secure channel. On your local machine (local), connect to the distant machine (server) by SSH, with the additional -L option so that SSH will do TCP port-forwarding: local# ssh -L 6667:localhost:6667 Performing UDP tunneling through an SSH connection Step by step Open a TCP forward port with your SSH connection This small guide tells you how to send UDP traffic via SSH using tools that come standard (ssh,nc,mkfifo) with most UNIX-like operating systems.