Tinc as VPN
10.08.2017

tinc - VPN daemon for Linux. Not so widely spread as OpenVPN, but not inferior to it in functionality. Below i will tell how to setup VPN between 2 Linux servers, one is said to be gateway, another server (client) that has access to the Internet via VPN gateway.

I run two Debian-like servers, gateway has ssh access (via private key) to client. I advice you to setup passwordless SSH access, otherwise i'll type in your password many times.

Gateway setup (gw_tinc.sh and script below are taken from here):

# ./gw_tinc.sh gateway 192.168.0.1

After executing this command there should be 1 tun0 device in your system. Command should be executed at the very beginning, before you define any client. If everything is ok, setup a client connection:

# ./cl_tinc.sh 10.0.0.1 client 192.168.0.2

If you see some successfull pings in log, that means it's ok. Script also asks whether you want or not to install VPN gateway as default gateway.

I you have any questions, please feedback.

Теги → tinc vpn