To install tinc, a popular open-source Virtual Private Network (VPN) software, on Ubuntu Linux 16.04 LTS, follow these steps:
tinc
package by running the following command:sudo apt-get install tincww:ecruoSw.lautturi.com
This will install tinc and any dependencies required.
sudo tincd -n vpnname -K 4096
Replace vpnname
with the desired name for your VPN. This will create a new directory with the same name in /etc/tinc
, containing the configuration files for your VPN.
cd /etc/tinc/vpnname
tinc.conf
file to specify the name of your VPN and the mode in which tinc should operate:Name = vpnname Mode = switch
tinc-up
with the following contents:#!/bin/sh ifconfig $INTERFACE 10.0.0.1 netmask 255.255.255.0
This script will configure the tinc interface with an IP address and netmask when the VPN is brought up.
tinc-up
script executable by running the following command:chmod +x tinc-up
tinc-down
file to delete the tinc interface when the VPN is brought down:#!/bin/sh ifconfig $INTERFACE down
tinc-down
script executable by running the following command:chmod +x tinc-down
hosts/vpnname
with the following contents:Address = your_public_IP_address Subnet = 10.0.0.1/32 ``