First need to review a few things:
- To be a connection between two computers at the very least there must be a client and a server.
- The server is waiting for connections (listen mode "Listing")
- The customer makes the connection. (Mode "connect")
The web server is "waiting" your connection.
"Tunnel" data is to make these data to flow through a third computer, which will serve as a "connection" between client and server.
We can use a tunnel to studies of communication protocols, for through the tunnel you can view the commands between client and server.
CREATING A TUNNEL.
Let's use the software insecuritynet 3.X to create our tunnel.
First let's define who will be the client, the tunnel and the server:
Client -> Our computer.
Tunnel -> Program insecuritynet
Server -> FTP server unicamp (Public Servant)
Let's create our tunnel.
1 -) Open the program and enter:
Start -> Protection -> Port Tunnel
We will choose how the tunnel will be connected:
Our tunnel should wait for a connection and connect to the server unicamp.
So we have to use the "Listing -> Connect"
Let us set up the tunnel to wait on port 21 and redirect the connection to the server "ftp.unicamp.br" on port 21.
The port 21 is the default port for FTP servers.
The tunnel will be open and will wait for connection.
Let's create the connection.
Now our computer is "virtually" the FTP server unicamp
Let's connect in our "SUPPOSED local FTP server"
Note the TUNEL
You can view all communication between client and server.
GREEN: data are input data (our client)
BLUE: The data are Output Server (Unicamp)
When you create a tunnel of this kind your computer becomes a server too.
If another computer connect to the tunnel, will be automatically connected to your redirection.
In this example will redirect a service for receiving email (POP)
Note the tunnel when a remote computer connects to "pop our service."
The IP "192.168.0.1" connected to our port 110 and was redirected to the IP address 220.127.116.11 (server pop)
The data in green are the computer "192.168.0.1". The data in blue are the POP server.
As it showed me the tunnel is a great tool to study protocols and connections.
In the next tutorial I'll post about using a tunnel as a VPN server connection between two computers with IP NAT (computers which can not "see").