Node

Aus Freifunk Köln, Bonn und Umgebung
Zur Navigation springen Zur Suche springen

Aufsetzen eines Nodes mit Debian

Das ist erstmal nur ein braindump und wurde nicht getestet!

/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;
insmod batman-adv
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

urls = ("http://fastd1.kbu.freifunk.net/fastd-upload/" "http://fastd2.kbu.freifunk.net/fastd-upload/" "http://fastd3.kbu.freifunk.net/fastd-upload/" "http://fastd4.kbu.freifunk.net/fastd-upload/" "http://fastd5.kbu.freifunk.net/fastd-upload/" "http://fastd6.kbu.freifunk.net/fastd-upload/" "http://fastd7.kbu.freifunk.net/fastd-upload/" "http://fastd8.kbu.freifunk.net/fastd-upload/")
for UPLOAD_URL in "${urls[@]}"
do
	$WGETC "$UPLOAD_URL/upload_key?nodeid=${MAC}&_method=post&key=${KEY}&fw_version=${VERSION}" -O -  > /dev/null
done


chmod +x /etc/fastd/mesh-vpn/upload_keys
/etc/fastd/mesh-vpn/upload_keys