Troisdorf-Server-howto
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
Install Batman, batctl and alfred
cd /srv
git clone git://git.open-mesh.org/batman-adv.git cd batman-adv make make install cd ../ git clone http://git.open-mesh.org/batctl.git cd batctl make make install cd ../ git clone http://git.open-mesh.org/alfred.git cd alfred 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 mkdir /etc/fastd/servers/tro
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 04:9b:bb:cd:cb:eb 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 client ip link set up dev bat0 ip addr add 10.188.0.2/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::2/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;
////////////////////////////Availabe Servers//////////////////////////////////////
key "f355e18e0e442723548d21db8d762deeb1cfef18abd3c27180e7ca1ff6639422"; remote "gateway1.freifunk-troisdorf.de" port 53840;
key "7142f897f4e55d2c19207aa59db92ec54d7517cf558d5ecaef33689234952a4b"; remote "wupper0v6.freifunk-troisdorf.de" port 53840;
key "c3fe61335a6c92d2557cdaf93db2b80e7e5b9704290ccdb0ad34ee01c56b9116"; remote "wupper1v6.freifunk-troisdorf.de" port 53840;
//////////////////////////////////////////////////////////////////////////////////