Troisdorf-Event-Supernode: Unterschied zwischen den Versionen
(→Fastd) |
|||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 33: | Zeile 33: | ||
git clone git://git.open-mesh.org/batman-adv.git | git clone git://git.open-mesh.org/batman-adv.git | ||
cd batman-adv | cd batman-adv | ||
git checkout | git checkout v2015.1 | ||
make | make | ||
make install | make install | ||
Zeile 41: | Zeile 41: | ||
git clone http://git.open-mesh.org/batctl.git | git clone http://git.open-mesh.org/batctl.git | ||
cd batctl | cd batctl | ||
git checkout | git checkout v2015.1 | ||
make | make | ||
make install | make install | ||
Zeile 49: | Zeile 49: | ||
git clone http://git.open-mesh.org/alfred.git | git clone http://git.open-mesh.org/alfred.git | ||
cd alfred | cd alfred | ||
git checkout v2014. | git checkout v2014.4.0 | ||
make | make | ||
make install | make install | ||
Zeile 68: | Zeile 68: | ||
mkdir /etc/fastd/tro | mkdir /etc/fastd/tro | ||
mkdir /etc/fastd/servers | mkdir /etc/fastd/servers | ||
Add your Secret: | Add your Secret: | ||
Zeile 108: | Zeile 107: | ||
key "PUBLIC KEY OF SERVER"; | key "PUBLIC KEY OF SERVER"; | ||
remote "IP OR DNS OF SERVER" port 53840; | remote "IP OR DNS OF SERVER" port 53840; | ||
or | |||
////////////////////////////Availabe Servers////////////////////////////////////// | ////////////////////////////Availabe Servers////////////////////////////////////// | ||
https://github.com/Freifunk-Troisdorf/fastd-server | git clone https://github.com/Freifunk-Troisdorf/fastd-server /etc/fastd/servers/tro | ||
////////////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////////////// |
Aktuelle Version vom 9. August 2015, 11:50 Uhr
Bemerkungen
Server die sich im Mesh mit diesem Howto anmelden, werden in der Map nur mit der MAC Adresse angezeigt. Bitte meldet euch und Teilt und den Namen des Servers mit, damit dieser in die Aliases.json eingetragen werden kann.
Installation
Grundlage: Debian 7
Edit /etc/apt/sources.list
nano /etc/apt/sources.list
and add this:
deb http://repo.universe-factory.net/debian/ sid main deb http://http.debian.net/debian wheezy-backports main
Add Keys:
gpg --keyserver pgpkeys.mit.edu --recv-key 16EF3F64CB201D9C gpg -a --export 16EF3F64CB201D9C | apt-key add -
Update and install:
apt-get update apt-get install git make gcc build-essential linux-headers-$(uname -r) pkg-config libgps-dev libnl-3-dev libjansson-dev fastd #isc-dhcp-server
Netzwerk Config:
Es werden 2 Netzwerk interfaces benötigt. Eines für den Uplink und ein Mesh Interface an dem die Nodes angeschlossen werden!
Install Batman, batctl and alfred
cd /tmp git clone git://git.open-mesh.org/batman-adv.git cd batman-adv git checkout v2015.1 make make install cd ../ git clone http://git.open-mesh.org/batctl.git cd batctl git checkout v2015.1 make make install cd ../ git clone http://git.open-mesh.org/alfred.git cd alfred git checkout v2014.4.0 make make install
Configuration:
Fastd
Only on Virtual Servers:
rm /dev/random ln -s /dev/urandom /dev/random
Generate fastd Keys
fastd --generate-key
Save your fastd Keys anywhere
Add Directories
mkdir /etc/fastd/tro mkdir /etc/fastd/servers
Add your Secret:
nano /etc/fastd/tro/secret.conf secret "SECRETKEY";
fastd Config:
nano /etc/fastd/tro/fastd.conf
bind *SERVERIP*:53840; bind [*IPv6IP*]:53840; #Only if available include "secret.conf"; include peers from "/etc/fastd/servers/tro"; interface "fastd-tro"; log level info; method "aes128-gcm"; method "salsa2012+umac"; method "salsa2012+gmac"; method "xsalsa20-poly1305"; mtu 1406; on up " modprobe batman-adv ip link set address xx:xx:xx:xx:xx dev fastd-tro #Change MAC to Random MAC Address ip link set up dev fastd-tro batctl -m bat0 if add fastd-tro batctl -m bat0 it 5000 batctl -m bat0 bl enable batctl -m bat0 gw server 92MBit/92MBit ip link set up dev bat0 ip addr add 10.188.0.XXX/16 broadcast 10.188.255.255 dev bat0 #Change IP to a available Address in the mesh network ip -6 addr add fda0:747e:ab29:7405::XXX/64 dev bat0 #Change IP to a available Address in the mesh network ";
Add Server connection:
nano /etc/fastd/servers/tro/SERVERNAME
key "PUBLIC KEY OF SERVER"; remote "IP OR DNS OF SERVER" port 53840;
or
////////////////////////////Availabe Servers//////////////////////////////////////
git clone https://github.com/Freifunk-Troisdorf/fastd-server /etc/fastd/servers/tro
//////////////////////////////////////////////////////////////////////////////////
Ich habe bei meinen Servern das Problem, das die Dienste nicht in Richtiger Rheienfolge geladen werden und desswegen nichts funktioniert. Desswegen habe ich noch ein script, welches beim rebooten ausgeführt wird und die Dienste Richtig startet.
nano ~/fastdreboot.sh
#!/bin/sh sleep 60 && /etc/init.d/fastd restart && \ (\ killall alfred killall batadv-vis sleep 5 && alfred -i bat0 > /dev/null 2>&1 & \ sleep 15 && batadv-vis -i bat0 -s > /dev/null 2>&1 & \ )
Dieses einfach nach dem Reboot ausführen.