summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-12-29 19:51:38 +0100
committermakefu <github@syntax-fehler.de>2013-12-29 19:51:38 +0100
commit1cbd74d5ff6f298af6543839f1f2429d2cc8a868 (patch)
tree2847823a103865a536e6a52200318b3e14fdb537
parent299afb456b31f5d326153723f43a092d7a4a95d9 (diff)
parent75f19c77fb0e59e8298b784cdeaceb8cc3bd4931 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
-rw-r--r--cholerab/tinc-win7
-rwxr-xr-xretiolum/Makefile6
-rwxr-xr-xretiolum/bin/pgrep-retiolum-tincd-args2
-rwxr-xr-xretiolum/bin/restart-tincd14
-rw-r--r--retiolum/hosts/elvis12
-rw-r--r--retiolum/hosts/flap11
-rw-r--r--retiolum/hosts/slowpoke1
-rw-r--r--retiolum/hosts/thomasDOTde9
-rw-r--r--retiolum/hosts/wall2
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh2
-rwxr-xr-xretiolum/scripts/tinc_setup/tinc-up11
11 files changed, 49 insertions, 28 deletions
diff --git a/cholerab/tinc-win b/cholerab/tinc-win
new file mode 100644
index 00000000..80076d06
--- /dev/null
+++ b/cholerab/tinc-win
@@ -0,0 +1,7 @@
+install tinc in windows
+add tap device
+Interface instead of device in tinc.conf
+fix ip in windows network device
+generate key
+propagate hosts
+
diff --git a/retiolum/Makefile b/retiolum/Makefile
index b3a3c124..7942b77c 100755
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -9,14 +9,12 @@ links:
install: upgrade
- ../punani/bin/punani install tinc python
- scripts/tinc_setup/install.sh
sudo cp scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up
upgrade: update
- if ! diff -u scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up; then \
+ if ! sudo diff -u scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up; then \
sudo cp scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up; \
- sudo bin/restart-tincd || :; \
+ sudo pkill -HUP tincd || :; \
fi
update: hosts
diff --git a/retiolum/bin/pgrep-retiolum-tincd-args b/retiolum/bin/pgrep-retiolum-tincd-args
deleted file mode 100755
index 19c05fbe..00000000
--- a/retiolum/bin/pgrep-retiolum-tincd-args
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-ps -e -o args | grep -E '(^|[ /])tincd +([^ ].* )?(-n +|--net=)retiolum'
diff --git a/retiolum/bin/restart-tincd b/retiolum/bin/restart-tincd
deleted file mode 100755
index 17d939d9..00000000
--- a/retiolum/bin/restart-tincd
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-set -xeuf
-
-PATH="$(dirname $(readlink -f "$0"))${PATH+:$PATH}"
-
-if args="`pgrep-retiolum-tincd-args`"; then
- while $args --kill; do
- sleep 1
- done
- $args
-else
- echo "$0: there is no retiolum tincd process to restart" >&2
- exit 23
-fi
diff --git a/retiolum/hosts/elvis b/retiolum/hosts/elvis
new file mode 100644
index 00000000..f78243a3
--- /dev/null
+++ b/retiolum/hosts/elvis
@@ -0,0 +1,12 @@
+Address = dn42.wg1337.de
+Subnet = 10.243.228.181
+Subnet = 42:42a3:7ad4:f156:906f:f6f3:943b:7b1d
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAv7wpfzpazvXzKJsDkJ8J9zsTZRoI6LnpSIcO8hLQcHNk6LTWjBy1
+xdnsSe3eQYxNmZPKi28PdbMo4YQlFdewLSB69PP6ZX5ISNXVlCZ5Cend/kfU1fXV
+tcZ4JQCl/adHqg8niLAODfnXhwVjMpllgq6gCg5mVPILy+CZ08OM6Ij7Q5d+3Jr4
+1zMvAXyeuNQcL+MkBveblKC6j/e9fqaK86sUh/4unfgmkB7GWjqFwmoHZepR83o9
+HTBmKxEIDKYjLWVXV1Wph3/JN/65igTtju26cVarUmTtGIhU44NzCi+94+wKuJMU
+Bbjk/CnuWQoU2ABPsxtW3r6m4pSDhypNZQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/flap b/retiolum/hosts/flap
new file mode 100644
index 00000000..ea6aace5
--- /dev/null
+++ b/retiolum/hosts/flap
@@ -0,0 +1,11 @@
+Subnet = 10.243.211.172
+Subnet = 42:472a:3d01:bbe4:4425:567e:592b:065d
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAwtLD+sgTQGO+eh2Ipq2r54J1I0byvfkaTBeBwhtUmWst+lUQUoGy
+2fGReRYsb4ThDLeyK439jZuQBeXSc5r2g0IHBJCSWj3pVxc1HRTa8LASY7QuprQM
+8rSQa2XUtx/KpfM2eVX0yIvLuPTxBoOf/AwklIf+NmL7WCfN7sfZssoakD5a1LGn
+3EtZ2M/4GyoXJy34+B8v7LugeClnW3WDqUBZnNfUnsNWvoldMucxsl4fAhvEehrL
+hGgQMjHFOdKaLyatZOx6Pq4jAna+kiJoq3mVDsB4rcjLuz8XkAUZmVpe5fXAG4hr
+Ig8l/SI6ilu0zCWNSJ/v3wUzksm0P9AJkwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/slowpoke b/retiolum/hosts/slowpoke
index 09e415e1..27b1e57c 100644
--- a/retiolum/hosts/slowpoke
+++ b/retiolum/hosts/slowpoke
@@ -1,6 +1,7 @@
Address = 62.113.241.235
Subnet = 10.243.232.121
Subnet = 42:7d8f:9e3a:dcc7:9b22:d1ca:7e28:fe9c
+Subnet = 172.22.0.0/15
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA9EtaOHLa0CyOGpX3rzMLqi9HqrjzVe3XdSfcb9QPYwcbxpPYNLLk
diff --git a/retiolum/hosts/thomasDOTde b/retiolum/hosts/thomasDOTde
new file mode 100644
index 00000000..ce47b39e
--- /dev/null
+++ b/retiolum/hosts/thomasDOTde
@@ -0,0 +1,9 @@
+Subnet = 10.243.42.23/32
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA3btaQpK89aRDJ66cW8H9RlDIzr4k4WIGiqNCsIAE5MhSGCtjboWO
+elgRWlYP59l54yRzn5FpvABAWeRupbX/AMhG8IiBgU6438+F2kVlZdJM4DP51F7c
+N2Ek2WKSoIJuiv7Aqb1WlHIWlN3ehg/BXcFPLSav+iChWXAD+MkKmMwL8lGEzsus
+MdbpRLxB0g90FUmpwr2f8euanOXYhU6sjnxH+0JY+j9AwWQLfAqtQ1eGO5MK75Dw
+htPM3Pj90bkfnYNjNXvnyjsQScDjYG/cv/zDwqRQWNcsmT3EqsBnmM5q0EL+Djo1
+lsPTacJdRtHsnQne9daNadnHywQPX+t/QwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/wall b/retiolum/hosts/wall
index 9cedb8dd..60dc6dc6 100644
--- a/retiolum/hosts/wall
+++ b/retiolum/hosts/wall
@@ -1,5 +1,7 @@
+Address = 176.9.48.250
Subnet = 10.243.248.11
Subnet = 42:e1b6:4748:b0cf:555c:bdfe:26de:3a9d
+Subnet = 172.22.0.0/15
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEApKt/lYqRgl4KE1ouSi5nbt7n7FEjECkGtkRhLFDJs0uWNvPj7wEh
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh
index 1ebde38b..50fbc3b5 100755
--- a/retiolum/scripts/tinc_setup/new_install.sh
+++ b/retiolum/scripts/tinc_setup/new_install.sh
@@ -218,6 +218,8 @@ EOF
echo "addr4=\$(sed -n \"s|^ *Subnet *= *\\($SUBNET4[.][^ ]*\\) *\$|\\\\1|p\" \$host)" >> tinc-up
echo 'ip -4 addr add $addr4 dev $INTERFACE' >> tinc-up
echo "ip -4 route add $FULLSUBNET/$MASK4 dev \$INTERFACE" >> tinc-up
+ #TODO: variable for network announced
+ echo "ip -4 route add 172.22.0.0/15 dev \$INTERFACE" >> tinc-up
echo '' >> tinc-up
echo "addr6=\$(sed -n \"s|^ *Subnet *= *\\($SUBNET6[:][^ ]*\\) *\$|\\\\1|p\" \$host)" >> tinc-up
echo 'ip -6 addr add $addr6 dev $INTERFACE' >> tinc-up
diff --git a/retiolum/scripts/tinc_setup/tinc-up b/retiolum/scripts/tinc_setup/tinc-up
index a829528d..043e1e46 100755
--- a/retiolum/scripts/tinc_setup/tinc-up
+++ b/retiolum/scripts/tinc_setup/tinc-up
@@ -11,14 +11,9 @@ host=$dirname/hosts/$name
ip link set $INTERFACE up
addr4=`sed -n 's|^ *Subnet *= *\(10[.][^ ]*\) *$|\1|p' $host`
-if [ "$addr4" != '' ];then
- ip -4 addr add $addr4 dev $INTERFACE
- ip -4 route add 10.243.0.0/16 dev $INTERFACE
-else
- addr4=`sed -n 's|^ *Subnet *= *\(42[.][^ ]*\) *$|\1|p' $host`
- ip -4 addr add $addr4 dev $INTERFACE
- ip -4 route add 42.0.0.0/16 dev $INTERFACE
-fi
+ip -4 addr add $addr4 dev $INTERFACE
+ip -4 route add 10.243.0.0/16 dev $INTERFACE
+ip -4 route add 172.22.0.0/15 dev $INTERFACE
addr6=`sed -n 's|^ *Subnet *= *\(42[:][^ ]*\) *$|\1|p' $host`
ip -6 addr add $addr6 dev $INTERFACE