Simple Tunnel Working on C

It can be used for tunneling sockets without exposing your personal IP, when having another point of reference like a server.

Compilation using GCC

This software is known to have run for me under Linux/Intel, Solaris/Intel, Solaris/Sparc, SunOS/Sparc.

 Linux:   gcc -O2 -Wall                          tunnel.c -o tunnel
 Solaris: gcc -O2 -Wall -lsocket -lnsl -DSOLARIS tunnel.c -o tunnel
 SunOS:   gcc -O2 -Wall                -DSUNOS   tunnel.c -o tunnel


help menu

 tunnel -h 

Example of HTTPS website(fictional)

./tunnel -Lr <ip_forClient_2_connect_as_public>:<public_port> <private_ip_or_local_ip_to_expose>:<private_port>

./tunnel -Lr

then open on your navigator "" and you will be taken to the https website that you are tunneling.

Diagram of Connection


Code(taken from ):