How to install tinc VPN on Ubuntu Linux 16.04 LTS

How to install tinc VPN on Ubuntu Linux 16.04 LTS

To install tinc, a popular open-source Virtual Private Network (VPN) software, on Ubuntu Linux 16.04 LTS, follow these steps:

  1. Install the tinc package by running the following command:
sudo apt-get install tinc
‮ww:ecruoS‬w.lautturi.com

This will install tinc and any dependencies required.

  1. To create a new tinc VPN, run the following command:
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.

  1. Change into the VPN directory:
cd /etc/tinc/vpnname
  1. Edit the tinc.conf file to specify the name of your VPN and the mode in which tinc should operate:
Name = vpnname
Mode = switch
  1. Create a new file called 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.

  1. Make the tinc-up script executable by running the following command:
chmod +x tinc-up
  1. Edit the tinc-down file to delete the tinc interface when the VPN is brought down:
#!/bin/sh
ifconfig $INTERFACE down
  1. Make the tinc-down script executable by running the following command:
chmod +x tinc-down
  1. Create a new file called hosts/vpnname with the following contents:
Address = your_public_IP_address
Subnet = 10.0.0.1/32
``
Created Time:2017-10-16 14:38:50  Author:lautturi