Node: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Kaleng (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Aufsetzen eines Nodes mit Debian == ==== /etc/apt/sources.list ==== <nowiki> deb http://repo.universe-factory.net/debian/ sid main deb-src http://repo.uni…“) |
Kaleng (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 50: | Zeile 50: | ||
/usr/bin/fastd --generate-key | /usr/bin/fastd --generate-key | ||
# enter key | # enter key | ||
</nowiki> | |||
==== /etc/fastd/mesh-vpn/upload_keys ==== | |||
<nowiki> | |||
#!/bin/sh | |||
KEY=`/usr/bin/fastd --config /etc/fastd/mesh-vpn/fastd.conf --show-key | cut 9-` | |||
WGETC=`which wget` | |||
VERSION="debian node" | |||
MAC=`/sbin/ip link show dev bat0 | tail -n 1 | cut -c 16-33` | |||
DELAY=30 | |||
while [ 1 = 1 ] | |||
do | |||
$WGETC "$UPLOAD_URL/upload_key?nodeid=${MAC}&_method=post&key=${KEY}&fw_version=${VERSION}" -O - > /dev/null && break | |||
sleep $DELAY | |||
[ $DELAY -gt 42300 ] && DELAY=84600 || DELAY=$((DELAY * 2)) | |||
done | |||
</nowiki> | </nowiki> |
Version vom 30. Dezember 2014, 16:36 Uhr
Aufsetzen eines Nodes mit Debian
/etc/apt/sources.list
deb http://repo.universe-factory.net/debian/ sid main deb-src http://repo.universe-factory.net/debian/ sid main
für wheezy werden backports benötigt!
aptitude update; aptitude install fastd batman-adv-dkms; mkdir -p /etc/fastd/mesh-vpn/backbone git clone https://github.com/ff-kbu/fastd-pubkeys /etc/fastd/mesh-vpn/backbone
/etc/fastd/mesh-vpn/fastd.conf
drop capabilities yes; forward no; hide ip addresses yes; hide mac addresses yes; peer group "backbone" { include peers from "backbone"; } interface "mesh-vpn"; log to syslog level info; method "salsa2012+umac"; mode tap; mtu 1426; on up sync "./fastd-up"; pmtu no; secret "[KEY HERE";
/etc/fastd/mesh-vpn/fastd-up
#!/bin/sh /sbin/ip link set dev mesh-vpn up /usr/sbin/batctl if add mesh-vpn /usr/sbin/batctl it 5000
chmod +x /etc/fastd/mesh-vpn/fastd-up /usr/bin/fastd --generate-key # enter key
/etc/fastd/mesh-vpn/upload_keys
#!/bin/sh KEY=`/usr/bin/fastd --config /etc/fastd/mesh-vpn/fastd.conf --show-key | cut 9-` WGETC=`which wget` VERSION="debian node" MAC=`/sbin/ip link show dev bat0 | tail -n 1 | cut -c 16-33` DELAY=30 while [ 1 = 1 ] do $WGETC "$UPLOAD_URL/upload_key?nodeid=${MAC}&_method=post&key=${KEY}&fw_version=${VERSION}" -O - > /dev/null && break sleep $DELAY [ $DELAY -gt 42300 ] && DELAY=84600 || DELAY=$((DELAY * 2)) done