Skip to content

Creating encrypted tunnel between hosts without public IPs

License

Notifications You must be signed in to change notification settings

teonet-go/teotun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teonet tunnel

Teotun creates secret tunnel between hosts without public IPs using Teonet. The connection based on TRU transport and create reliable, low latency, encrypted P2P channels between connected peers.

GoDoc Go Report Card

Usage example

Create regular tunnel between thee hosts.

One host will be Main and all other will connect to main host on start. Main host does not have -connectto parameter. All other hosts use teonet address of Main host in -connectto parameter.

For any hosts

Connect to your host and clone this reposipory:

git clone https://github.com/teonet-go/teotun.git
cd teotun

Start teotun on Main host

TUN=teotun1 && sudo go run ./cmd/teotun/ -name=$TUN -postcon="./if_up.sh $TUN 10.1.2.1/24" -loglevel=connect -hotkey -stat

Copy teonet address which prints after Main teotun started:

Teonet address: MIxxCM5mxilJ9Oa4zvQJbkSBp7mB4xuyZMM

Use this address in -connectto parameter in Host A and Host B

Start teotun in Host A

TUN=teotun1 && sudo go run ./cmd/teotun/ -name=$TUN -connectto=MIxxCM5mxilJ9Oa4zvQJbkSBp7mB4xuyZMM -postcon="./if_up.sh $TUN 10.1.2.2/24" -loglevel=connect -hotkey -stat

Start teotun in Host B

TUN=teotun1 && sudo go run ./cmd/teotun/ -name=$TUN -connectto=MIxxCM5mxilJ9Oa4zvQJbkSBp7mB4xuyZMM -postcon="./if_up.sh $TUN 10.1.2.3/24" -loglevel=connect -hotkey -stat

How to use

When teotun will be started on all hosts, you can use any network commands between this hosts by its local IPs 10.1.2.1, 10.1.2.2, 10.1.2.3.

For example, you can ping Host B from Host A.

Login to Host B and execute command:

ping 10.1.2.2

All host in teotun network connect P2P so you will see lowest ping between Host B and Host A.

License

BSD