summaryrefslogtreecommitdiffstats
path: root/retiolum
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum')
-rwxr-xr-xretiolum/bin/announce_pubkey35
-rwxr-xr-xretiolum/bin/check-free-retiolum-v42
-rwxr-xr-xretiolum/bin/create-host-tar15
-rwxr-xr-xretiolum/bin/create-supernode-tar13
-rwxr-xr-xretiolum/bin/dump-graph9
l---------retiolum/bin/tinc_stats1
l---------retiolum/bin/tinc_stats2json1
-rw-r--r--retiolum/doc/cronjob7
-rw-r--r--retiolum/doc/git_checkout_only_hosts11
-rw-r--r--retiolum/doc/highping2
-rw-r--r--retiolum/hosts/TodesBrot9
-rw-r--r--retiolum/hosts/albi1011
-rw-r--r--retiolum/hosts/also12
-rw-r--r--retiolum/hosts/casino11
-rw-r--r--retiolum/hosts/euer2
-rw-r--r--retiolum/hosts/filebitch10
-rw-r--r--retiolum/hosts/filebitchin10
-rw-r--r--retiolum/hosts/iiso11
-rw-r--r--retiolum/hosts/incept2
-rw-r--r--retiolum/hosts/juhulian11
-rw-r--r--retiolum/hosts/khackplug11
-rw-r--r--retiolum/hosts/laqueus4
-rw-r--r--retiolum/hosts/minikrebs2
-rw-r--r--retiolum/hosts/muhbaasu2
-rw-r--r--retiolum/hosts/nomic10
-rw-r--r--retiolum/hosts/oxberg11
-rw-r--r--retiolum/hosts/pico2
-rw-r--r--retiolum/hosts/pigstarter2
-rw-r--r--retiolum/hosts/rubus11
-rw-r--r--retiolum/hosts/xso10
-rwxr-xr-xretiolum/openwrt/tinc-up19
-rwxr-xr-xretiolum/openwrt/updater6
-rwxr-xr-xretiolum/scripts/adv_graphgen/all_the_graphs.sh9
-rwxr-xr-xretiolum/scripts/adv_graphgen/anonytize.sh2
-rw-r--r--retiolum/scripts/adv_graphgen/find_super.py50
-rwxr-xr-xretiolum/scripts/adv_graphgen/parse_tinc_anon.py4
-rwxr-xr-xretiolum/scripts/adv_graphgen/parse_tinc_stats.py18
-rwxr-xr-xretiolum/scripts/adv_graphgen/sanitize.sh2
-rwxr-xr-xretiolum/scripts/adv_graphgen/tinc_stats2json (renamed from retiolum/scripts/adv_graphgen/tinc_stats.py)59
-rw-r--r--retiolum/scripts/github_listener/INSTALL13
-rw-r--r--retiolum/scripts/github_listener/README22
-rw-r--r--retiolum/scripts/github_listener/github_listener.conf5
-rwxr-xr-xretiolum/scripts/github_listener/handle_request23
-rwxr-xr-xretiolum/scripts/tinc_multicast/retiolum34
-rwxr-xr-xretiolum/scripts/tinc_multicast/retiolum.py349
-rw-r--r--retiolum/scripts/tinc_setup/bootstrap.sh11
-rwxr-xr-xretiolum/scripts/tinc_setup/install.sh8
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh407
-rw-r--r--retiolum/scripts/tinc_setup/write_channel.py27
49 files changed, 773 insertions, 545 deletions
diff --git a/retiolum/bin/announce_pubkey b/retiolum/bin/announce_pubkey
new file mode 100755
index 00000000..ce5aed19
--- /dev/null
+++ b/retiolum/bin/announce_pubkey
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -euf
+HOST="${1:-}"
+
+usage (){
+cat <<EOF
+usage: $0 HOSTNAME
+
+also, you are made of stupid
+EOF
+exit 23
+}
+
+[ "x$HOST" = "x" ] && usage
+
+CHANNEL="#krebsco"
+IRCHOST="irc.freenode.net"
+PORT=6667
+RETIOLUM="/etc/tinc/retiolum"
+PUBFILE="$RETIOLUM/hosts/$HOST"
+
+if [ ! -e $PUBFILE ] ;then
+ echo "cannot find $PUBFILE - host $HOST wrong?" ;
+ echo
+ usage
+fi
+
+NICK="${HOST}_$((RANDOM%666))"
+
+( echo "NICK $NICK";
+ echo "USER $NICK $IRCHOST bla : $NICK";
+ echo "JOIN $CHANNEL";
+ sleep 23;
+ sed "s/^\(.*\)/PRIVMSG $CHANNEL : \1/" $PUBFILE;
+ sleep 5; ) | telnet $IRCHOST $PORT
diff --git a/retiolum/bin/check-free-retiolum-v4 b/retiolum/bin/check-free-retiolum-v4
index 3f0dbdf8..3492f7f6 100755
--- a/retiolum/bin/check-free-retiolum-v4
+++ b/retiolum/bin/check-free-retiolum-v4
@@ -1,6 +1,6 @@
#! /bin/sh
netname=retiolum
-myipv4=${1-10.7.7.-1}
+myipv4=${1-10.243.0.-1}
v4num=${myipv4##*.}
printf "Retard check: "
if [ "$v4num" -gt 0 -a "$v4num" -lt "256" ];
diff --git a/retiolum/bin/create-host-tar b/retiolum/bin/create-host-tar
new file mode 100755
index 00000000..48ce26d5
--- /dev/null
+++ b/retiolum/bin/create-host-tar
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -euf
+if [ x"${1:-}" = "x" ];then
+ echo "usage: $0 DIRECTORY"
+ exit 1
+fi
+
+WEBDIR=$1
+HOSTDIR=${HOSTDIR:-../hosts}
+HOSTFILE=$WEBDIR/hosts.tar.gz
+
+cd $(dirname $(readlink -f $0))
+rm -f $HOSTFILE
+tar czf $HOSTFILE -C $HOSTDIR .
+chmod a+rx $HOSTFILE
diff --git a/retiolum/bin/create-supernode-tar b/retiolum/bin/create-supernode-tar
new file mode 100755
index 00000000..322d428d
--- /dev/null
+++ b/retiolum/bin/create-supernode-tar
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -euf
+if [ x"${1:-}" = "x" ];then
+ echo "usage: $0 DIRECTORY"
+ exit 1
+fi
+HOSTDIR=${HOSTDIR:-../hosts}
+WEBDIR=$1
+HOSTFILE=$WEBDIR/supernodes.tar.gz
+cd $(dirname $(readlink -f $0))
+rm -f $HOSTFILE
+tar czf $HOSTFILE -C $HOSTDIR `python ../scripts/adv_graphgen/find_super.py |cut -d\ -f1`
+chmod a+rx $HOSTFILE
diff --git a/retiolum/bin/dump-graph b/retiolum/bin/dump-graph
new file mode 100755
index 00000000..87539f49
--- /dev/null
+++ b/retiolum/bin/dump-graph
@@ -0,0 +1,9 @@
+#! /bin/sh
+set -euf
+
+t0="`date '+%Y-%m-%d %H:%M:%S'`"
+systemctl kill --signal=USR2 tincd@retiolum
+sleep 5
+journalctl --since="$t0" | sed -n '
+ s/.*tinc\.retiolum\[[0-9]\+\]: \([^ ]\+\) to \([^ ]\+\) at \([^ ]\+\) .*$/\1 \2 \3/p
+'
diff --git a/retiolum/bin/tinc_stats b/retiolum/bin/tinc_stats
deleted file mode 120000
index 6a58af60..00000000
--- a/retiolum/bin/tinc_stats
+++ /dev/null
@@ -1 +0,0 @@
-/home/makefu/repos/krebs/retiolum/scripts/adv_graphgen/tinc_stats.py \ No newline at end of file
diff --git a/retiolum/bin/tinc_stats2json b/retiolum/bin/tinc_stats2json
new file mode 120000
index 00000000..413b778c
--- /dev/null
+++ b/retiolum/bin/tinc_stats2json
@@ -0,0 +1 @@
+../scripts/adv_graphgen/tinc_stats2json \ No newline at end of file
diff --git a/retiolum/doc/cronjob b/retiolum/doc/cronjob
new file mode 100644
index 00000000..3f640311
--- /dev/null
+++ b/retiolum/doc/cronjob
@@ -0,0 +1,7 @@
+cron-eintrag fuer automatisches hosts-update
+
+ueberschreibt keine bearbeitete host-dateien
+if ping -c 1 euer.krebsco.de -W 5 &>/dev/null; then (curl http://euer.krebsco.de/retiolum/hosts.tar.gz | tar xzk -C /etc/tinc/retiolum/hosts/);fi
+
+ueberschreibt bearbeitete hostdateien
+if ping -c 1 euer.krebsco.de -W 5 &>/dev/null; then (curl http://euer.krebsco.de/retiolum/hosts.tar.gz | tar xz -C /etc/tinc/retiolum/hosts/);fi
diff --git a/retiolum/doc/git_checkout_only_hosts b/retiolum/doc/git_checkout_only_hosts
new file mode 100644
index 00000000..2286169d
--- /dev/null
+++ b/retiolum/doc/git_checkout_only_hosts
@@ -0,0 +1,11 @@
+# Reference
+http://jasonkarns.com/blog/subdirectory-checkouts-with-git-sparse-checkout/
+
+# Code
+
+ git init painload
+ cd painload
+ git remote add -f origin https://github.com/krebscode/painload.git
+ git config core.sparsecheckout true
+ echo retiolum/hosts/ >> .git/info/sparse-checkout
+ git pull origin master
diff --git a/retiolum/doc/highping b/retiolum/doc/highping
new file mode 100644
index 00000000..e3d9a47c
--- /dev/null
+++ b/retiolum/doc/highping
@@ -0,0 +1,2 @@
+in der tinc.conf darf nicht zu einem Host connectet werden der einen DNS namen benutzt.
+wenn ein nicht erreichbarer DNS name versucht wird zu erreichen pausiert tinc jedesmal alle transfers bis der DNS-Request einen Timeout hat.
diff --git a/retiolum/hosts/TodesBrot b/retiolum/hosts/TodesBrot
deleted file mode 100644
index f76b72b2..00000000
--- a/retiolum/hosts/TodesBrot
+++ /dev/null
@@ -1,9 +0,0 @@
-Subnet = 10.243.0.12/32
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEAzGIijXaoIRG09v5sIXyVdqdpDruPMqKJfvZUXCF/POMCZEsZ4tjd
-jHHdbTfREExvSNBUxS6GaYwg/HR2R7nprzOazSN9kzp9fmFJofbCOxz6X/8O/fMM
-gTBmZzYu4cfysjTD5tsrJp/dQOZ0wKpUXBOWWWDUTLM9Zo3+6Bxe/6pN+gphvl6m
-ReIAwl34QkZ24mq1W4YZofU2PxLxnhtuBgXuJRfn8FDlgKKPhPpKX070J5pamzpp
-1/Idxl0zTmoKeXWhJ0wY0SNeglaWgH1P2EeNUNoVEX4Egk4XQGkzOfShRG7zoJMA
-tKJlNZOw/4EF3E/IM8mG1yG3NqtFlIyNYQIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/albi10 b/retiolum/hosts/albi10
new file mode 100644
index 00000000..5f152a1f
--- /dev/null
+++ b/retiolum/hosts/albi10
@@ -0,0 +1,11 @@
+Address = 184.154.13.15
+Subnet = 10.243.0.10
+Subnet = 42:aaa9:4ba3:8c43:bdd8:2cc8:29a0:e8e6/128
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA0Jz5rQ7NpIQWwhDsrZHlJYAnC1k1onl2ln/6CJbdV9t3gG2hlx/9
+0SEARo6sq9fftyzzZd3iY4WK7+zRXJFXHsLmDa6mq8Mme7Yv+YHZoHPTm9c3tN3v
+laiV/qAdoi/sv43DCo7JywI2lTW1pPxuitXuud2ajd7GXuCoRqFRqLtaURorVKkW
+4j9UGpMKrEa+CV9wP5jZ57RSPQ7aMq8D4GiMqKDgUeCZnvXxpYWDOEdGNlpuUcWt
+/erC6u50/vnjUkkHx66OmkZe5AX5MmwNp2q4zC4sTh/BRhqk27AmNl5wbp0kL7/B
+hg+r0F8ckrdLc21sSU36lUIeeFa/S+A06QIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/also b/retiolum/hosts/also
deleted file mode 100644
index 59a251a7..00000000
--- a/retiolum/hosts/also
+++ /dev/null
@@ -1,12 +0,0 @@
-Subnet = 42:9c90:a590:e88a:52cf:126f:b710:1a9c/128
-Subnet = 23.42.0.1/16
-Subnet = 10.243.0.50/32
-Compression = 9
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEAsnF1eyd/R4qXMGo8UEZ98hnJK+6ZEKUubgdzEwAuSxK40B6nX8Ry
-Euy3v3s0ps/GMdE52gUbFB+bhM99hHiKW+7zcxnoMJ69a9yK6VG0Im+7ib0WTliZ
-llgUfRETQd/2KaIfJWH/nVsBuK0hp1LscroWcoO08BCw6v94q3He8502Bk/ZYZQF
-wD7Y6LldipWKo/K9YtIU3zD3taj2NGnetOc0BRRncSgGiicXJKhtfcs+Ti2Y/ITz
-bFkHnFgB0KnhjwJBumxdmgjHWknlwVkROvmzIgyoXxqEw31bF+g/XzA7RTMXsiFM
-w0SZ15k4HG5L1PWpUyY2Th5yIjMW+sSrhQIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/casino b/retiolum/hosts/casino
new file mode 100644
index 00000000..e35691c3
--- /dev/null
+++ b/retiolum/hosts/casino
@@ -0,0 +1,11 @@
+Subnet = 10.243.0.233
+Subnet = 42:3c1f:ea16:e181:7ab2:c51a:8892:7fb7/128
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAzmZ7x4HVpW8RC3ZkwmNKY/6VGlMKQbpBQtmrUzV1XFxKWZRhH3VI
+NOqlfVpTEaRTorht7R8F1aw9psDDUcg7yuQFcUdoXxBJxwbc1h0FKyZZr5kAIfpS
+ObE0rbBRRqJVAWgztpQAalWC95D73y/+tpHnQ+LRFq9IWeX5+QobaSym1oG4Y0Jz
+STSbw2ksjH8CuWHS5TjZr50Nyx6cH99HABDnadxhLBtQriJPSYRYdWyp7tYrW3jd
+As28mxkyFj0sFV3IJ/bYfZD9KSGg1KjQu+c73xKOBUhNtSHFjUzN5myYGd/nWCw8
+0PUReLrWC1ZHYPzqiwelTHcNJ3UcojpO9wIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/euer b/retiolum/hosts/euer
index 391705c5..d2240575 100644
--- a/retiolum/hosts/euer
+++ b/retiolum/hosts/euer
@@ -1,4 +1,4 @@
-Address = euer.krebsco.de
+#Address = euer.krebsco.de
Address = 84.23.67.119
Subnet = 42:974a:3ecf:3c49:06c0:4cd1:3c6f:59d9/128
Subnet = 10.243.0.95/32
diff --git a/retiolum/hosts/filebitch b/retiolum/hosts/filebitch
deleted file mode 100644
index d23f98f2..00000000
--- a/retiolum/hosts/filebitch
+++ /dev/null
@@ -1,10 +0,0 @@
-Subnet = 42:0356:a364:cc79:4c96:2c7c:13fc:0c5b/128
-Subnet = 10.243.131.98/32
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEAoqTUa54dkplzU6IqWdvCiGM8FLpZ6X6AmgGgl5r9RZ+Af08iy4Js
-FPdco+1Lj5OthXJnd5Xx8cO5qQx5CRzUN59ec8o0jxQOBZ5EpuN42RLMmQNBJWm7
-moVpEDuPQTHQrlyvsYwXOx1+T4rvSnG7hldiHoCL4XVn8FpZLPMXL5alGHSuNuYq
-dG++5LtPpmRLOg0Pwlk3nVfJpKKn4u2FVmhmxe9CdV9c5B5Ze0nVH6sekaG0gXzX
-ktoJG83/yc2XYhn+rel4kvLFyP/XqdAxsO6v7mpmQVNgsppqm2A9unDacTfOG//z
-2O+/dHkkW7ukOfk2Tr6z/CSDDxySMzx2NwIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/filebitchin b/retiolum/hosts/filebitchin
new file mode 100644
index 00000000..cd67b1ab
--- /dev/null
+++ b/retiolum/hosts/filebitchin
@@ -0,0 +1,10 @@
+Subnet = 10.243.221.149
+Subnet = 42:9efb:ae54:fdbf:6ec1:6167:6aab:a41e
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAqtid32pdLNTOasAf8JW16SmmFJmwx/3PucO2Bpo34dDYWFm5uxyH
+MYDTYDXLFRioiWGX2b1/5x7Oqjn0hP3FPuSAWPpyWEspMNmrpwZ1iA3hxQJEvQav
+juBQzh18f6JJow+SoosiAfdr9pSoosZEKKbcwiWZ3od05BdKnogQ7bJI1mjSC0xb
+9zAtlEKXhtmS8SJAyWKPQjC3coHlWoRq61zsI3/20074mUbFHsXj3jZPgn4Dc2RV
+BYx+ZDGviIMhQEKXn9C3VFfVrLZbgheE5xiKFkqRMTWwlbNH/MXwNsrlJq3uAy9H
+YuJhTY5XxUjkwCVky5m9QYbxEpl4hlvpnQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/iiso b/retiolum/hosts/iiso
deleted file mode 100644
index 3700cec5..00000000
--- a/retiolum/hosts/iiso
+++ /dev/null
@@ -1,11 +0,0 @@
-Subnet = 42:b2cd:6c75:d528:e736:ec4e:fc39:8bdc/128
-Subnet = 10.243.0.37/32
-Compression = 9
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEAvsjBR0FUkjiNNLhz3AArosLqEiLZY7O8L6LorfUplD/IjG9P7XXx
-ry4gbKEH57GPn11IOPP1AKQcz7SfW7EwvUS8U1IZgkQq8BuuD3oGBQxOqwnOwzVN
-+XKSZjUfmT/Uf81PHfWE52BfbitI+SBTi0m9cIuhgyYRAjD7We97ogkWDogBXKvC
-p1YYH44wcLte7lzWmId9hNOJtTu4KnCVgtXi/DYVLvuofrEk28DhhRSFiun4dkN6
-qMl8ZWOILOhUVSZN+cx/dslCwoog1FuEj7TyuhJFj8yoWIdI4xUGugzmV6npzTvU
-bLkcVfuQQYlIV9D7YYPyEFB11U6mifZ5uwIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/incept b/retiolum/hosts/incept
index 1ff5365b..348e44b1 100644
--- a/retiolum/hosts/incept
+++ b/retiolum/hosts/incept
@@ -1,5 +1,5 @@
Address = 77.95.224.63
-Address = incept.krebsco.de
+#Address = incept.krebsco.de
Address = 2a00:7b80:3008:3::fafc:241
Subnet = 10.243.0.174
Subnet = 42:a2fc:1c89:65c7:6e60:1f62:eaf9:e9b6/128
diff --git a/retiolum/hosts/juhulian b/retiolum/hosts/juhulian
new file mode 100644
index 00000000..d9da75aa
--- /dev/null
+++ b/retiolum/hosts/juhulian
@@ -0,0 +1,11 @@
+Subnet = 10.243.0.38
+Subnet = 42:449f:b00a:e973:514c:3e9f:97ed:aac2/128
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAnNyOsNItOzNQndheZ3ppOMWvIOuO1wgLXArINS1ORcgIAJmLpqDI
+whsZFCVifwAXsdeBJyyZOPZrc2PQ4F3KB9ByX6PQ9jqAhun1aE9SDDqp+woOrTlP
+BtJ/8zAmRhrfak61TxpeTndLk95xOLaCwvS2P4SJLIcyutTbbFdBCqpu7cFUGOOP
+qCKLX7/mv2L+GNmQAnWZ5HwXQzBS6gNaNIcQ8mPCUAIZgRU2T83x/tnyH1RlATK2
+lYUWRM0ie+dRMhiDcwmmZrwYl8wzyvuBPEr/p8ZBM2tua8GlQzJUJl44AiAcx3w9
+0EB5MIRL5Qb0yBvXD0yR+bDizqvhd40LvQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/khackplug b/retiolum/hosts/khackplug
new file mode 100644
index 00000000..c149d93b
--- /dev/null
+++ b/retiolum/hosts/khackplug
@@ -0,0 +1,11 @@
+Subnet = 10.243.217.107
+Subnet = 42:ebe3:90b0:539a:6ef0:0910:b724:00b1
+ │
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAvytShP1vgYLDYJhiC26Vc1/cVJOptUnuyTc8Id9vkCkgHZRpKs3T
+jO2KRaQMDWMXfXkMfVp84/2Q85hpUzYqXQHaNzitg9nHGR2n+a6zfwNKWAm6n2WK
+AMsPf1weamzs6EfCm5WztqenoHKNUxpzXVyLJES/WK6e5ba7FEpszZx+ydoc5GjL
+kezqch5p+U/J2JoUx3aIpQuWvc0i/4KYOuGzlWgUYLNyqL1m3gBkahiPuOtzf9Ul
+EP8QY/GQa1HTFuhLS0Y5nVjZvWnjVVEloXbq9SD2I2fc4GD4+F8wtFMsJyEF2qxY
+XfSLTlpHaJbSBNiopQyWG62RZda/p0yq3QIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/laqueus b/retiolum/hosts/laqueus
index cf4ecad5..0bdef307 100644
--- a/retiolum/hosts/laqueus
+++ b/retiolum/hosts/laqueus
@@ -1,5 +1,5 @@
-Subnet = 42:0:0:0:0:0:0:1a1a/128
-Subnet = 10.243.0.12/32
+Subnet = 42:0:0:0:0:0:0:1a1a/128
+Subnet = 10.243.0.12/32
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAy9lnH4qDSYeNbpzpcQyq2LzzxkVy2N1vGgKkVttzx0cgMvyRm3aX
diff --git a/retiolum/hosts/minikrebs b/retiolum/hosts/minikrebs
index ad7278e2..b0d60558 100644
--- a/retiolum/hosts/minikrebs
+++ b/retiolum/hosts/minikrebs
@@ -1,5 +1,5 @@
Subnet = 10.243.1.1/32
-Subnet = 42:0:0:0:0:0:1:1/128
+#Subnet = 42:0:0:0:0:0:1:1/128
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA0fu8F+XJ6hHsIj8QtdSZIhE+Ae2sEIY4dHcnHbCOeHJlOQQDJrme
frmG65BX4BMcClUyhvvMwlZIerFwsJoEwa39lB3/Y58OwSS9cNCZTShQPbyVy5wo
diff --git a/retiolum/hosts/muhbaasu b/retiolum/hosts/muhbaasu
index d758fef2..83fb3933 100644
--- a/retiolum/hosts/muhbaasu
+++ b/retiolum/hosts/muhbaasu
@@ -1,5 +1,5 @@
Address = 217.160.206.154
-Address = muhbaasu.de
+#Address = muhbaasu.de
Subnet = 10.243.0.200
Subnet = 42:3f88:faa3:ae13:6ff7:13ee:17d7:421a/128
diff --git a/retiolum/hosts/nomic b/retiolum/hosts/nomic
new file mode 100644
index 00000000..f418233c
--- /dev/null
+++ b/retiolum/hosts/nomic
@@ -0,0 +1,10 @@
+Subnet = 10.243.0.110/32
+Subnet = 42:02d5:733f:d6da:c0f5:2bb7:2b18:09ec/128
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAwb8Yk/YRc17g2J9n960p6j4W/l559OPyuMPdGJ4DmCm3WNQtxoa+
+qTFUiDiI85BcmfqnSeddLG8zTC2XnSlIvCRMJ9oKzppFM4PX4OTAaJZVE5WyCQhw
+Kd4tHVdoQgJW5yFepmT9IUmHqkxXJ0R2W93l2eSZNOcnFvFn0ooiAlRi4zAiHClu
+5Mz80Sc2rvez+n9wtC2D06aYjP23pHYld2xighHR9SUqX1dFzgSXNSoWWCcgNp2a
+OKcM8LzxLV7MTMZFOJCJndZ77e4LsUvxhQFP6nyKZWg30PC0zufZsuN5o2xsWSlA
+Wi9sMB1AUR6mZrxgcgTFpUjbjbLQf+36CwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/oxberg b/retiolum/hosts/oxberg
deleted file mode 100644
index c267b582..00000000
--- a/retiolum/hosts/oxberg
+++ /dev/null
@@ -1,11 +0,0 @@
-Address = 84.23.80.172
-Subnet = 42:c154:3219:a91c:77eb:91bb:2f18:ff75/128
-Subnet = 42.160.213.134/32
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEA57j66efrYrB7jlBVu6XD6433n/j1QL86KI/l7BCVTE11mJrElElc
-YSAOB44arnFurSlU8RZIZAC4gnScmDnjJqCqudxps4wO0JTPqUCvUXkaZQ1fUf7W
-H00K05Jkrr6xFHyDwZNrU4uitBfMuAXlUE2A0sFLJiBmFLMSS0abaUg0ALRwFsMI
-5ftLHZPMV/TwUollCHQTfwMiMGo28WBm+nYvY+nUZRu3sx8HPLskYWmvt9giu7eo
-iQCDee/bHym5Ax9vETpCrkZITq2MJtQdJX46iwvlgKxsV7VkCXAtmU3lMLyTSeRX
-582RdmjFP2DdTPEulbL2YyfXVuLs0QIiRQIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/pico b/retiolum/hosts/pico
index 8fc732b8..b08b450d 100644
--- a/retiolum/hosts/pico
+++ b/retiolum/hosts/pico
@@ -1,4 +1,4 @@
-Address = pu11.de
+Address = 78.111.78.33
Subnet = 10.243.0.102/32
Subnet = 42:b103:275c:1723:edc8:b24d:452b:352a/128
-----BEGIN RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/pigstarter b/retiolum/hosts/pigstarter
index 838d9587..6904f4e0 100644
--- a/retiolum/hosts/pigstarter
+++ b/retiolum/hosts/pigstarter
@@ -1,5 +1,5 @@
Address = 5.45.180.187
-Address = pigstarter.de
+#Address = pigstarter.de
Subnet = 10.243.0.153
Subnet = 42:9143:b4c0:f981:6030:7aa2:8bc5:4110/128
-----BEGIN RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/rubus b/retiolum/hosts/rubus
new file mode 100644
index 00000000..0ba98c0d
--- /dev/null
+++ b/retiolum/hosts/rubus
@@ -0,0 +1,11 @@
+Subnet = 10.243.137.174
+Subnet = 42:7941:278b:bd29:f0ab:9c09:e5e9:7965
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAznS+XyF278SXTVgK9OG8SDu+pffDZtBeYfyyNHAVt/2EeE3cfIJZ
+3iBXMcD8/yelCWMY6S+MNNnP+KqyCCVuG8rvhpMjB/RGzqLFSTLZoQOmC/O9S3i3
+TKKr4zxyBxjSFAPSOeHbrERAyREg/GNrLxX/SzT/yOgRDjZLA1Z5CgunXVeiB7BF
+9jL1U6AahFD/6NzaPAc4+mSAQJzGw4P5TeVvAlhf96x5I0sBc09Vu87sL9NJOpi8
+hqWYhLWjZF4CRusjV3SL9kUj668CZO1S9Ooe3FO37Pa0fftDLQekCpBDrtoNr6LW
+O2BYBEXsQn5ooZgAysm7mi9Hbdc3dPl5/QIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/xso b/retiolum/hosts/xso
deleted file mode 100644
index 1f035a78..00000000
--- a/retiolum/hosts/xso
+++ /dev/null
@@ -1,10 +0,0 @@
-Subnet = 42:fb16:96ad:c849:f5d4:2170:103d:e86b/128
-Subnet = 42.124.174.80/32
------BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEA1p1WG0yDOku0u8XPzN2BAcrkVeR11c8Si3sz2BNoYPitdA2wW/TE
-mHjGw4Dxt1Q+lWmxtsNnV2x5IoZBSIovS8Tuj4O6mVTmgSJSta988gzmeImQksb6
-+/d4LQmqc6/u24sKrWEPQ7sCpb5sPGr1K1yLNtAnD7pt3rGiX/VK/SKBYKpB5wGf
-snRHB5fj/4yc5M7YjQI+TO0jTKdlf9B4JrRX/DhbmZ9n/EPGREGUgrDyi66Jk8ea
-yRyCg/5UcHD6z74ZN6Is4bbQXZaQ4S61r+JmFebsC2CxkZ20jayDBRKcQL6yH0ZZ
-a1rAdUqyh894vNctn52GAp7P96dhwAnwEQIDAQAB
------END RSA PUBLIC KEY-----
diff --git a/retiolum/openwrt/tinc-up b/retiolum/openwrt/tinc-up
deleted file mode 100755
index 3b8bb978..00000000
--- a/retiolum/openwrt/tinc-up
+++ /dev/null
@@ -1,19 +0,0 @@
-# source: krebscode/painload/retiolum/scripts/tinc_setup/tinc-up
-
-dirname="`dirname "$0"`"
-
-conf=$dirname/tinc.conf
-
-name=`sed -n 's|^ *Name *= *\([^ ]*\) *$|\1|p' $conf`
-
-host=$dirname/hosts/$name
-
-addr4=`sed -n 's|^ *Subnet *= *\(10[.][^ ]*\) *$|\1|p' $host`
-if [ "$addr4" != '' ];then
- ifconfig $INTERFACE $addr4
- route add -net 10.243.0.0 netmask 255.255.0.0 dev retiolum
-else
- addr4=`sed -n 's|^ *Subnet *= *\(42[.][^ ]*\) *$|\1|p' $host`
- ifconfig $INTERFACE $addr4
- route add -net 42.0.0.0 netmask 255.0.0.0 dev retiolum
-fi
diff --git a/retiolum/openwrt/updater b/retiolum/openwrt/updater
deleted file mode 100755
index 4dbc7d78..00000000
--- a/retiolum/openwrt/updater
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-cd /etc/tinc/retiolum/hosts
-wget http://vpn.miefda.org/hosts.tar.gz
-tar xzf hosts.tar.gz
-rm hosts.tar.gz
-tincd -n retiolum -kHUP
diff --git a/retiolum/scripts/adv_graphgen/all_the_graphs.sh b/retiolum/scripts/adv_graphgen/all_the_graphs.sh
index 5533c722..d3ce8f86 100755
--- a/retiolum/scripts/adv_graphgen/all_the_graphs.sh
+++ b/retiolum/scripts/adv_graphgen/all_the_graphs.sh
@@ -4,11 +4,14 @@
echo "`date` begin all graphs" >> /tmp/build_graph
cd $(dirname $(readlink -f $0))
PATH=$PATH:../../../util/bin/
- export LOG_FILE=/var/log/retiolum.log
+ export LOG_FILE=/var/log/syslog
+ export TINC_LEGACY=true
+ EXTERNAL_FOLDER=/var/www/euer.krebsco.de/graphs/retiolum
+ INTERNAL_FOLDER=/var/www/euer/graphs/retiolum
begin=`timer`
export GRAPHITE_HOST="no_omo"
- (./anonytize.sh /srv/http/pub/graphs/retiolum/ && echo "`date` anonytize done" >> /tmp/build_graph)&
- (./sanitize.sh /srv/http/priv/graphs/retiolum/ && echo "`date` sanitize done" >> /tmp/build_graph)&
+ (./anonytize.sh $EXTERNAL_FOLDER && echo "`date` anonytize done" >> /tmp/build_graph)&
+ (./sanitize.sh $INTERNAL_FOLDER && echo "`date` sanitize done" >> /tmp/build_graph)&
# wait
graphitec "retiolum.graph.buildtime" "$(timer $begin)" >> /tmp/build_graph
echo "`date` end all graphs" >> /tmp/build_graph
diff --git a/retiolum/scripts/adv_graphgen/anonytize.sh b/retiolum/scripts/adv_graphgen/anonytize.sh
index d49793cb..b31f4dbb 100755
--- a/retiolum/scripts/adv_graphgen/anonytize.sh
+++ b/retiolum/scripts/adv_graphgen/anonytize.sh
@@ -11,7 +11,7 @@ TYPE2=png
OPENER=/bin/true
DOTFILE=`mktemp`
trap 'rm $DOTFILE' INT TERM
-sudo LOG_FILE=$LOG_FILE python tinc_stats.py |\
+sudo -E python tinc_stats2json |\
python parse_tinc_anon.py> $DOTFILE
diff --git a/retiolum/scripts/adv_graphgen/find_super.py b/retiolum/scripts/adv_graphgen/find_super.py
new file mode 100644
index 00000000..df01734e
--- /dev/null
+++ b/retiolum/scripts/adv_graphgen/find_super.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+
+def find_super(path="/etc/tinc/retiolum/hosts"):
+ import os
+ import re
+
+ needle_addr = re.compile("Address\s*=\s*(.*)")
+ needle_port = re.compile("Port\s*=\s*(.*)")
+ for f in os.listdir(path):
+ with open(path+"/"+f) as of:
+ addrs = []
+ port = "655"
+
+ for line in of.readlines():
+
+ addr_found = needle_addr.match(line)
+ if addr_found:
+ addrs.append(addr_found.group(1))
+
+ port_found = needle_port.match(line)
+ if port_found:
+ port = port_found.group(1)
+
+ if addrs : yield (f ,[(addr ,int(port)) for addr in addrs])
+
+def check_super(path="/etc/tinc/retiolum/hosts"):
+ from socket import socket,AF_INET,SOCK_STREAM
+ for host,addrs in find_super(path):
+ valid_addrs = []
+ for addr in addrs:
+ try:
+ s = socket(AF_INET,SOCK_STREAM)
+ s.settimeout(3)
+ s.connect(addr)
+ #print("success connecting %s:%d"%(addr))
+ s.settimeout(None)
+ s.close()
+ valid_addrs.append(addr)
+ except Exception as e:
+ pass
+ #print("cannot connect to %s:%d"%(addr))
+ if valid_addrs: yield (host,valid_addrs)
+
+
+if __name__ == "__main__":
+ """
+ usage
+ """
+ for host,addrs in check_super():
+ print host,addrs
diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py
index e0bea913..21c36e0f 100755
--- a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py
+++ b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py
@@ -15,7 +15,7 @@ try:
sys.stderr.write("connecting to %s:%d"%(host,port))
s.connect((host,port))
except Exception as e:
- print >>sys.stderr, "Cannot connect to graphite: " + str(e)
+ sys.stderr.write( "Cannot connect to graphite: " + str(e))
""" TODO: Refactoring needed to pull the edges out of the node structures again,
it should be easier to handle both structures"""
DUMP_FILE = "/krebs/db/availability"
@@ -151,4 +151,4 @@ try:
msg = '%s.graph.anon_build_time %d %d\r\n' % (g_path,((end-begin)*1000),end)
s.send(msg)
s.close()
-except Exception as e: print >>sys.stderr, e
+except Exception as e: pass
diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py
index 16f4f795..76a3ffcd 100755
--- a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py
+++ b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py
@@ -2,6 +2,7 @@
# -*- coding: utf8 -*-
from BackwardsReader import BackwardsReader
import sys,json
+from find_super import check_super
try:
from time import time
import socket
@@ -16,10 +17,13 @@ try:
except Exception as e:
sys.stderr.write("Cannot connect to graphite: %s\n" % str(e))
-supernodes= [ "kaah","supernode","euer","pa_sharepoint","oxberg" ]
+supernodes= [ ]
+for supernode,addr in check_super():
+ supernodes.append(supernode)
""" TODO: Refactoring needed to pull the edges out of the node structures again,
it should be easier to handle both structures"""
DUMP_FILE = "/krebs/db/availability"
+
def write_digraph(nodes):
"""
writes the complete digraph in dot format
@@ -53,8 +57,7 @@ def write_stat_node(nodes):
try:
msg = '%s.num_nodes %d %d\r\n' %(g_path,num_nodes,begin)
s.send(msg)
- #print >>sys.stderr, msg
- except Exception as e: print sys.stderr,e
+ except Exception as e: pass
#except: pass
for k,v in nodes.iteritems():
num_conns+= len(v['to'])
@@ -82,8 +85,7 @@ def generate_stats(nodes):
jlines.append(jline)
lines_to_use -=1
- except Exception,e:
- sys.stderr.write(str(e))
+ except Exception,e: sys.stderr.write(str(e))
for k,v in nodes.iteritems():
conns = v.get('to',[])
for c in conns: #sanitize weights
@@ -169,7 +171,11 @@ def write_node(k,v):
for addr in v.get('internal-ip',['¯\\\\(°_o)/¯']):
node += "internal:"+addr+"\\l"
node +="\""
- if k in supernodes:
+
+ # warning if node only has one connection
+ if v['num_conns'] == 1:
+ node += ",fillcolor=red"
+ elif k in supernodes:
node += ",fillcolor=steelblue1"