Stiamo progettando di usare fastd per fare qualche prova di collegamento verso un server vps che fornisce un nodo batman.

promemoria veloce da irc:

{{{
< diego71> modprobe tun; ip tuntap add dev tap0 mode tap
< diego71> (se no fastd non parte su debian)
}}}

{{{
< diego71> ethtool -K eth0 tx off rx off
< diego71> impostazioni per tcp-offloading
< diego71> (disabilitare)
}}}

=== Configurazione su debian ===

Per prima cosa installare fastd. Tenere conto che e' presente a partire da stretch (testing).

{{{
root# apt-get install fastd
}}}

Serve poi creare una cartella ninux sotto /etc/fastd/, e una sotto cartella peers:

{{{
root# mkdir -p /etc/fastd/ninux/peers
}}}

Creare poi una chiave pubblica/privata per il proprio nodo:

{{{
fastd --generate-key
}}}

E salvarsi in un posto sicuro le chiavi generate.

Creare il file di configurazione /etc/fastd/ninux/fastd.conf:

{{{
# Log warnings and errors to stderr
log level warn;

# Log everything to syslog
log to syslog level debug;

# Set the interface name
interface "mesh-vpn";

# Support salsa2012+umac and null methods, prefer salsa2012+umac
method "null+salsa2012+umac";
method "salsa2012+umac";
method "null";

# Bind to a fixed port, IPv4 only
bind 0.0.0.0:10000;

# Secret key generated by `fastd --generate-key`
secret "xxxx";


# Set the interface MTU for TAP mode with xsalsa20/aes128 over IPv4 with a base MTU of 1492 (PPPoE)
# (see MTU selection documentation)
mtu 1426;

# Include peers from the directory 'peers'
include peers from "peers";

}}}

Dove c'e' xxxx inserire la propria chiave privata, generata al passo precedente con '''fastd --generate-key'''.

Infine nella cartella peers creare un file, con le informazioni del nodo a cui collegarsi. Per ogni nodo serve un file separato.

Esempio:

vps.conf
{{{
key "4af9631ba2e500fd5e45596caac415f8375756eec357678ab26876f6245edd44";
remote 163.172.151.181:10000;
}}}

==== In caso di systemd ====

Al momento in cui e' stato scritto questo articolo, il pacchetto debian di fastd contiene un [[http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823801|bug]] per la parte systemd, per cui non puo' essere fatto partire automaticamente all'avvio. Per correggere il problema, come root:

{{{
cp /lib/systemd/system/fastd.service /etc/systemd/system/fastd@.service
}}}

e poi avviare fastd usando come nome di servizio "fastd@ninux"

=== Configurazione su openwrt ===