{% extends "admin/base_site.html" %} {% load i18n l10n %} {% load url from future %} {% load admin_urls %} {% load code %} {% block extrahead %} {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content_title %}

Tinc client installation help

{% endblock %} {% block content %}

The following instructions detail the process of configuring a Tinc VPN daemon in order to connect to the {{ net_name }} management network.

These instructions are specific for a Debian-like Linux distribution (i.e. Ubuntu). Instructions for other systems can be found on Internet.

Show the basic configuration parameters

{% code 'bash' %} # tinc.conf Name = {{ host.tinc.name }} {% for gw in host.tinc.connect_to %}ConnectTo = {{ gw }} {% endfor %} # tinc-up and tinc-down Host address {{ host.tinc.subnet.strNormal }}/48 # hosts/{{ host.tinc.name }} Subnet = {{ host.tinc.subnet.strNormal }}/128 {% for gw in host.tinc.connect_to %}# hosts/{{ gw }} {% for addr in gw.addresses.all %}Address = {{ addr }} {{ addr.port }} {% endfor %}Subnet = {{ gw.subnet.strNormal }}/128 {{ gw.pubkey }}{% endfor %} {% endcode %}

1. Install dependencies

{% code 'bash' %} apt-get install tinc iproute {% endcode %}

2. Create and configure the tinc network

{% code 'bash' %} # Create and configure the "{{ net_name }}" network mkdir /etc/tinc/{{ net_name }} echo '{{ host.tinc.get_config|safe }}' > /etc/tinc/{{ net_name }}/tinc.conf mkdir /etc/tinc/{{ net_name }}/hosts echo '{{ host.tinc.get_host|safe }}' > /etc/tinc/{{ net_name }}/hosts/{{ host.tinc.name }} {% for gw in host.tinc.connect_to %} echo '{{ gw.get_host }}' > /etc/tinc/{{ net_name }}/hosts/{{ gw }} {% endfor %} # Create scripts for setting up and down the network interface echo '{{ host.tinc.get_tinc_up|safe }}' > /etc/tinc/{{ net_name }}/tinc-up echo '{{ host.tinc.get_tinc_down|safe }}' > /etc/tinc/{{ net_name }}/tinc-down # Make the scripts executable chmod a+rx /etc/tinc/{{ net_name }}/tinc-{up,down} {% endcode %}

3. Generate and upload the key to the server

{% code 'bash' %} # Generate the RSA key pair for your host tincd -n {{ net_name }} -K {% endcode %}

Now you have to upload your public key on your {{ host.description|capfirst }} host page.

You can find the key at the end of the /etc/tinc/{{ net_name }}/hosts/{{ host.tinc.name }} file.

4. Start the tinc daemon

{% code 'bash' %} # Enable the "{{ net_name }}" network to automatically start on boot echo {{ net_name }} >> /etc/tinc/nets.boot # Restart the tinc service in order to apply the new configuration /etc/init.d/tinc restart # Try if your connection is working by pinging the server ping6 {{ server.tinc.address }} {% endcode %}
{% endblock %}