summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--retiolum/hosts/.scripts/README15
-rwxr-xr-xretiolum/hosts/.scripts/build_arch.sh14
-rwxr-xr-xretiolum/hosts/.scripts/build_debian.sh18
-rwxr-xr-xretiolum/hosts/.scripts/build_debian_clean.sh31
-rwxr-xr-xretiolum/hosts/.scripts/build_ec2.sh16
-rw-r--r--retiolum/hosts/.scripts/build_no.de.sh1
-rwxr-xr-xretiolum/hosts/.scripts/install.sh68
-rw-r--r--retiolum/hosts/ITART6
-rw-r--r--retiolum/hosts/foobaz8
-rw-r--r--retiolum/hosts/miefdahome2
-rw-r--r--retiolum/hosts/tart6
-rw-r--r--retiolum/hosts/ytart9
12 files changed, 192 insertions, 2 deletions
diff --git a/retiolum/hosts/.scripts/README b/retiolum/hosts/.scripts/README
new file mode 100644
index 00000000..8d104179
--- /dev/null
+++ b/retiolum/hosts/.scripts/README
@@ -0,0 +1,15 @@
+This directory contains the build and install scripts for shack-retiolum
+
+1. build_arch
+ arch linux build script
+2. build_debian
+ debian build script
+3. build_debian_clean
+ debian script which builds a clean tinc daemon
+4. build_ec2
+ Amazon ec2 base instance build script
+5. install.sh
+ configures the tinc daemon
+ $1 is the nickname
+ $2 is the ip-address
+hosts.tar contains the currently available hosts
diff --git a/retiolum/hosts/.scripts/build_arch.sh b/retiolum/hosts/.scripts/build_arch.sh
new file mode 100755
index 00000000..5ef5d765
--- /dev/null
+++ b/retiolum/hosts/.scripts/build_arch.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+sudo pacman -S openssl gcc lzo
+curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
+cd tinc-1.0.13
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+make
+sudo make install
+cd ..
+
+echo "overwriting python to python2"
+sed 's/\/usr\/bin\/python/\/usr\/bin\/python2/g' install.sh >install2.sh
+mv install2.sh install.sh
+
diff --git a/retiolum/hosts/.scripts/build_debian.sh b/retiolum/hosts/.scripts/build_debian.sh
new file mode 100755
index 00000000..d8fcec2f
--- /dev/null
+++ b/retiolum/hosts/.scripts/build_debian.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -x
+MYIP=10.0.7.7.55
+
+apt-get install tinc git curl python
+
+git clone https://github.com/makefu/shack-retiolum.git
+
+cd shack-retiolum
+
+./install.sh `hostname` $MYIP
+cd ..
+rm shack-retiolum
+# for autostart
+sed -i '/retiolum/d' /etc/tinc/nets.boot
+echo "retiolum" >> /etc/tinc/nets.boot
+sed -i '/EXTRA/d' /etc/tinc/nets.boot
+echo "EXTRA=\"\"" >> /etc/default/tinc
diff --git a/retiolum/hosts/.scripts/build_debian_clean.sh b/retiolum/hosts/.scripts/build_debian_clean.sh
new file mode 100755
index 00000000..a7332f4e
--- /dev/null
+++ b/retiolum/hosts/.scripts/build_debian_clean.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+set -xe
+MYIP=10.0.7.7.55
+
+apt-get install tinc git curl gcc gcc-dev build-essential libssl-dev python
+
+git clone https://github.com/makefu/shack-retiolum.git
+
+mkdir build
+cd build
+curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar
+xz
+cd lzo-2.04
+./configure --prefix=/usr
+make
+sudo make install
+cd ..
+curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
+cd tinc-1.0.13
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+make
+sudo make install
+cd ../..
+
+cd shack-retiolum
+./install.sh `hostname` $MYIP
+
+rm shack-retiolum
+# for autostart
+echo "retiolum" >> /etc/tinc/nets.boot
+echo "EXTRA=\"--user=tincd --chroot\"" >> /etc/default/tinc
diff --git a/retiolum/hosts/.scripts/build_ec2.sh b/retiolum/hosts/.scripts/build_ec2.sh
new file mode 100755
index 00000000..79f2af28
--- /dev/null
+++ b/retiolum/hosts/.scripts/build_ec2.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -e
+sudo yum install -y gcc openssl-devel
+mkdir build
+cd build
+curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar xz
+cd lzo-2.04
+./configure --prefix=/usr
+make
+sudo make install
+cd ..
+curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
+cd tinc-1.0.13
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+make
+sudo make install
diff --git a/retiolum/hosts/.scripts/build_no.de.sh b/retiolum/hosts/.scripts/build_no.de.sh
new file mode 100644
index 00000000..2976d3a2
--- /dev/null
+++ b/retiolum/hosts/.scripts/build_no.de.sh
@@ -0,0 +1 @@
+pkgin in lzo gcc-tools gcc-compiler gcc34
diff --git a/retiolum/hosts/.scripts/install.sh b/retiolum/hosts/.scripts/install.sh
new file mode 100755
index 00000000..4b21bcd4
--- /dev/null
+++ b/retiolum/hosts/.scripts/install.sh
@@ -0,0 +1,68 @@
+#! /bin/sh
+# USE WITH GREAT CAUTION
+
+set -e
+myname="${1:-dummy}"
+rel_hostsfile=`dirname $0`/..
+hostsfile=`readlink -f $rel_hostsfile`
+netname=retiolum
+myipv4="${2:-10.7.7.56}"
+mynet4=10.7.7.0
+CURR=`pwd`
+# create configuration directory for $netname
+mkdir -p /etc/tinc/$netname
+cd /etc/tinc/$netname
+
+# get currently known hosts
+cp -r $hostsfile hosts
+echo "added known hosts:"
+ls -1 | LC_ALL=C sort
+echo "delete the nodes you do not trust!"
+
+
+cat>tinc-up<<EOF
+#! /bin/sh
+ifconfig \$INTERFACE up $myipv4/24
+route add -net $mynet4/24 dev \$INTERFACE
+EOF
+
+chmod +x tinc-up
+
+cat>tinc.conf<<EOF
+Name = $myname
+ConnectTo = supernode
+ConnectTo = kaah
+ConnectTo = pa_sharepoint
+Device = /dev/net/tun
+EOF
+echo "Subnet = $myipv4" > hosts/$myname
+tincd -n $netname -K
+
+echo Writing Public Key to irc channel
+cat>write_channel.py<<EOF
+#!/usr/bin/python
+import random, sys, time, socket
+
+CHANNEL = '#tincspasm'
+HOST='irc.freenode.net'
+FILE="/etc/tinc/retiolum/hosts/$myname"
+PORT=6667
+NICK= "$myname_"+str(random.randint(23,666))
+
+sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+sock.connect((HOST,PORT))
+print NICK
+sock.send("NICK %s\r\n" % NICK)
+sock.send("USER %s %s bla : %s\r\n" %(NICK,HOST,NICK))
+sock.send("JOIN %s\r\n" % CHANNEL)
+time.sleep(23)
+f = open(FILE,'r')
+a = [ sock.send("PRIVMSG %s : %s" % ( CHANNEL,line)) for line in f]
+time.sleep(5) #because irc is so lazy
+print "closing socket"
+sock.close()
+EOF
+python write_channel.py
+# add user tincd
+useradd tincd
+tincd --user=tincd --chroot -n $netname
diff --git a/retiolum/hosts/ITART b/retiolum/hosts/ITART
new file mode 100644
index 00000000..953c0995
--- /dev/null
+++ b/retiolum/hosts/ITART
@@ -0,0 +1,6 @@
+Subnet = 10.7.7.22
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBANihbPlgirJ63MpMX283M+SjW6JgEhXmt1zcRuOyunbUq6Yt+w4sVtN8
+n2dZ960cTnAXkM1mvMhIcI5p6ZwfdorThJV2+F9eb+84x3GiDLTZ2eL0UefxOSLG
+OILFFu5t4Y82MCreyHV4GZDrb2Sz0L1t6r8DmyU91MjXkYBLq5g/AgMBAAE=
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/foobaz b/retiolum/hosts/foobaz
new file mode 100644
index 00000000..47ac4d6e
--- /dev/null
+++ b/retiolum/hosts/foobaz
@@ -0,0 +1,8 @@
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA4wJHcyS3PI2rugPbhQy5qLKQwtaOIsLV367b9Pq6VLKEly2dWAZx
+xvFmdKRbm/n/HaRzX+vyDuhWOxkzrF0NLNrrU58Rw5suHfNU2ryuO1QB2sIGMj1R
+QXwB+W6MNM5OamBkLLo740aPvVjfud9tc3yrUg6mTCJP1tbRLgHyDy6DT3s5WGvO
+R6bfYRjdzVLjwqqn5P/ED51gBgDmJEhoWzQ4IzBSO+mxRrkvwfPQNiTSrrQBAiU7
+r5lstDzEY8qDdwY6t1w91hxm34LLJ/gQr9uvXGF/GThm4J8Ndlj4tOl8UmFbo3Nz
+6Zm0b2JZ4dWbA/NXp7Sf9qKC5duQkAPb1QIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/miefdahome b/retiolum/hosts/miefdahome
index 180bbde7..9a9f4310 100644
--- a/retiolum/hosts/miefdahome
+++ b/retiolum/hosts/miefdahome
@@ -1,6 +1,4 @@
-Address = 192.168.10.119
Subnet = 10.7.7.30
-
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAopwKn000XAcoI61OqQ7cjgrPHm/jHmuB1LHeCUggWMOD78WDFNzq
8/l9ASlU9kbSZFhoMuBR5BPWgciYWsC1EqY1nRAc/Si1rUHnJw+Xcyl0MNsZ7Cef
diff --git a/retiolum/hosts/tart b/retiolum/hosts/tart
new file mode 100644
index 00000000..986140ee
--- /dev/null
+++ b/retiolum/hosts/tart
@@ -0,0 +1,6 @@
+Subnet = 10.7.7.123
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBALvZ4rLz0soCzkyOraC1aKtJzfVqYd2je6rkuaV12CLybCUc6YXaW/HP
+rzJyDGmdh355kU4FNNyjnWP/U/juhMaeYFyTUWCRVXdqvDdeiEe/EJ0g+fFGKvPY
+DEFo3VMCEkrXKuwDBQP02b4xmAWWnVBityGv5tgDFjl9uXh/SzL1AgMBAAE=
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/ytart b/retiolum/hosts/ytart
new file mode 100644
index 00000000..9f45cd2f
--- /dev/null
+++ b/retiolum/hosts/ytart
@@ -0,0 +1,9 @@
+Subnet = 10.7.7.201
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA2yCCN8nAPmZNL75Jr+FtfP5jmyuqg7IpgfW03L3s8Gg7NB1eTQAg
+UFPh13cj4lZleZOl3Yus7yx4HxMO8tYCptqnRPyP+UXrxvL+kECS4J3rLzjH/eOM
+0oAxuEe+DOa5R9Vj2bRtTouePlEvXDpgZZcDnedutRUYFGLNvkoWxu0RGqfQaJmd
+7KtOk1NJn9efNqwpl6ejPj5A+ivh2T1vAMWherM60JTjjhNGiSP4so0WG8PlBPYc
+GKnmMSQl0u5n10uTvLoVvnSfLj/QvL3d8abTrFV2lRqaCTJy+lxgkS1A5AnsTP1G
+OBbm/Gk9hRuYy2iP6FQ65q64/JfoeoqpPwIDAQAB
+-----END RSA PUBLIC KEY-----