Skip to content

openstacks/network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to compile the program

$ gcc cli.c -o cli
$ gcc ser.c -o ser

How to use it

The tun/tap interface must already exist, be up and configured with an IP address, and owned by the user who runs ser and cli That user must also have read/write permission on /dev/net/tun

server side

$ ip tuntap add mode tun dev tun0
$ ip link set tun0 up
$ ip addr add 192.168.0.2/24 dev tun0
$ ser -i tun0

client side

$ ip tuntap add mode tun dev tun0
$ ip link set tun0 up
$ ip addr add 192.168.0.3/24 dev tun0
$ cli -i tun0 -r 192.168.0.2
$ ping 192.168.0.2

for python code

Install pytun with pip install python-pytun    
$ pip install python-pytun

pytun doc: https://github.com/montag451/pytun

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published