From charlesreid1

Procedure for adding a new node (Mac):

Setting Up New Mac 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



Flags