Git Product home page Git Product logo

simpletun's Introduction

simpletun, a (too) simple tunnelling program.

-------

To compile the program, just do

$ gcc simpletun.c -o simpletun

If you have GNU make, you can also exploit implicit targets and do

$ make simpletun

-------

Usage:
simpletun -i <ifacename> [-s|-c <serverIP>] [-p <port>] [-u|-a] [-d]
simpletun -h

-i <ifacename>: Name of interface to use (mandatory)
-s|-c <serverIP>: run in server mode (-s), or specify server address (-c <serverIP>) (mandatory)
-p <port>: port to listen on (if run in server mode) or to connect to (in client mode), default 55555
-u|-a: use TUN (-u, default) or TAP (-a)
-d: outputs debug information while running
-h: prints this help text

-------

Refer to http://backreference.org/2010/03/27/tuntap-interface-tutorial/ for 
more information on tun/tap interfaces in Linux in general, and on this 
program in particular.
The program must be run at one end as a server, and as client at the other 
end. The tun/tap interface must already exist, be up and configured with an IP 
address, and owned by the user who runs simpletun. That user must also have
read/write permission on /dev/net/tun. (Alternatively, you can run the
program as root, and configure the transient interfaces manually before
starting to exchange packets. This is not recommended)

Use is straightforward. On one end just run

[server]$ ./simpletun -i tun13 -s

at the other end run

[client]$ ./simpletun -i tun0 -c 10.2.3.4

where 10.2.3.4 is the remote server's IP address, and tun13 and tun0 must be 
replaced with the names of the actual tun interfaces used on the computers.
By default it assumes a tun device is being used (use -u to be explicit), and
-a can be used to tell the program that the interface is tap. 
By default it uses TCP port 55555, but you can change that by using -p (the 
value you use must match on the client and the server, of course). Use -d to 
add some debug information. Press ctrl-c on either side to exit (the other end
will exit too).

The program is very limited, so expect to be disappointed.

simpletun's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.