From charlesreid1

(Created page with "Procedure for adding a new node (Mac): Install: <pre> $ brew install tinc </pre> Prep directory structure: <pre> mkdir -p /usr/local/etc/tinc/master/ cd /usr/local/etc/tin...")
 
No edit summary
Line 1: Line 1:
Procedure for adding a new node (Mac):
Procedure for adding a new node (Mac):
==Setting Up New Node==


Install:
Install:
Line 34: Line 36:
#!/bin/sh
#!/bin/sh
ifconfig $INTERFACE down
ifconfig $INTERFACE down
</pre>
Make executable:
<pre>
$ chmod +x tinc-up tinc-down
</pre>
Make hosts directory:
<pre>
$ git clone https://charlesreid1.com:3000/charlesreid1/tinc-hosts.git hosts
$ cd hosts
</pre>
Edit the file cronus, and add it to the repository
Pull the updated cronus machine file on other machines (e.g. jupiter)
==Network Architecture/Configuration==
The setup with Tinc when there are multiple nodes is as follows:
jupiter = debian server, cronus = mac, maya = mac
Jupiter is the "server" (spoke on the wheel). Tinc is a peer-to-peer VPN model, but we can still have everybody share a single connection to the most convenient nearest server, which for cronus and maya is jupiter.
Jupiter will not be set to connect to anyone, so it will simply listen for incoming connections.
Cronus will bet set to connect to Jupiter when Tinc starts.
Maya will be set to connect to Jupiter when Tinc starts.
'''tinc.conf on jupiter:'''
<pre>
$ cat tinc.conf
Name = jupiter
AddressFamily = any
Device = /dev/net/tun
Mode = switch
</pre>
'''tinc.conf on cronus:'''
<pre>
$ cat tinc.conf
Name = cronus
AddressFamily = any
Mode = switch
ConnectTo = jupiter
</pre>
'''tinc.conf on maya:'''
<pre>
$ cat tinc.conf
Name = maya
AddressFamily = any
Mode = switch
ConnectTo = jupiter
</pre>
</pre>

Revision as of 00:55, 22 January 2018

Procedure for adding a new node (Mac):

Setting Up New Node

Install:

$ brew install tinc

Prep directory structure:

mkdir -p /usr/local/etc/tinc/master/
cd /usr/local/etc/tinc/master/

Edit tinc.conf:

$ cat tinc.conf
Name = cronus
AddressFamily = any
Mode = switch
ConnectTo = jupiter

Edit tinc-up and tinc-down:

$ cat tinc-up
#!/bin/sh
ifconfig $INTERFACE 10.6.0.3 netmask 255.255.0.0

$ cat tinc-down
#!/bin/sh
ifconfig $INTERFACE down

Make executable:

$ chmod +x tinc-up tinc-down

Make hosts directory:

$ git clone https://charlesreid1.com:3000/charlesreid1/tinc-hosts.git hosts
$ cd hosts

Edit the file cronus, and add it to the repository

Pull the updated cronus machine file on other machines (e.g. jupiter)

Network Architecture/Configuration

The setup with Tinc when there are multiple nodes is as follows:

jupiter = debian server, cronus = mac, maya = mac

Jupiter is the "server" (spoke on the wheel). Tinc is a peer-to-peer VPN model, but we can still have everybody share a single connection to the most convenient nearest server, which for cronus and maya is jupiter.

Jupiter will not be set to connect to anyone, so it will simply listen for incoming connections.

Cronus will bet set to connect to Jupiter when Tinc starts.

Maya will be set to connect to Jupiter when Tinc starts.

tinc.conf on jupiter:

$ cat tinc.conf
Name = jupiter
AddressFamily = any
Device = /dev/net/tun
Mode = switch

tinc.conf on cronus:

$ cat tinc.conf
Name = cronus
AddressFamily = any
Mode = switch
ConnectTo = jupiter

tinc.conf on maya:

$ cat tinc.conf
Name = maya
AddressFamily = any
Mode = switch
ConnectTo = jupiter