Skip to content

kzaag/dtlsvpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Little point-to-point vpn tunnel
[L2 -> L3 -> UDP -> DTLS [ IP4/6 -> L4 -> ... ] ]

Its functions are:
0. authenticated encryption
1. PKI authentication (both sides) based on common CA
2. persisted connection:
	if something happens on the link both sides will to their best to restart connection.

Quick start, single box poc using netns

create ca and generate server and client key-cert pairs
0. make allcert

build vpn
1. make build

create and setup netns
1. sudo make netns

from one shell
2. sudo make netns-client

from other shell
3. sudo make netns-server

add routes which you want to tunnel through vpn.
for example to route all google traffic, you can add following routes:
4. sudo make add-google-routes

test it.
this is an example you can choose to test vpn with any application running from within vpns namespace
6. sudo ip netns exec vpns /bin/bash
   su <your user>
   
   # set up some basic env variables, to browser to connect to sound server
   # note that your xdg and dbug configuration may vary between different distros
   export XDG_RUNTIME_DIR=/run/user/$(id -u)
   export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
   
   chromium youtube.com

Releases

No releases published

Packages

No packages published