diff options
Diffstat (limited to 'retiolum')
-rw-r--r-- | retiolum/Makefile | 4 | ||||
-rwxr-xr-x | retiolum/bin/supernode-update-hosts-and-hup | 44 | ||||
-rw-r--r-- | retiolum/hosts/ach | 11 | ||||
-rw-r--r-- | retiolum/hosts/kremu | 10 | ||||
-rw-r--r-- | retiolum/hosts/oxberg | 11 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/install.sh | 6 | ||||
-rw-r--r-- | retiolum/scripts/tinc_setup/write_channel.py | 2 |
7 files changed, 84 insertions, 4 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile index c80a6faa..83c4ac12 100644 --- a/retiolum/Makefile +++ b/retiolum/Makefile @@ -11,7 +11,7 @@ hosts: bin/update-retiolum-hosts || true install: update - @#punani -Ei tinc python + punani -Eih tinc /usr/bin/python /usr/bin/python2 @# will not run automatically scripts/tinc_setup/install.sh scripts/autostart/create-startup.sh @@ -21,6 +21,8 @@ update: hosts bin/update_tinc_hosts "create magic" || true @echo adding hosts bin/update_tinc_hosts restart + @echo reloading tincd + pkill -HUP tincd || true arch-install: update install arch-autostart autohosts diff --git a/retiolum/bin/supernode-update-hosts-and-hup b/retiolum/bin/supernode-update-hosts-and-hup new file mode 100755 index 00000000..b6b03c69 --- /dev/null +++ b/retiolum/bin/supernode-update-hosts-and-hup @@ -0,0 +1,44 @@ +#! /bin/sh +# +# @oxberg we do put this into crontab: +# * * * * * /supernode-update-hosts-and-hup +# +set -euf + +cd /etc/tinc/retiolum/hosts + +temp1="`mktemp`" +temp2="`mktemp`" +trap "rm -f $temp1 $temp2" EXIT INT TERM + +old_commit="`cat .commit 2>/dev/null || :`" + +_hrefs() { + sed -n 's/href="\([^"]\+\)"/\n&\n/gp' | + sed -n 's/^href="\([^"]\+\)"$/\1/p'; } + +if curl -fsS \ + "https://github.com/krebscode/painload/tree/master/retiolum/hosts" | + _hrefs | + grep '^/krebscode/painload/blob/' | + grep -v "/blob/$old_commit/" >$temp1 +then + + new_commit=`sed 's|^/krebscode/painload/blob/\([^/]*\)/.*|\1|;q' $temp1` + + sed ' + s|^/krebscode/painload/blob/[^/]*/retiolum/hosts/\([^/]*\)$|\1| + ' $temp1 > $temp2 + + xargs rm -v -f <$temp2 + + sed " + s|^.*$|https://raw.github.com/krebscode/painload/$new_commit/retiolum/hosts/&| + " $temp2 > $temp1 + + wget -qi- < $temp1 + + echo $new_commit > .commit + + pkill -HUP tincd +fi diff --git a/retiolum/hosts/ach b/retiolum/hosts/ach new file mode 100644 index 00000000..58e43a0a --- /dev/null +++ b/retiolum/hosts/ach @@ -0,0 +1,11 @@ +Subnet = 10.7.7.67 +Subnet = 42:c50f:d371:cf01:8cf0:0b77:bb01:5013/128 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEA2d5RaWiFmkuw0UhPsQCrFBNNgBwzHQMDO69rU6XlH8VSGI8HTPuI +v5Jjyhrf2p/ktLAnafBUHO32bNRu/9lbM0rjPZna5t1MjJpUaja6yF5TzdAQ4YMD +KTkGqjI9QEuGBPixFNRq+P9QK5FLx1/wtF0ZE1CYS+A6iwQ9S+IPCIYYswUmhYQF +ik2IaixG6EkZj2NSJqvDF4HDJz8lnwQIQfFqZ8WdP2MtMUng09PdjQHss0jqRbPO +4J7UpDkrXSABjDnEYk4CKH0YhLGPB3VDYeD4rQjKuDTYOWXQ8OYIyPVucKe2RABc +dJF6MQ+z+2m1vMqEYPBOH69Ggncq9GQ4xwIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/kremu b/retiolum/hosts/kremu new file mode 100644 index 00000000..06df489f --- /dev/null +++ b/retiolum/hosts/kremu @@ -0,0 +1,10 @@ +Subnet = 42:88ec:8968:cc6b:978a:68b7:1004:fc8a/128 +Subnet = 10.7.7.192 +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAsdjqCyLvGfkIsawGji1CIIxGaKKdFhKJcfFK8FWiyQdgeNK/9UAh +XsJYkSHVcXqHAorP1QAvk5fIiSEEoSwoChyecqpNOREOnN8+N8RVrs0QIwL0mwa0 +9H4HDcpt8O8J0mpM8z8pb7vhDk261oMchG52TVYX4cuEgpEiyJtij27UIfOeVY8g +8kuJQG+9X7WNGMOt2Y8A7pXFf/+8qdwpOq5C0SIRPR5WplBeeF3BepzmUeq24XOE +cdF/ggYeU8hSYzr3DFX7g9u/gOjBQrhApopx6LR9TkpkrFfVcgLw3NaOzI2vQzqa +7m8v62D+/3vun3ZB/1OfQpIMfm77DC8AEQIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/oxberg b/retiolum/hosts/oxberg new file mode 100644 index 00000000..91f0151a --- /dev/null +++ b/retiolum/hosts/oxberg @@ -0,0 +1,11 @@ +Address = 84.23.80.172 +Subnet = 10.7.7.172 +Subnet = 42:c154:3219:a91c:77eb:91bb:2f18:ff75/128 +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEA57j66efrYrB7jlBVu6XD6433n/j1QL86KI/l7BCVTE11mJrElElc +YSAOB44arnFurSlU8RZIZAC4gnScmDnjJqCqudxps4wO0JTPqUCvUXkaZQ1fUf7W +H00K05Jkrr6xFHyDwZNrU4uitBfMuAXlUE2A0sFLJiBmFLMSS0abaUg0ALRwFsMI +5ftLHZPMV/TwUollCHQTfwMiMGo28WBm+nYvY+nUZRu3sx8HPLskYWmvt9giu7eo +iQCDee/bHym5Ax9vETpCrkZITq2MJtQdJX46iwvlgKxsV7VkCXAtmU3lMLyTSeRX +582RdmjFP2DdTPEulbL2YyfXVuLs0QIiRQIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/retiolum/scripts/tinc_setup/install.sh b/retiolum/scripts/tinc_setup/install.sh index 547cf366..a550a068 100755 --- a/retiolum/scripts/tinc_setup/install.sh +++ b/retiolum/scripts/tinc_setup/install.sh @@ -40,6 +40,7 @@ then if ! $MYBIN/check-free-retiolum-v4 $v4num;then exit 1 fi + myipv4="10.7.7.$v4num" fi echo "Subnet = $myipv4" > hosts/$myname @@ -53,10 +54,11 @@ cp $CURR/tinc-up /etc/tinc/$netname/ cat>tinc.conf<<EOF Name = $myname -ConnectTo = supernode +ConnectTo = EUcancER ConnectTo = kaah +ConnectTo = oxberg ConnectTo = pa_sharepoint -ConnectTo = EUcancER +ConnectTo = supernode Device = /dev/net/tun EOF diff --git a/retiolum/scripts/tinc_setup/write_channel.py b/retiolum/scripts/tinc_setup/write_channel.py index ee28674f..53a155d9 100644 --- a/retiolum/scripts/tinc_setup/write_channel.py +++ b/retiolum/scripts/tinc_setup/write_channel.py @@ -6,7 +6,7 @@ except: print "you are made of stupid" exit (23) -CHANNEL = '#tincspasm' +CHANNEL = '#krebsco' HOST='irc.freenode.net' FILE="/etc/tinc/retiolum/hosts/"+myname PORT=6667 |